Skip to content
中文

Kling O3 API documentation

Integrate Kling O3 with your VezAPI key. The operations below share the same authentication and account balance.

Base URL: https://api.vezapi.com
Send Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.

Kling 3.0 Omni Image To Video

POST/api/v1/jobs/createTask

Model IDs: kling-3.0-omni/image-to-video

ParameterTypeDescription & constraints
model
required
string

The name of the model used to generate the task. This field is required. - This endpoint requires the `kling-3.0-omni/image-to-video` model

Values: "kling-3.0-omni/image-to-video"

Default: "kling-3.0-omni/image-to-video"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
optional
object

Input parameters for the generation task. Rules: (1) customize_multi_shots and prefer_multi_shots cannot both be true; (2) customize_multi_shots = true requires 1–6 multi_prompt shots (each 1–12 s, total ≤ 15 s); (3) otherwise omit multi_prompt; (4) aspect_ratio must be "auto" unless customize_multi_shots is true; with customize_multi_shots = true it must be 16:9, 9:16 or 1:1.

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "kling-3.0-omni/image-to-video",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "prompt": "A happy golden retriever running across a grassy field",
    "image_urls": [
      "https://example.com/input.png"
    ],
    "customize_multi_shots": false,
    "audio": false,
    "resolution": "720p",
    "aspect_ratio": "auto",
    "duration": 5,
    "elements": []
  }
}'
Responses and errors

HTTP 200

Request Successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Kling 3.0 Omni Reference To Video

POST/api/v1/jobs/createTask

Model IDs: kling-3.0-omni/reference-to-video

ParameterTypeDescription & constraints
model
required
string

The name of the model used to generate the task. This field is required. - This endpoint requires the `kling-3.0-omni/reference-to-video` model

Values: "kling-3.0-omni/reference-to-video"

Default: "kling-3.0-omni/reference-to-video"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the generation task. Rules: (1) customize_multi_shots and prefer_multi_shots cannot both be true; (2) customize_multi_shots = true requires 1–6 multi_prompt shots (each 1–12 s, total ≤ 15 s); (3) otherwise omit multi_prompt.

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "kling-3.0-omni/reference-to-video",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "prompt": "Generate a video of the character walking along a city street, using the character appearance in the reference images.",
    "image_urls": [
      "https://example.com/input.png"
    ],
    "customize_multi_shots": true,
    "multi_prompt": [
      {
        "prompt": "A wide shot of the character walking through the city.",
        "duration": 2
      },
      {
        "prompt": "A close-up of the character looking toward the camera.",
        "duration": 3
      }
    ],
    "audio": true,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "duration": 5,
    "elements": []
  }
}'
Responses and errors

HTTP 200

Request Successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Kling 3.0 Omni Text to Video

POST/api/v1/jobs/createTask

Model IDs: kling-3.0-omni/text-to-video

ParameterTypeDescription & constraints
model
required
string

The name of the model used to generate the task. This field is required. - This endpoint requires the `kling-3.0-omni/text-to-video` model

Values: "kling-3.0-omni/text-to-video"

Default: "kling-3.0-omni/text-to-video"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameter configuration for the generation task. Rules: (1) customize_multi_shots and prefer_multi_shots cannot both be true; (2) customize_multi_shots = true requires 1–6 multi_prompt shots (each 1–12 s, total ≤ 15 s); (3) otherwise omit multi_prompt.

input.prompt
required
string

Text description of the video. It must not be empty after leading and trailing whitespace is removed, and must not exceed 3,072 characters.

minLength: 1

maxLength: 3072

input.duration
optional
integer

Total video duration in seconds. The supported range is 3 to 15 seconds, and the default is 5 seconds.

Values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

Default: 5

minimum: 3

maximum: 15

input.resolution
optional
string

Resolution of the generated video. Available values are `720p` (outputs a 720p video), `1080p` (outputs a 1080p video), and `4k` (outputs a 4K video).

Values: "720p", "1080p", "4k"

Default: "720p"

input.aspect_ratio
optional
string

Aspect ratio of the generated video. Supported values are `16:9`, `9:16`, and `1:1`.

Values: "16:9", "9:16", "1:1"

Default: "16:9"

input.multi_prompt
optional
array

List of custom shots. When `customize_multi_shots` is `true`, this field is required, must not be empty, and supports up to 6 shots. When `customize_multi_shots` is `false`, it must be an empty array or omitted.

Default: []

maxItems: 6

input.multi_prompt[].prompt
required
string

Video description for the current shot. Maximum length: 512 characters.

minLength: 1

maxLength: 512

input.multi_prompt[].duration
required
integer

Duration of this shot in seconds, 1–12. The sum of all shots must not exceed 15.

minimum: 1

maximum: 12

input.elements
optional
array

List of one-time subject assets. The default is an empty array. When using only multi-image subjects, up to 7 subjects can be uploaded. When using only video character subjects, the number of video character subjects must not exceed 3. When using both video character and multi-image subjects, the number of video character subjects must not exceed 3, and the number of multi-image subjects must not exceed 4.

Default: []

input.elements[].name
required
string

Subject name. It must be unique within the same request and can be referenced in the `prompt` field using `@name`.

