Kling O3 API documentation
Integrate Kling O3 with your VezAPI key. The operations below share the same authentication and account balance.
https://api.vezapi.comSend 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
/api/v1/jobs/createTaskModel IDs: kling-3.0-omni/image-to-video
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | 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: Default: |
callBackUrloptional | 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 |
inputoptional | 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
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | 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: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | 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
/api/v1/jobs/createTaskModel IDs: kling-3.0-omni/reference-to-video
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | 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: Default: |
callBackUrloptional | 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 |
inputrequired | 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
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | 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: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | 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
/api/v1/jobs/createTaskModel IDs: kling-3.0-omni/text-to-video
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | 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: Default: |
callBackUrloptional | 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 |
inputrequired | 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.promptrequired | 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.
|
input.durationoptional | integer | Total video duration in seconds. The supported range is 3 to 15 seconds, and the default is 5 seconds. Values: Default:
|
input.resolutionoptional | 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: Default: |
input.aspect_ratiooptional | string | Aspect ratio of the generated video. Supported values are `16:9`, `9:16`, and `1:1`. Values: Default: |
input.multi_promptoptional | 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:
|
input.multi_prompt[].promptrequired | string | Video description for the current shot. Maximum length: 512 characters.
|
input.multi_prompt[].durationrequired | integer | Duration of this shot in seconds, 1–12. The sum of all shots must not exceed 15.
|
input.elementsoptional | 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[].namerequired | string | Subject name. It must be unique within the same request and can be referenced in the `prompt` field using `@name`.
|
input.elements[].descriptionrequired | string | Text description of the subject asset.
|
input.elements[].element_input_urlsrequired | 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.
|
input.elements[].element_input_audio_urlsoptional | array | Optional list of subject audio asset URLs. HTTP, HTTPS, and OSS URLs are supported. Default: |
input.audiooptional | boolean | Whether to add audio to the generated video. `true` enables audio; `false` disables audio. Default: |
input.customize_multi_shotsoptional | boolean | Optional, default false. Set true for custom multi-shot (multi_prompt required). Default: |
input.prefer_multi_shotsoptional | 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
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | 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: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
Kling 3.0 Omni Transformation
/api/v1/jobs/createTaskModel IDs: kling-3.0-omni/transformation
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | 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: Default: |
callBackUrloptional | 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 |
inputrequired | object | Input parameters for the generation task. |
input.promptoptional | string | Video description. It must not be empty after leading and trailing whitespace is removed. Maximum length: 3,072 characters.
|
input.video_urlsoptional | 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.
|
input.image_urlsoptional | 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.
|
input.durationoptional | string | Video duration. This field may be configured when using a video with images. |
input.resolutionoptional | string | Video resolution. `720p` outputs a 720p video, `1080p` outputs a 1080p video, and `4k` outputs a 4K video. Values: Default: |
input.aspect_ratiooptional | 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: Default: |
input.audiooptional | boolean | No audio is generated when a video is provided; set false. Values: |
input.elementsoptional | 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[].namerequired | string | Subject name. It must be unique within the same request and can be referenced in the `prompt` field using `@name`.
|
input.elements[].descriptionrequired | string | Text description of the subject asset.
|
input.elements[].element_input_urlsrequired | 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.
|
input.elements[].element_input_audio_urlsoptional | 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
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | 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: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | 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.