Skip to main content
POST
/
api
/
v1
/
client
/
job
/
CreateTask
kling v3.0 video generation
curl --request POST \
  --url https://api.crun.ai/api/v1/client/job/CreateTask \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "model": "kling/v3",
  "callback_url": "https://your-domain.com/api/callback",
  "input": {
    "mode": "pro",
    "multi_shots": true,
    "shot_type": "customize",
    "img_urls": [
      "https://example.com/reference-start.jpg"
    ],
    "multi_prompt": [
      {
        "prompt": "Wide shot of the explorer entering a ruined temple.",
        "duration": 4
      },
      {
        "prompt": "Medium shot as @hero lifts a glowing relic and dust falls from the ceiling.",
        "duration": 6
      }
    ],
    "element_list": [
      {
        "name": "hero",
        "description": "A young explorer wearing a yellow raincoat.",
        "element_image_urls": [
          "https://example.com/hero-1.jpg",
          "https://example.com/hero-2.jpg"
        ]
      }
    ],
    "duration": 10,
    "audio": true,
    "input_compliance": "enabled",
    "output_compliance": "enabled"
  }
}
'
{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "task_12345678"
  }
}

Overview

Kling Video 3.0 turns text descriptions or still images into video clips at up to 4K resolution. The model generates videos between 3 and 15 seconds—a significant jump from the 10-second limit of earlier versions. It handles realistic scenes, stylized content, and complex multi-step actions within a single generation. You can also generate native audio alongside the video, including dialogue with lip sync, sound effects, and ambient sound—all in one pass.

Key Rules

  • multi_shots is required on every request.
  • When multi_shots is false, prompt is required.
  • When multi_shots is true:
    • img_urls must contain exactly 1 image.
    • audio is automatically forced to true.
    • shot_type controls how multi-shot generation works:
      • customize: requires multi_prompt
      • intelligence: requires prompt
  • When shot_type is customize, the sum of all shot durations in multi_prompt must exactly equal duration.
  • In single-shot mode, img_urls supports 1 start frame or 2 frames for first/last frame control.
  • If img_urls is provided, aspect_ratio is ignored and the output follows the first image aspect ratio.
  • audio is forced to true in multi-shot mode.
  • element_list supports up to 3 elements, and each element accepts 1 to 4 reference images.

How to use it

Text to video

Describe what you want to see. The model generates visuals (and optionally audio) from your description. Usage Examples:
{
  "model": "kling/v3",
  "input": {
    "mode": "std",
    "multi_shots": false,
    "prompt": "An astronaut floats alone in deep space, Earth glowing blue behind them, camera slowly rotating around their helmet reflecting the stars.",
    "duration": 10,
    "aspect_ratio": "16:9",
    "audio": true
  }
}

Image to video

Upload a starting image and describe the motion you want. You can also provide an end image to guide where the video should land. Usage Examples:
{
  "model": "kling/v3",
  "input": {
    "mode": "std",
    "multi_shots": false,
    "prompt": "Cinematic drone footage of a dragon made of living fire soaring over a frozen Nordic fjord at twilight.",
    "img_urls": [
      "https://example.com/start_image.jpg"
    ],
    "duration": 15,
    "audio": true
  }
}

Multi-shot mode

For videos with multiple scenes, set multi_shots to true. There are two available multi-shot generation modes:

Validation Rules

  • When multi_shots=true and shot_type=customize:
    • multi_prompt is required
    • Total duration of all shots must equal duration
  • When multi_shots=true and shot_type=intelligence:
    • prompt is required
    • multi_prompt should not be provided
  • When multi_shots=false:
    • shot_type is automatically set to null

1. Customize Mode

Use shot_type="customize" together with multi_prompt to manually define each shot. Pass a JSON array of shot definitions, each with a prompt and duration. You can define up to 6 shots, with a minimum of 1 second per shot. The total duration of all shots must equal the duration parameter.

Example

{
  "model": "kling/v3",
  "input": {
    "mode": "pro",
    "multi_shots": true,
    "shot_type": "customize",
    "img_urls": [
      "https://example.com/reference-start.jpg"
    ],
    "multi_prompt": [
      {
        "prompt": "Wide shot of the explorer entering a ruined temple.",
        "duration": 4
      },
      {
        "prompt": "Medium shot as the explorer lifts a glowing relic and dust falls from the ceiling.",
        "duration": 6
      }
    ],
    "duration": 10,
    "audio": true
  }
}

2. Intelligence Mode

Use shot_type="intelligence" together with a single prompt. The model automatically analyzes the prompt and generates multiple cinematic shots intelligently.

Example

{
  "model": "kling/v3",
  "input": {
    "mode": "std",
    "multi_shots": true,
    "shot_type": "intelligence",
    "img_urls": [
      "https://example.com/reference-start.jpg"
    ],
    "prompt": "A lone samurai walks through a rainy cyberpunk city, neon reflections glowing on wet streets, cinematic atmosphere, dramatic camera transitions.",
    "duration": 10,
    "audio": true
  }
}

Element References

Define elements in the element_list array and you can use the @element_name syntax to reference images in the prompt.
{
  "model": "kling/v3",
  "input": {
    "mode": "pro",
    "multi_shots": false,
    "prompt": "In a bright rehearsal room, sunlight streams through the window @element_dog",
    "img_urls": [
      "https://example.com/reference_room.png"
    ],
    "element_list": [
      {
        "name": "element_dog",
        "description": "dog",
        "name": "hero",
        "description": "A young explorer wearing a yellow raincoat.",
        "element_image_urls": [
          "https://example.com/element_dog_1.png",
          "https://example.com/element_dog_2.png"
        ]
      }
    ],
    "duration": 10,
    "audio": true
  }
}

Query Task Status

After submitting a task, use the unified query endpoint to check progress and retrieve results:

Get Task Info

Learn how to query task status and retrieve generation results
For production use, we recommend using the callback_url parameter to receive automatic notifications when generation completes, rather than polling the status endpoint.

Models Overview

Explore all available models

Common API

Check credits and account usage

Authorizations

x-api-key
string
header
required

All APIs require authentication via API Key.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header:

x-api-key: YOUR_API_KEY

Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately in the management page

Body

application/json
model
enum<string>
required

The model name to use for generation. Required field.

  • Must be kling/v3 for this endpoint
Available options:
kling/v3
input
object
required

Kling-V3 high-level video generation. Supports standard/pro modes, multi-shot sequences, intelligent storyboard generation, and fine-grained element control.

callback_url
string<uri>

Optional. Callback URL for receiving task completion notifications.

  • System will POST task status and results to this URL when generation completes
  • Callback payloads structure is consistent with the data object returned by the task status query
  • Your callback endpoint should accept POST requests with JSON payload containing results
  • It returns an HTTP 200 status code upon successful receipt
Example:

"https://your-domain.com/api/callback"

Response

Request successful

code
enum<integer>

Response status code

  • 200: Success - Request has been processed successfully
  • 401: Unauthorized - Authentication credentials are missing or invalid
  • 402: Insufficient Credits - Account does not have enough credits to perform the operation
  • 404: Not Found - The requested resource or endpoint does not exist
  • 422: Validation Error - The request parameters failed validation checks
  • 429: Rate Limited - Request limit has been exceeded for this resource
  • 455: Service Unavailable - System is currently undergoing maintenance
  • 500: Server Error - An unexpected error occurred while processing the request
  • 501: Generation Failed - Content generation task failed
  • 505: Feature Disabled - The requested feature is currently disabled
Available options:
200,
401,
402,
404,
422,
429,
455,
500,
501,
505
message
string

Response message, error description when failed

Example:

"success"

data
object