minLength: 1

input.elements[].description
required
string

Text description of the subject asset.

minLength: 1

input.elements[].element_input_urls
required
array

List of image URLs for a multi-image subject (provide 2 to 4 images), or a video URL for a video character subject (provide exactly 1 video). Images and videos cannot be mixed. HTTP, HTTPS, and OSS URLs are supported.

minItems: 1

maxItems: 4

input.elements[].element_input_audio_urls
optional
array

Optional list of subject audio asset URLs. HTTP, HTTPS, and OSS URLs are supported.

Default: []

input.audio
optional
boolean

Whether to add audio to the generated video. `true` enables audio; `false` disables audio.

Default: false

input.customize_multi_shots
optional
boolean

Optional, default false. Set true for custom multi-shot (multi_prompt required).

Default: false

input.prefer_multi_shots
optional
boolean

Whether to enable intelligent shot planning. This field is mutually exclusive with `customize_multi_shots`. Both fields may be `false`, but they cannot both be `true`.

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "kling-3.0-omni/text-to-video",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "prompt": "A wide shot of the fox entering the snowy forest.",
    "customize_multi_shots": true,
    "multi_prompt": [
      {
        "prompt": "A wide shot of the fox entering the snowy forest.",
        "duration": 2
      },
      {
        "prompt": "A cinematic close-up of the fox looking toward the sunrise.",
        "duration": 3
      }
    ],
    "audio": false,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "duration": 5
  }
}'
Responses and errors

HTTP 200

Request Successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Kling 3.0 Omni Transformation

POST/api/v1/jobs/createTask

Model IDs: kling-3.0-omni/transformation

ParameterTypeDescription & constraints
model
required
string

The name of the model used to generate the task. This field is required. - This endpoint requires the `kling-3.0-omni/transformation` model

Values: "kling-3.0-omni/transformation"

Default: "kling-3.0-omni/transformation"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the generation task.

input.prompt
optional
string

Video description. It must not be empty after leading and trailing whitespace is removed. Maximum length: 3,072 characters.

minLength: 1

maxLength: 3072

input.video_urls
optional
array

Array of video URLs. Exactly 1 video is required. HTTP, HTTPS, and OSS URLs are supported. Videos must be in MP4 or MOV format; each file must not exceed 200 MB; duration must be between 3 and 15.5 seconds; width and height must each be between 700 and 4,553 px; total pixels must not exceed 8,294,400; the aspect ratio must be between 0.4 and 2; and the frame rate must be between 24 and 60 fps.

minItems: 1

maxItems: 1

input.image_urls
optional
array

Array of image URLs. The maximum number of images depends on the number and types of reference subjects. When using only multi-image subjects, the combined number of reference images and multi-image subjects must not exceed 4. Video character subjects cannot be used together with multi-image subjects or reference images. HTTP, HTTPS, and OSS URLs are supported. Images must be in JPG, JPEG, or PNG format; each file must not exceed 50 MB; both width and height must be at least 300 px; and the aspect ratio must be between 0.4 and 2.5.

maxItems: 4

input.duration
optional
string

Video duration. This field may be configured when using a video with images.

input.resolution
optional
string

Video resolution. `720p` outputs a 720p video, `1080p` outputs a 1080p video, and `4k` outputs a 4K video.

Values: "720p", "1080p", "4k"

Default: "720p"

input.aspect_ratio
optional
string

Video aspect ratio. Only `auto` can be used with video-only input. When using a video with images, `16:9`, `9:16`, and `1:1` are supported; `auto` is not supported.

Values: "16:9", "9:16", "1:1", "auto"

Default: "16:9"

input.audio
optional
boolean

No audio is generated when a video is provided; set false.

Values: false, true

input.elements
optional
array

List of one-time subject assets. The default is an empty array. When using only multi-image subjects, up to 7 subjects can be uploaded. When using only video character subjects, the number of video character subjects must not exceed 3. When using both video character and multi-image subjects, the number of video character subjects must not exceed 3, and the number of multi-image subjects must not exceed 4.

Default: []

input.elements[].name
required
string

Subject name. It must be unique within the same request and can be referenced in the `prompt` field using `@name`.

minLength: 1

input.elements[].description
required
string

Text description of the subject asset.

minLength: 1

input.elements[].element_input_urls
required
array

List of image URLs for a multi-image subject (provide 2 to 4 images), or a video URL for a video character subject (provide exactly 1 video). Images and videos cannot be mixed. HTTP, HTTPS, and OSS URLs are supported.

minItems: 1

maxItems: 4

input.elements[].element_input_audio_urls
optional
array

Optional list of subject audio asset URLs. HTTP, HTTPS, and OSS URLs are supported.

Default: []

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "kling-3.0-omni/transformation",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "prompt": "Transform the input video into a cinematic night scene while preserving the character movements from the original video.",
    "video_urls": [
      "https://example.com/input.png"
    ],
    "resolution": "720p",
    "aspect_ratio": "auto",
    "audio": false
  }
}'
Responses and errors

HTTP 200

Request Successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Task status and callbacks

For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.

A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.

Files, logs and billing

Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.

Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.