Kling 4.0 API, Kling Video V3 Turbo Pro API, Kling Video O3 4K & Kling Image O3 API: Pricing, Documentation
by Kuaishou
Kling API gives developers and businesses a powerful framework to integrate next-generation image and video generation capabilities directly into their software environments. By utilizing advanced text-to-video and image-to-video capabilities, it translates simple prompts and static visuals into cinematic, high-definition videos with remarkable motion control and structural coherence. The architecture delivers low-latency endpoints optimized for high-fidelity visual rendering, enabling platforms to automate large-scale content pipelines and generate dynamic media assets instantly.
Models Version
Get 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
Kling 4.0 API Documentation
Generate a video from a text prompt with Kling 4.0. You choose the length (duration, 3 to 30 seconds), the resolution (resolution, 720p or 1080p) and the frame shape (aspect_ratio). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.
POST https://gateway.pixazo.ai/kling-video-v4/v1/text-to-videoAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Video - Kling 4.0
Request Code
POST https://gateway.pixazo.ai/kling-video-v4/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.",
"duration": 5,
"resolution": "1080p"
}import requests
url = "https://gateway.pixazo.ai/kling-video-v4/v1/text-to-video"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.",
"duration": 5,
"resolution": "1080p"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/kling-video-v4/v1/text-to-video", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.",
"duration": 5,
"resolution": "1080p"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/text-to-video' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.", "duration": 5, "resolution": "1080p"}'Output
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Example: enable Webhook
curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/text-to-video' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
-H 'X-Webhook-URL: https://your-server.com/webhook' \
--data-raw '{"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.", "duration": 5, "resolution": "1080p"}'Callback Payload (success)
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Failure callback shape
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v4",
"error": "Description of the failure"
}Delivery semantics
- terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
- sync mode: a Webhook callback on every poll while the request is processing (status
PROCESSING), plus the final COMPLETED/ERROR callback. - Callbacks are idempotent on
request_id— de-duplicate on it. - Respond
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Non-empty text, up to 26000 characters | What happens in the video: the scene, the action, the camera movement and the mood. |
duration | No | integer | 5 | 3–30 | Requested length of the video in whole seconds. Billing is per requested second. |
resolution | No | string | "1080p" | 720p, 1080p | Output resolution, written exactly as listed. 1080p costs more per second than 720p. |
aspect_ratio | No | string | "16:9" | 16:9, 9:16, 1:1, 21:9 | Frame shape of the video. It does not change the amount billed. |
Not available on this API: multi_prompt (a list of prompts, one per shot). A request that sends it is rejected with a 400 before anything is charged.
Good to know
- Each request returns one video.
batch_size,num_images,number_of_images,n,countandnum_videosare rejected — send one request per video. - Set the length with
duration, in whole seconds from 3 to 30 (5 when you leave it out);seconds,num_frames,frames_per_secondandmusic_length_msare rejected. - Set the resolution with
resolution:720por1080p, written exactly as listed (1080p when you leave it out). - Send every field at the top level of the JSON body, with the text in
prompt;parameters,input,contentandtextare rejected. - Text-to-video takes no images:
start_image_url,end_image_url,image_urls,image_url,image,images,reference_image_urls,first_frame_url,last_frame_urlandtail_image_urlare rejected (use the Image to Video or Reference to Video operation). - Omit a field instead of sending null.
- Use the JSON types shown:
durationis a whole number (5, not"5"). - Results are always returned as a URL in
output.media_url;sync_modeis accepted only asfalse. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_url,webhook_modeandcallback_urlin the JSON body are rejected. - Reference videos are taken only by the Reference to Video operation;
videos,video_url,video_urlsandaudio_urlare rejected here. - Options this API does not offer are rejected:
model,multi_prompt,elements,seed,negative_prompt,cfg_scale,generate_audio,shot_type,enable_safety_checker,voice_idsandstream.
Length and Resolution
Set duration to the length you want in whole seconds, from 3 to 30; 5 applies when you leave it out. Set resolution to one of the values below; 1080p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more.
| resolution | Note |
|---|---|
720p | The lower cost per second |
1080p | The default; the higher cost per second |
Example: a 10-second vertical video at 720p
{
"prompt": "A paper boat drifts down a rain-soaked street at dusk, reflections on the water.",
"aspect_ratio": "9:16",
"duration": 10,
"resolution": "720p"
}Aspect Ratio
Set aspect_ratio to 16:9, 9:16, 1:1 or 21:9; 16:9 applies when you leave it out. It does not change the amount billed.
Example: a 21:9 wide video
{
"prompt": "Waves roll onto a quiet beach at sunrise.",
"aspect_ratio": "21:9",
"duration": 5,
"resolution": "1080p"
}Example Request
{
"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.",
"duration": 5,
"resolution": "1080p"
}Example Response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty prompt, prompt not a string, or longer than 26000 characters | synchronous 400 |
resolution not one of the allowed values (written exactly as listed) | synchronous 400 |
aspect_ratio not one of the allowed values (written exactly as listed) | synchronous 400 |
duration not a whole number from 3 to 30 — for example 2, 31 or the string "5" | synchronous 400 |
sync_mode set to anything other than false (results are always returned as a URL in output.media_url) | synchronous 400 |
batch_size, num_images, number_of_images, n, count, num_videos (one video per request) | synchronous 400 |
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds) | synchronous 400 |
parameters, input, content, text (send the fields at the top level of the JSON body, the text in prompt) | synchronous 400 |
start_image_url, end_image_url (images go to the Image to Video operation) | synchronous 400 |
image_urls (reference images go to the Reference to Video operation) | synchronous 400 |
image_url, image, images, reference_image_urls, first_frame_url, last_frame_url, tail_image_url (text-to-video takes no images) | synchronous 400 |
videos, video_url, video_urls, audio_url (reference videos go to the Reference to Video operation) | synchronous 400 |
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers) | synchronous 400 |
model, multi_prompt, elements, seed, negative_prompt, cfg_scale, generate_audio, shot_type, enable_safety_checker, voice_ids, stream (not offered on this API) | synchronous 400 |
| A prompt the model refuses, for example under its content policy | status: "ERROR" |
Example error responses
A request refused for its parameters returns error, a message that joins every problem found, and the same problems one by one in violations.
Missing prompt (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'prompt' is required",
"violations": [
"'prompt' is required"
]
}A value that is not allowed (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")",
"violations": [
"'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")"
]
}A value out of range (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'duration' must be <= 30 (got 31)",
"violations": [
"'duration' must be <= 30 (got 31)"
]
}A number sent as a string (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'duration' must be integer (got string)",
"violations": [
"'duration' must be integer (got string)"
]
}More than one video per request (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'num_images' must be one of: (got 2); 'num_images' is not supported: Kling 4.0 returns one video per request. Send one request per video.",
"violations": [
"'num_images' must be one of: (got 2)",
"'num_images' is not supported: Kling 4.0 returns one video per request. Send one request per video."
]
}Retrieving Results
Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEYcURL example
curl 'https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — kling-video-v4 for this endpoint. |
| output.media_url | array of strings | URL of the video (one MP4 file per request). |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/kling-video-v4/v1/text-to-video. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.media_url.
How Billing Is Measured
Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (1080p when you leave it out) times duration (5 seconds when you leave it out). 1080p videos cost more per second than 720p videos. The prompt and the aspect ratio do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.
Kling 4.0 API Pricing
Billed per second of video at the requested resolution (720p or 1080p). 1080p and 5 seconds are the defaults; duration can be 3 to 30 seconds.
| Resolution | Price (USD) |
|---|---|
| 1080p / per second | $0.235 |
| 720p / per second | $0.157 |
| 1080p with reference videos / per second | $0.141 |
| 720p with reference videos / per second | $0.094 |
| 1080p video editing / per second | $0.141 |
| 720p video editing / per second | $0.094 |
Kling 4.0 API Documentation
Animate an image with Kling 4.0: send the first frame in start_image_url, optionally the last frame in end_image_url, and a prompt describing how the video unfolds. You choose the length (duration, 3 to 30 seconds) and the resolution (resolution, 720p or 1080p). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.
POST https://gateway.pixazo.ai/kling-video-v4/v1/image-to-videoAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Video - Kling 4.0
Request Code
POST https://gateway.pixazo.ai/kling-video-v4/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"duration": 5,
"resolution": "1080p"
}import requests
url = "https://gateway.pixazo.ai/kling-video-v4/v1/image-to-video"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"duration": 5,
"resolution": "1080p"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/kling-video-v4/v1/image-to-video", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"duration": 5,
"resolution": "1080p"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/image-to-video' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.", "start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "1080p"}'Output
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Example: enable Webhook
curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/image-to-video' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
-H 'X-Webhook-URL: https://your-server.com/webhook' \
--data-raw '{"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.", "start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "1080p"}'Callback Payload (success)
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Failure callback shape
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v4",
"error": "Description of the failure"
}Delivery semantics
- terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
- sync mode: a Webhook callback on every poll while the request is processing (status
PROCESSING), plus the final COMPLETED/ERROR callback. - Callbacks are idempotent on
request_id— de-duplicate on it. - Respond
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
start_image_url | Yes | string | — | One image of up to 30 MB: a publicly reachable https URL (recommended, especially for a large file) or a data URI | The first frame of the video. Use a PNG or JPEG file at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. |
end_image_url | No | string | — | One image of up to 30 MB: a publicly reachable https URL (recommended, especially for a large file) or a data URI | The last frame of the video. Use a PNG or JPEG file at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. It does not change the amount billed. |
prompt | Yes | string | — | Non-empty text, up to 26000 characters | How the video unfolds from the image: the motion, the camera movement and the mood. |
duration | No | integer | 5 | 3–30 | Requested length of the video in whole seconds. Billing is per requested second. |
resolution | No | string | "1080p" | 720p, 1080p | Output resolution, written exactly as listed. 1080p costs more per second than 720p. |
Not available on this API: multi_prompt (a list of prompts, one per shot). A request that sends it is rejected with a 400 before anything is charged.
Good to know
- Each request returns one video.
batch_size,num_images,number_of_images,n,countandnum_videosare rejected — send one request per video. - Set the length with
duration, in whole seconds from 3 to 30 (5 when you leave it out);seconds,num_frames,frames_per_secondandmusic_length_msare rejected. - Set the resolution with
resolution:720por1080p, written exactly as listed (1080p when you leave it out). - Send every field at the top level of the JSON body, with the text in
prompt;parameters,input,contentandtextare rejected. - Send the first frame as
start_image_urland, optionally, the last frame asend_image_url; image-to-video takes no frame shape, andimage_urls,aspect_ratio,image_url,image,images,reference_image_urls,first_frame_url,last_frame_urlandtail_image_urlare rejected. - Omit a field instead of sending null.
- Use the JSON types shown:
durationis a whole number (5, not"5"). - Results are always returned as a URL in
output.media_url;sync_modeis accepted only asfalse. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_url,webhook_modeandcallback_urlin the JSON body are rejected. - Reference videos are taken only by the Reference to Video operation;
videos,video_url,video_urlsandaudio_urlare rejected here. - Options this API does not offer are rejected:
model,multi_prompt,elements,seed,negative_prompt,cfg_scale,generate_audio,shot_type,enable_safety_checker,voice_idsandstream.
Length and Resolution
Set duration to the length you want in whole seconds, from 3 to 30; 5 applies when you leave it out. Set resolution to one of the values below; 1080p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more.
| resolution | Note |
|---|---|
720p | The lower cost per second |
1080p | The default; the higher cost per second |
Example: a 10-second video at 720p
{
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Slow orbit around the subject, soft morning light.",
"duration": 10,
"resolution": "720p"
}Source Image
- Send the first frame in
start_image_url: a publicly reachablehttpsURL (recommended) or a data URI such asdata:image/png;base64,.... A list of images is rejected. - Optionally send the last frame in
end_image_url, in the same form. It does not change the amount billed. - Use PNG or JPEG files. Each image, the last frame included, must be at most 30 MB, at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. For a large image, use an
httpsURL rather than a data URI. Each image is downloaded when you submit: a URL that cannot be downloaded, or a very large file, may be refused at once with a400, with nothing charged. - Image-to-video takes no
aspect_ratio: your image is the first frame. The video keeps the aspect ratio of your image. - Describe how the video unfolds in
prompt(required). - Image-to-video output includes generated sound.
Example: a first and a last frame
{
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "The subject waves at the camera, then turns back to the first pose.",
"duration": 5,
"resolution": "720p"
}Example Request
{
"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"duration": 5,
"resolution": "1080p"
}Example Response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or the image could not be downloaded. The message says what to fix. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. An image that cannot be downloaded is also refused at submit with a 400, and its hold is released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty prompt, prompt not a string, or longer than 26000 characters | synchronous 400 |
Missing or empty start_image_url, or start_image_url sent as anything other than a single https URL or data URI | synchronous 400 |
A start_image_url or end_image_url that cannot be downloaded when you submit, or that returns a web page or an empty file instead of an image (the hold is released at once: nothing is charged) | synchronous 400 |
resolution not one of the allowed values (written exactly as listed) | synchronous 400 |
duration not a whole number from 3 to 30 — for example 2, 31 or the string "5" | synchronous 400 |
end_image_url not a single string, or not an http(s) URL or a data URI | synchronous 400 |
sync_mode set to anything other than false (results are always returned as a URL in output.media_url) | synchronous 400 |
batch_size, num_images, number_of_images, n, count, num_videos (one video per request) | synchronous 400 |
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds) | synchronous 400 |
parameters, input, content, text (send the fields at the top level of the JSON body, the text in prompt) | synchronous 400 |
image_urls (reference images go to the Reference to Video operation) | synchronous 400 |
aspect_ratio (image-to-video takes no frame shape) | synchronous 400 |
image_url, image, images, reference_image_urls, first_frame_url, last_frame_url, tail_image_url (send the first frame as start_image_url) | synchronous 400 |
videos, video_url, video_urls, audio_url (reference videos go to the Reference to Video operation) | synchronous 400 |
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers) | synchronous 400 |
model, multi_prompt, elements, seed, negative_prompt, cfg_scale, generate_audio, shot_type, enable_safety_checker, voice_ids, stream (not offered on this API) | synchronous 400 |
| An image the model cannot use, for example a file that is not an image, or one smaller than 300 px on either side or outside a width-to-height ratio of 2:5 to 5:2 | status: "ERROR" |
| A prompt or image the model refuses, for example under its content policy | status: "ERROR" |
Example error responses
A request refused for its parameters returns error, a message that joins every problem found, and the same problems one by one in violations. A request refused because an image could not be downloaded or used returns error set to "Asset proxy failed", a message naming the first image that failed and why, and each failed image with its reason in failures.
Missing start_image_url (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'start_image_url' is required",
"violations": [
"'start_image_url' is required"
]
}A value that is not allowed (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"1440p\")",
"violations": [
"'resolution' must be one of: \"720p\", \"1080p\" (got \"1440p\")"
]
}A value out of range (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'duration' must be >= 3 (got 2)",
"violations": [
"'duration' must be >= 3 (got 2)"
]
}A number sent as a string (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'duration' must be integer (got string)",
"violations": [
"'duration' must be integer (got string)"
]
}A field this API does not accept (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'video_url' must be one of: (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\"); 'video_url' is not accepted: reference-to-video takes reference videos as a list in 'video_urls' (up to 5).",
"violations": [
"'video_url' must be one of: (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\")",
"'video_url' is not accepted: reference-to-video takes reference videos as a list in 'video_urls' (up to 5)."
]
}Retrieving Results
Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEYcURL example
curl 'https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — kling-video-v4 for this endpoint. |
| output.media_url | array of strings | URL of the video (one MP4 file per request). |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/kling-video-v4/v1/image-to-video. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.media_url.
How Billing Is Measured
Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (1080p when you leave it out) times duration (5 seconds when you leave it out). 1080p videos cost more per second than 720p videos. The prompt and the first and last frames do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.
Kling 4.0 API Pricing
Billed per second of video at the requested resolution (720p or 1080p); the start and end images do not change the price. 1080p and 5 seconds are the defaults; duration can be 3 to 30 seconds.
| Resolution | Price (USD) |
|---|---|
| 1080p / per second | $0.235 |
| 720p / per second | $0.157 |
| 1080p with reference videos / per second | $0.141 |
| 720p with reference videos / per second | $0.094 |
| 1080p video editing / per second | $0.141 |
| 720p video editing / per second | $0.094 |
Kling 4.0 API Documentation
Generate a new scene with Kling 4.0 from references: send up to 9 images in image_urls and up to 5 videos in video_urls, refer to them in prompt as @Image1, @Image2 and @Video1, @Video2 and so on, and optionally set the first frame in start_image_url. You choose the length (3 to 30 seconds), the resolution (720p or 1080p) and the frame shape (aspect_ratio). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.
POST https://gateway.pixazo.ai/kling-video-v4/v1/reference-to-videoAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Reference to Video - Kling 4.0
Request Code
POST https://gateway.pixazo.ai/kling-video-v4/v1/reference-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "The person in @Image1 walks through a busy street market at dusk.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"duration": 5,
"resolution": "1080p"
}import requests
url = "https://gateway.pixazo.ai/kling-video-v4/v1/reference-to-video"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "The person in @Image1 walks through a busy street market at dusk.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"duration": 5,
"resolution": "1080p"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/kling-video-v4/v1/reference-to-video", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "The person in @Image1 walks through a busy street market at dusk.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"duration": 5,
"resolution": "1080p"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/reference-to-video' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"prompt": "The person in @Image1 walks through a busy street market at dusk.", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "duration": 5, "resolution": "1080p"}'Output
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Example: enable Webhook
curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/reference-to-video' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
-H 'X-Webhook-URL: https://your-server.com/webhook' \
--data-raw '{"prompt": "The person in @Image1 walks through a busy street market at dusk.", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "duration": 5, "resolution": "1080p"}'Callback Payload (success)
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Failure callback shape
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v4",
"error": "Description of the failure"
}Delivery semantics
- terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
- sync mode: a Webhook callback on every poll while the request is processing (status
PROCESSING), plus the final COMPLETED/ERROR callback. - Callbacks are idempotent on
request_id— de-duplicate on it. - Respond
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Non-empty text, up to 26000 characters | The new scene; refer to your reference images as @Image1, @Image2 and so on, in the order of image_urls, and to your reference videos as @Video1, @Video2 and so on, in the order of video_urls. |
image_urls | No | array | — | 1–9 images, each up to 30 MB; required unless you send video_urls | Reference images of the people, products or places for the scene: publicly reachable https URLs (recommended) or data URIs, as PNG or JPEG files at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. They do not change the amount billed. |
start_image_url | No | string | — | One image of up to 30 MB: a publicly reachable https URL (recommended, especially for a large file) or a data URI | An optional first frame for the scene. Use a PNG or JPEG file at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. It does not change the amount billed. |
video_urls | No | array | — | 1–5 videos, each 3 to 30 seconds and up to 300 MB; 30 seconds in total | Reference videos for the scene, referred to in the prompt as @Video1, @Video2 and so on, in the order of video_urls: publicly reachable https URLs of MP4 or MOV files (data URIs are not accepted), at least 700 and at most 4553 pixels on each side, with a width-to-height ratio from 2:5 to 5:2. Sending any switches the whole request to the reference-video rate (see How Billing Is Measured). |
duration | No | integer | 5 | 3–30 | Requested length of the video in whole seconds. Billing is per requested second. |
resolution | No | string | "1080p" | 720p, 1080p | Output resolution, written exactly as listed. 1080p costs more per second than 720p. |
aspect_ratio | No | string | "16:9" | auto, 16:9, 9:16, 1:1, 21:9 | Frame shape of the video. It does not change the amount billed. auto adapts it to your references. |
Not available on this API: multi_prompt (a list of prompts, one per shot) and elements (characters or objects, including voices). A request that sends either is rejected with a 400 before anything is charged.
Good to know
- Each request returns one video.
batch_size,num_images,number_of_images,n,countandnum_videosare rejected — send one request per video. - Set the length with
duration, in whole seconds from 3 to 30 (5 when you leave it out);seconds,num_frames,frames_per_secondandmusic_length_msare rejected. - Set the resolution with
resolution:720por1080p, written exactly as listed (1080p when you leave it out). - Send every field at the top level of the JSON body, with the text in
prompt;parameters,input,contentandtextare rejected. - Send up to 9 reference images in
image_urlsand up to 5 reference videos invideo_urls(at least one image or video) and refer to them in the prompt as @Image1, @Image2 and @Video1, @Video2 and so on; an optional first frame goes instart_image_url;end_image_url,image_url,image,images,reference_image_urls,first_frame_url,last_frame_urlandtail_image_urlare rejected. - Omit a field instead of sending null.
- Use the JSON types shown:
durationis a whole number (5, not"5"). - Results are always returned as a URL in
output.media_url;sync_modeis accepted only asfalse. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_url,webhook_modeandcallback_urlin the JSON body are rejected. - Reference videos go in
video_urls, as a list;videos,video_urlandaudio_urlare rejected. - Options this API does not offer are rejected:
model,multi_prompt,elements,seed,negative_prompt,cfg_scale,generate_audio,shot_type,enable_safety_checker,voice_idsandstream.
Length and Resolution
Set duration to the length you want in whole seconds, from 3 to 30; 5 applies when you leave it out. Set resolution to one of the values below; 1080p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more.
| resolution | Note |
|---|---|
720p | The lower cost per second |
1080p | The default; the higher cost per second |
Example: a 10-second scene at 720p
{
"prompt": "The person in @Image1 walks along a beach at sunset.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"duration": 10,
"resolution": "720p"
}References
- Send up to 9 images in
image_urls(at least one), and refer to them inpromptas @Image1, @Image2 and so on, in the order of the list. - Optionally set the first frame in
start_image_url. Reference images and the first frame do not change the amount billed. - Use publicly reachable
httpsURLs (recommended) or data URIs, as PNG or JPEG files. Each image, the first frame included, must be at most 30 MB, at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. For a large image, use anhttpsURL rather than a data URI. Very many or very large inputs may be refused at once with a 400, with nothing charged; so is any URL that cannot be downloaded. - Send up to 5 reference videos in
video_urlsand refer to them inpromptas @Video1, @Video2 and so on, in the order of the list. Each must be an MP4 or MOV file of 3 to 30 seconds and up to 300 MB, at least 700 and at most 4553 pixels on each side, with a width-to-height ratio from 2:5 to 5:2; together they may run at most 30 seconds. Use publicly reachablehttpsURLs: data URIs are not accepted for videos. - Reference videos are measured when you submit, all of them within 6 seconds. A video that cannot be read or measured in that time, a fragmented MP4 (re-save it as a regular MP4), or one outside these limits is refused at once with a
400, with nothing charged. With any reference video, the request is billed at the reference-video rate on the videos' total length plusduration. - A reference image or first frame the model cannot use ends the request with
status: "ERROR", and its hold is released.
Example: two reference images in a square frame
{
"prompt": "The people in @Image1 and @Image2 share a meal at a street cafe.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"aspect_ratio": "1:1",
"duration": 6,
"resolution": "1080p"
}Aspect Ratio
Set aspect_ratio to auto, 16:9, 9:16, 1:1 or 21:9; 16:9 applies when you leave it out, and auto adapts the frame shape to your references. It does not change the amount billed.
Example Request
{
"prompt": "The person in @Image1 walks through a busy street market at dusk.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"duration": 5,
"resolution": "1080p"
}Example Response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input could not be downloaded. The message says what to fix. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. An input that cannot be downloaded is also refused at submit with a 400, and so may be very many or very large inputs; the hold is then released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty prompt, prompt not a string, or longer than 26000 characters | synchronous 400 |
Neither image_urls nor video_urls sent (send at least one reference image or video) | synchronous 400 |
| A reference video that is not an http(s) URL, cannot be read as an MP4 or MOV file when you submit, is a fragmented MP4, cannot be measured within 6 seconds, is shorter than 3 or longer than 30 seconds, brings the reference videos over 30 seconds in total, is under 700 or over 4553 pixels on a side, has a width-to-height ratio outside 2:5 to 5:2, or is over 300 MB (refused before any hold: nothing is charged) | synchronous 400 |
| A reference or first-frame URL that cannot be downloaded when you submit or that returns a web page or an empty file instead of an image, or very many or very large inputs (the hold is released at once: nothing is charged) | synchronous 400 |
image_urls not a list or empty, or more than 9 items | synchronous 400 |
video_urls not a list or empty, or more than 5 items | synchronous 400 |
resolution not one of the allowed values (written exactly as listed) | synchronous 400 |
aspect_ratio not one of the allowed values (written exactly as listed) | synchronous 400 |
duration not a whole number from 3 to 30 — for example 2, 31 or the string "5" | synchronous 400 |
start_image_url not a single string, or not an http(s) URL or a data URI | synchronous 400 |
sync_mode set to anything other than false (results are always returned as a URL in output.media_url) | synchronous 400 |
batch_size, num_images, number_of_images, n, count, num_videos (one video per request) | synchronous 400 |
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds) | synchronous 400 |
parameters, input, content, text (send the fields at the top level of the JSON body, the text in prompt) | synchronous 400 |
end_image_url (reference-to-video takes no last frame; an optional first frame goes in start_image_url) | synchronous 400 |
image_url, image, images, reference_image_urls, first_frame_url, last_frame_url, tail_image_url (send reference images in image_urls) | synchronous 400 |
videos, video_url, audio_url (send reference videos as a list in video_urls) | synchronous 400 |
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers) | synchronous 400 |
model, multi_prompt, elements, seed, negative_prompt, cfg_scale, generate_audio, shot_type, enable_safety_checker, voice_ids, stream (not offered on this API) | synchronous 400 |
| A reference image or first frame the model cannot use, for example a file that is not an image, or one smaller than 300 px on either side or outside a width-to-height ratio of 2:5 to 5:2 | status: "ERROR" |
| A prompt or reference image the model refuses, for example under its content policy | status: "ERROR" |
Example error responses
A request refused for its parameters returns error, a message that joins every problem found, and the same problems one by one in violations. A request refused because an image could not be downloaded or used returns error set to "Asset proxy failed", a message naming the first image that failed and why, and each failed image with its reason in failures.
Missing prompt (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'prompt' is required",
"violations": [
"'prompt' is required"
]
}More than 9 reference images (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'image_urls' must have at most 9 items (got 10)",
"violations": [
"'image_urls' must have at most 9 items (got 10)"
]
}A value that is not allowed (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'aspect_ratio' must be one of: \"auto\", \"16:9\", \"9:16\", \"1:1\", \"21:9\" (got \"32:9\")",
"violations": [
"'aspect_ratio' must be one of: \"auto\", \"16:9\", \"9:16\", \"1:1\", \"21:9\" (got \"32:9\")"
]
}A length field other than duration (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'seconds' must be one of: (got 8); 'seconds' is not supported. Set the length with 'duration' (whole seconds, 3-30).",
"violations": [
"'seconds' must be one of: (got 8)",
"'seconds' is not supported. Set the length with 'duration' (whole seconds, 3-30)."
]
}More than one video per request (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'num_images' must be one of: (got 2); 'num_images' is not supported: Kling 4.0 returns one video per request. Send one request per video.",
"violations": [
"'num_images' must be one of: (got 2)",
"'num_images' is not supported: Kling 4.0 returns one video per request. Send one request per video."
]
}Retrieving Results
Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEYcURL example
curl 'https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — kling-video-v4 for this endpoint. |
| output.media_url | array of strings | URL of the video (one MP4 file per request). |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/kling-video-v4/v1/reference-to-video. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.media_url.
How Billing Is Measured
Without reference videos, billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (1080p when you leave it out) times duration (5 seconds when you leave it out). With reference videos in video_urls, the whole request is billed at the reference-video rate for the resolution instead, on the total length of the reference videos plus duration, and never on less than twice duration: a 5-second video with one 3-second reference video is billed as 10 seconds, and with one 12-second reference video as 17 seconds. The reference videos are measured from the files when you submit, and their total is rounded up to a whole second. 1080p videos cost more per second than 720p videos, with or without reference videos. The prompt, aspect ratio, first frame and reference images do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.
Kling 4.0 API Pricing
Billed per second of video at the requested resolution (720p or 1080p); reference images do not change the price. With reference videos, billing counts the videos' length plus the output length, and never less than twice the output. 1080p and 5 seconds are the defaults; duration can be 3 to 30 seconds.
| Resolution | Price (USD) |
|---|---|
| 1080p / per second | $0.235 |
| 720p / per second | $0.157 |
| 1080p with reference videos / per second | $0.141 |
| 720p with reference videos / per second | $0.094 |
| 1080p video editing / per second | $0.141 |
| 720p video editing / per second | $0.094 |
Kling 4.0 API Documentation
Edit a video with Kling 4.0: send the video to edit in video_url, describe the change in prompt (refer to the video as @Video1), and optionally add up to 10 reference images in image_urls (@Image1, @Image2 and so on). You choose the resolution (resolution, 720p or 1080p) and, optionally, the length of the edited video (duration, 3 to 30 seconds); when you leave it out, the edited video is as long as your video, rounded up to a whole second. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.
POST https://gateway.pixazo.ai/kling-video-v4/v1/v2v-editAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Video Editing - Kling 4.0
Request Code
POST https://gateway.pixazo.ai/kling-video-v4/v1/v2v-edit
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Change the background of @Video1 to a sunny beach, keeping the person and the motion as they are.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
"duration": 5,
"resolution": "1080p"
}import requests
url = "https://gateway.pixazo.ai/kling-video-v4/v1/v2v-edit"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Change the background of @Video1 to a sunny beach, keeping the person and the motion as they are.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
"duration": 5,
"resolution": "1080p"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/kling-video-v4/v1/v2v-edit", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "Change the background of @Video1 to a sunny beach, keeping the person and the motion as they are.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
"duration": 5,
"resolution": "1080p"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/v2v-edit' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"prompt": "Change the background of @Video1 to a sunny beach, keeping the person and the motion as they are.", "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4", "duration": 5, "resolution": "1080p"}'Output
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Example: enable Webhook
curl -X POST 'https://gateway.pixazo.ai/kling-video-v4/v1/v2v-edit' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
-H 'X-Webhook-URL: https://your-server.com/webhook' \
--data-raw '{"prompt": "Change the background of @Video1 to a sunny beach, keeping the person and the motion as they are.", "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4", "duration": 5, "resolution": "1080p"}'Callback Payload (success)
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Failure callback shape
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v4",
"error": "Description of the failure"
}Delivery semantics
- terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
- sync mode: a Webhook callback on every poll while the request is processing (status
PROCESSING), plus the final COMPLETED/ERROR callback. - Callbacks are idempotent on
request_id— de-duplicate on it. - Respond
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
video_url | Yes | string | — | One MP4 or MOV video of 3 to 30 seconds and up to 300 MB: a publicly reachable https URL (data URIs are not accepted) | The video to edit, referred to in the prompt as @Video1. It must be at least 700 and at most 4553 pixels on each side, with a width-to-height ratio from 2:5 to 5:2. Its length counts toward the amount billed (see How Billing Is Measured). |
prompt | Yes | string | — | Non-empty text, up to 26000 characters | What to change in the video: refer to the video as @Video1 and to your reference images as @Image1, @Image2 and so on, in the order of image_urls. |
image_urls | No | array | — | 1–10 images, each up to 30 MB | Reference images for the edit, for example a new background or a product: publicly reachable https URLs (recommended) or data URIs, as PNG or JPEG files at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. They do not change the amount billed. |
duration | No | integer | The length of video_url, rounded up | 3–30 | Length of the edited video in whole seconds. When you leave it out, the edited video is as long as your video, rounded up to a whole second (3 to 30). Billing counts the length of your video plus this length (see How Billing Is Measured). |
resolution | No | string | "1080p" | 720p, 1080p | Output resolution, written exactly as listed. 1080p costs more per second than 720p. |
Not available on this API: multi_prompt (a list of prompts, one per shot) and elements (characters or objects, including voices). A request that sends either is rejected with a 400 before anything is charged.
Good to know
- Each request returns one video.
batch_size,num_images,number_of_images,n,countandnum_videosare rejected — send one request per video. - Set the length of the edited video with
duration, in whole seconds from 3 to 30 (the length of your video, rounded up to a whole second, when you leave it out);seconds,num_frames,frames_per_secondandmusic_length_msare rejected. - Set the resolution with
resolution:720por1080p, written exactly as listed (1080p when you leave it out). - Send every field at the top level of the JSON body, with the text in
prompt;parameters,input,contentandtextare rejected. - Send the video to edit in
video_url, as onehttpsURL of an MP4 or MOV file, and refer to it in the prompt as @Video1; optional reference images go inimage_urls(@Image1, @Image2 and so on). Video Editing takes no frame shape and no first or last frame:aspect_ratio,start_image_url,end_image_url,image_url,image,images,reference_image_urls,first_frame_url,last_frame_urlandtail_image_urlare rejected. - Omit a field instead of sending null.
- Use the JSON types shown:
durationis a whole number (5, not"5"). - Results are always returned as a URL in
output.media_url;sync_modeis accepted only asfalse. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_url,webhook_modeandcallback_urlin the JSON body are rejected. - The video to edit goes in
video_url, as one URL;videos,video_urlsandaudio_urlare rejected (reference videos are taken only by the Reference to Video operation). - Options this API does not offer are rejected:
model,multi_prompt,elements,seed,negative_prompt,cfg_scale,generate_audio,shot_type,enable_safety_checker,voice_idsandstream.
Length and Resolution
Set duration to the length of the edited video in whole seconds, from 3 to 30; when you leave it out, the edited video is as long as your video, rounded up to a whole second. Set resolution to one of the values below; 1080p applies when you leave it out. Billing counts the length of your video plus the length of the edited video, at the rate for the requested resolution (see How Billing Is Measured), so a longer video or a higher resolution costs more.
| resolution | Note |
|---|---|
720p | The lower cost per second |
1080p | The default; the higher cost per second |
Example: a 10-second edit at 720p
{
"prompt": "Turn @Video1 into a watercolor painting.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
"duration": 10,
"resolution": "720p"
}Source Video
- Send the video to edit in
video_url: one publicly reachablehttpsURL of an MP4 or MOV file. A list of videos and data URIs are not accepted. - The video must be 3 to 30 seconds long and at most 300 MB, at least 700 and at most 4553 pixels on each side, with a width-to-height ratio from 2:5 to 5:2.
- Your video is read and measured when you submit, within 6 seconds. A video that cannot be read or measured in that time, a malformed or fragmented MP4 (re-save it as a regular MP4), a file with no video track, a file whose length cannot be told for sure (one that starts late on its own timeline, or whose header or a timecode or subtitle track runs past its video: the error names the cause and an ffmpeg command that fixes it), a file with less than 3 seconds of actual video, or one outside these limits is refused at once with a
400, with nothing charged. Its measured length counts toward the amount billed: the file's length as ffprobe reports it, so longer audio counts too. - Refer to the video in
promptas @Video1 and say what to change. - Optionally send up to 10 reference images in
image_urls, referred to as @Image1, @Image2 and so on, in the order of the list: publicly reachablehttpsURLs (recommended) or data URIs, as PNG or JPEG files of at most 30 MB, at least 300 px on each side, with a width-to-height ratio from 2:5 to 5:2. They do not change the amount billed. - Video Editing takes no
aspect_ratio,start_image_urlorend_image_url. The edited video keeps the aspect ratio of your video. - Video Editing output includes sound.
Example: a new background from a reference image
{
"prompt": "Replace the background of @Video1 with the place in @Image1.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"duration": 5,
"resolution": "720p"
}Example Request
{
"prompt": "Change the background of @Video1 to a sunny beach, keeping the person and the motion as they are.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
"duration": 5,
"resolution": "1080p"
}Example Response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, the video could not be read or measured or is outside the limits, or a reference image could not be downloaded. The message says what to fix. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. The video is read and measured when you submit, and a video that cannot be read or measured, or is outside the limits, is refused with a 400 before any hold. A reference image that cannot be downloaded is also refused at submit with a 400, and its hold is released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty prompt, prompt not a string, or longer than 26000 characters | synchronous 400 |
Missing or empty video_url, or video_url sent as anything other than a single string | synchronous 400 |
A video_url that is not an http(s) URL, cannot be read as an MP4 or MOV file when you submit, is a malformed or fragmented MP4, has no video track, cannot be measured within 6 seconds, is shorter than 3 or longer than 30 seconds, is under 700 or over 4553 pixels on a side, has a width-to-height ratio outside 2:5 to 5:2, has a length that cannot be told for sure (a late start, or a header or a timecode or subtitle track running past its video), holds less than 3 seconds of video, or is over 300 MB (refused before any hold: nothing is charged) | synchronous 400 |
| A reference image URL that cannot be downloaded when you submit, or that returns a web page or an empty file instead of an image (the hold is released at once: nothing is charged) | synchronous 400 |
image_urls not a list or empty, or more than 10 items | synchronous 400 |
resolution not one of the allowed values (written exactly as listed) | synchronous 400 |
duration not a whole number from 3 to 30 — for example 2, 31 or the string "5" | synchronous 400 |
sync_mode set to anything other than false (results are always returned as a URL in output.media_url) | synchronous 400 |
batch_size, num_images, number_of_images, n, count, num_videos (one video per request) | synchronous 400 |
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds) | synchronous 400 |
parameters, input, content, text (send the fields at the top level of the JSON body, the text in prompt) | synchronous 400 |
aspect_ratio, start_image_url, end_image_url (Video Editing takes no frame shape and no first or last frame) | synchronous 400 |
image_url, image, images, reference_image_urls, first_frame_url, last_frame_url, tail_image_url (send reference images in image_urls) | synchronous 400 |
videos, video_urls, audio_url (send the one video to edit in video_url; reference videos go to the Reference to Video operation) | synchronous 400 |
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers) | synchronous 400 |
model, multi_prompt, elements, seed, negative_prompt, cfg_scale, generate_audio, shot_type, enable_safety_checker, voice_ids, stream (not offered on this API) | synchronous 400 |
| A reference image the model cannot use, for example a file that is not an image, or one smaller than 300 px on either side or outside a width-to-height ratio of 2:5 to 5:2 | status: "ERROR" |
| A video, prompt or reference image the model refuses, for example under its content policy | status: "ERROR" |
Example error responses
A request refused for its parameters returns error, a message that joins every problem found, and the same problems one by one in violations. A request refused because an image could not be downloaded or used returns error set to "Asset proxy failed", a message naming the first image that failed and why, and each failed image with its reason in failures. A video that cannot be read or measured, or is outside the limits, returns error set to "Invalid request parameters" with the reason in message and violations.
Missing video_url (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'video_url' is required",
"violations": [
"'video_url' is required"
]
}A value that is not allowed (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")",
"violations": [
"'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")"
]
}A value out of range (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'duration' must be <= 30 (got 31)",
"violations": [
"'duration' must be <= 30 (got 31)"
]
}A field this operation does not accept (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'video_urls' must be one of: (got [\"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4\"]); 'video_urls' is accepted only by reference-to-video. v2v-edit takes the one video to edit in 'video_url'.",
"violations": [
"'video_urls' must be one of: (got [\"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4\"])",
"'video_urls' is accepted only by reference-to-video. v2v-edit takes the one video to edit in 'video_url'."
]
}More than one video per request (synchronous 400)
{
"error": "Invalid request parameters",
"message": "'num_images' must be one of: (got 2); 'num_images' is not supported: Kling 4.0 returns one video per request. Send one request per video.",
"violations": [
"'num_images' must be one of: (got 2)",
"'num_images' is not supported: Kling 4.0 returns one video per request. Send one request per video."
]
}Retrieving Results
Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEYcURL example
curl 'https://gateway.pixazo.ai/v2/requests/status/kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
{
"request_id": "kling-video-v4_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v4",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-10-09T10:04:54.387Z",
"completed_at": "2026-10-09 10:06:21"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — kling-video-v4 for this endpoint. |
| output.media_url | array of strings | URL of the video (one MP4 file per request). |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/kling-video-v4/v1/v2v-edit. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.media_url.
How Billing Is Measured
Billing is measured per second of video, on the length of your video plus the length of the edited video, and never on less than twice the length of the edited video, at the rate for resolution (1080p when you leave it out). The length of your video is measured from the file when you submit and rounded up to a whole second; the length of the edited video is duration, or the length of your video rounded up when you leave it out. For example, editing a 3-second video without duration is billed as 6 seconds, editing a 12-second video into a 5-second video as 17 seconds, and editing a 3-second video into a 10-second video as 20 seconds. 1080p videos cost more per second than 720p videos. The prompt and the reference images do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.
Kling 4.0 API Pricing
Billed per second of video at the requested resolution (720p or 1080p), on your video's length plus the output length, and never less than twice the output; reference images do not change the price. 1080p is the default; without duration the output is as long as your video (3 to 30 seconds).
| Resolution | Price (USD) |
|---|---|
| 1080p / per second | $0.235 |
| 720p / per second | $0.157 |
| 1080p with reference videos / per second | $0.141 |
| 720p with reference videos / per second | $0.094 |
| 1080p video editing / per second | $0.141 |
| 720p video editing / per second | $0.094 |
Kling Video 3 Turbo Pro API Documentation
https://gateway.pixazo.ai/kling-video-v3-turbo-pro-text-to-video/v1/kling-video-v3-turbo-pro-text-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video V3 Turbo Pro Text to Video generate request
Request Code
POST https://gateway.pixazo.ai/kling-video-v3-turbo-pro-text-to-video/v1/kling-video-v3-turbo-pro-text-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A cinematic close-up of a samurai standing in a bamboo forest at dawn, dramatic light, anime style",
"duration": "5",
"aspect_ratio": "16:9"
}
import requests
url = "https://gateway.pixazo.ai/kling-video-v3-turbo-pro-text-to-video/v1/kling-video-v3-turbo-pro-text-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A cinematic close-up of a samurai standing in a bamboo forest at dawn, dramatic light, anime style",
"duration": "5",
"aspect_ratio": "16:9"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-video-v3-turbo-pro-text-to-video/v1/kling-video-v3-turbo-pro-text-to-video-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "A cinematic close-up of a samurai standing in a bamboo forest at dawn, dramatic light, anime style",
"duration": "5",
"aspect_ratio": "16:9"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/kling-video-v3-turbo-pro-text-to-video/v1/kling-video-v3-turbo-pro-text-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A cinematic close-up of a samurai standing in a bamboo forest at dawn, dramatic light, anime style",
"duration": "5",
"aspect_ratio": "16:9"
}'
Output
{
"request_id": "kling-video-v3-turbo-pro-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-turbo-pro-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling Video V3 Turbo Pro Text to Video generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | No | string | — | ≤ 3072 characters | Describe the video you want to create (up to 3072 characters; under 2500 works best). Use this or the multi-shot storyboard, not both. |
| multi_prompt | No | object[] | — | — | Multi-shot storyboard (1–6 shots). Each shot must include `prompt` (string, required) and `duration` (enum, default "5"). Total duration across all shots must not exceed 15 seconds. |
| multi_prompt[].prompt | Yes (if multi_prompt used) | string | — | — | Text description for an individual shot in a multi-shot sequence. |
| multi_prompt[].duration | No | enum | "5" | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | Duration of this shot in seconds. Allowed values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. |
| duration | No | enum | "5" | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | How long the video should be, in seconds. Leave this empty if you're using the multi-shot storyboard. |
| aspect_ratio | No | enum | "16:9" | 16:9, 9:16, 1:1 | Output video aspect ratio. Allowed values: 16:9, 9:16, 1:1. |
Example Request
{
"prompt": "A cinematic close-up of a samurai standing in a bamboo forest at dawn, dramatic light, anime style",
"duration": "5",
"aspect_ratio": "16:9"
}
Response
{
"request_id": "kling-video-v3-turbo-pro-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-turbo-pro-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-v3-turbo-pro-text-to-video' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-v3-turbo-pro-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v3-turbo-pro-text-to-video",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-turbo-pro-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-v3-turbo-pro-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v3-turbo-pro-text-to-video",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v3-turbo-pro-text-to-video_019dxxxx/output.mp4"],
"media_type": "video/mp4"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Video 3 Turbo Pro API Pricing
Kling Video 3 Turbo Pro API Documentation
https://gateway.pixazo.ai/kling-video-v3-turbo-pro-image-to-video/v1/kling-video-v3-turbo-pro-image-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video V3 Turbo Pro Image to Video generate request
Request Code
POST https://gateway.pixazo.ai/kling-video-v3-turbo-pro-image-to-video/v1/kling-video-v3-turbo-pro-image-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"prompt": "Cinematic slow push-in; the character speaks naturally",
"duration": "5"
}
import requests
url = "https://gateway.pixazo.ai/kling-video-v3-turbo-pro-image-to-video/v1/kling-video-v3-turbo-pro-image-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"prompt": "Cinematic slow push-in; the character speaks naturally",
"duration": "5"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-video-v3-turbo-pro-image-to-video/v1/kling-video-v3-turbo-pro-image-to-video-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
prompt: "Cinematic slow push-in; the character speaks naturally",
duration: "5"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/kling-video-v3-turbo-pro-image-to-video/v1/kling-video-v3-turbo-pro-image-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"prompt": "Cinematic slow push-in; the character speaks naturally",
"duration": "5"
}'
Output
{
"request_id": "kling-video-v3-turbo-pro-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-turbo-pro-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling Video V3 Turbo Pro Image to Video generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| image_url | Yes | string | — | — | First-frame reference image. Supported formats: .jpg, .jpeg, .png. Maximum file size: 50MB. Minimum dimension: 300px per side. Aspect ratio must be within 1:2.5 to 2.5:1. |
| prompt | No | string | — | ≤ 3072 characters | Text prompt describing the desired video motion and style. Recommended under 2500 characters. Mutually exclusive with multi_prompt. |
| multi_prompt | No | object[] | — | — | Build a multi-shot storyboard (1–6 shots). For each shot, give a description and a length in seconds (1–15). The total across all shots can't exceed 15 seconds. Use this instead of a single prompt. |
| multi_prompt[].prompt | Yes (if multi_prompt used) | string | — | — | Text description for an individual shot in a multi-shot sequence. |
| multi_prompt[].duration | No | enum | "5" | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | Duration of this shot in seconds. Allowed values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. |
| duration | No | enum | "5" | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | Length of the generated video in seconds. Allowed values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. Only used when multi_prompt is not provided. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG · < 50 MB | Input image (min 300px per side). |
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gfpgan_019ed0c8-bb3a-7eda-8ce0-0cbaa43139f6a/output.png",
"prompt": "Cinematic slow push-in; the character speaks naturally",
"duration": "5"
}
Response
{
"request_id": "kling-video-v3-turbo-pro-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-turbo-pro-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-v3-turbo-pro-image-to-video' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-v3-turbo-pro-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v3-turbo-pro-image-to-video",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-turbo-pro-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-v3-turbo-pro-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v3-turbo-pro-image-to-video",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v3-turbo-pro-image-to-video_019dxxxx/output.mp4"],
"media_type": "video/mp4"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Video 3 Turbo Pro API Pricing
Kling Video O3 4K API Documentation
https://gateway.pixazo.ai/kling-video-o3-4k-text-to-video/v1/kling-video-o3-4k-text-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Video - Kling Video O3 4K
Request Code
POST https://gateway.pixazo.ai/kling-video-o3-4k-text-to-video/v1/kling-video-o3-4k-text-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A mecha lands on the ground to save the city, and says I am here, in anime style"
}
import requests
url = "https://gateway.pixazo.ai/kling-video-o3-4k-text-to-video/v1/kling-video-o3-4k-text-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A mecha lands on the ground to save the city, and says I am here, in anime style"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-video-o3-4k-text-to-video/v1/kling-video-o3-4k-text-to-video-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'A mecha lands on the ground to save the city, and says I am here, in anime style'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/kling-video-o3-4k-text-to-video/v1/kling-video-o3-4k-text-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A mecha lands on the ground to save the city, and says I am here, in anime style"
}'
Output
{
"request_id": "kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-text-to-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-text-to-video",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Text to Video
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Conditional | string | — | — | Text prompt for video generation. Required unless multi_prompt is provided; the two cannot be combined. |
| multi_prompt | Conditional | array | — | — | List of shot objects for multi-shot sequences. Each object is {"prompt": "...", "duration": "5"} (per-shot duration optional, defaults to "5"). Use instead of prompt for multi-shot stories. |
| duration | No | enum (string) | 5 | "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" | Length of the generated video in seconds. |
| aspect_ratio | No | enum (string) | 16:9 | "16:9", "9:16", "1:1" | Aspect ratio of the generated video. |
| generate_audio | No | boolean | false | true, false | Whether to generate native audio synchronized with the video (no extra cost). |
| shot_type | No | enum (string) | customize | "customize", "intelligent" | Type of multi-shot generation. intelligent lets the model automatically determine the shot structure. |
Example Request
{
"prompt": "A mecha lands on the ground to save the city, and says I am here, in anime style",
"duration": "5",
"aspect_ratio": "16:9",
"generate_audio": false,
"shot_type": "customize"
}
Response
{
"request_id": "kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-o3-4k-text-to-video' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-text-to-video",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-o3-4k-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-text-to-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-text-to-video_019dxxxx-xxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-04-07T10:00:00.000Z",
"updated_at": "2026-04-07T10:02:30.000Z",
"completed_at": "2026-04-07T10:02:30.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Video O3 4K API Pricing
Kling Video O3 4K API Documentation
https://gateway.pixazo.ai/kling-video-o3-4k-image-to-video/v1/kling-video-o3-4k-image-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video O3 4K Image to Video generate request
Request Code
POST https://gateway.pixazo.ai/kling-video-o3-4k-image-to-video/v1/kling-video-o3-4k-image-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"prompt": "Cinematic camera move; the subject comes to life, anime style",
"duration": "5",
"generate_audio": false,
"shot_type": "customize"
}
import requests
url = "https://gateway.pixazo.ai/kling-video-o3-4k-image-to-video/v1/kling-video-o3-4k-image-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"prompt": "Cinematic camera move; the subject comes to life, anime style",
"duration": "5",
"generate_audio": false,
"shot_type": "customize"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-video-o3-4k-image-to-video/v1/kling-video-o3-4k-image-to-video-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"prompt": "Cinematic camera move; the subject comes to life, anime style",
"duration": "5",
"generate_audio": false,
"shot_type": "customize"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/kling-video-o3-4k-image-to-video/v1/kling-video-o3-4k-image-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"prompt": "Cinematic camera move; the subject comes to life, anime style",
"duration": "5",
"generate_audio": false,
"shot_type": "customize"
}'
Output
{
"request_id": "kling-video-o3-4k-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-o3-4k-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-image-to-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-o3-4k-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-image-to-video",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Video O3 4K Image to Video generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| image_url | Yes | string | — | — | URL of the start frame image. The generated video animates from this frame. |
| prompt | No | string | — | — | Text prompt describing the motion/scene. Either prompt or multi_prompt must be provided, but not both. |
| end_image_url | No | string | — | — | Optional end frame. If you add one, the video smoothly transitions from the first frame to this image. |
| multi_prompt | No | array | — | — | List of shot objects for multi-shot sequences. Each object contains prompt (string, required) and duration (enum, default "5"). Use instead of prompt for multi-shot stories. |
| duration | No | enum (string) | 5 | "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" | Length of the generated video in seconds. |
| aspect_ratio | No | string | — | — | Ignored for image-to-video: the output aspect ratio is inferred from the input (start) image, so this field has no effect (it is accepted for backward compatibility). To change framing, crop the input image. Aspect ratio is configurable on the text-to-video and reference-to-video endpoints, not here. |
| generate_audio | No | boolean | false | true, false | Whether to generate native audio synchronized with the video (no extra cost). |
| shot_type | No | enum (string) | customize | "customize", "intelligent" | Type of multi-shot generation. intelligent lets the model automatically determine the shot structure. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG · < 50 MB | Start / end frame image (min 300px per side). |
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/nano-banana/nano-banana-a382a80b-f8df-4de1-a0c1-a5dcfd42dae4-1758783383399.jpg",
"prompt": "A mecha lands on the ground to save the city, cinematic 4K, anime style",
"duration": "5",
"aspect_ratio": "16:9"
}
Response
{
"request_id": "kling-video-o3-4k-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Kling Video O3 4K API Pricing
Kling Video O3 4K API Documentation
https://gateway.pixazo.ai/kling-video-o3-4k-reference-to-video/v1/kling-video-o3-4k-reference-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video O3 4K Reference to Video generate request
Request Code
POST https://gateway.pixazo.ai/kling-video-o3-4k-reference-to-video/v1/kling-video-o3-4k-reference-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A heroic warrior strides through a misty forest at dawn, cinematic anime style",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"duration": "5",
"aspect_ratio": "16:9",
"shot_type": "customize",
"generate_audio": false
}
import requests
url = "https://gateway.pixazo.ai/kling-video-o3-4k-reference-to-video/v1/kling-video-o3-4k-reference-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A heroic warrior strides through a misty forest at dawn, cinematic anime style",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"duration": "5",
"aspect_ratio": "16:9",
"shot_type": "customize",
"generate_audio": false
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-video-o3-4k-reference-to-video/v1/kling-video-o3-4k-reference-to-video-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "A heroic warrior strides through a misty forest at dawn, cinematic anime style",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"duration": "5",
"aspect_ratio": "16:9",
"shot_type": "customize",
"generate_audio": false
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/kling-video-o3-4k-reference-to-video/v1/kling-video-o3-4k-reference-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A heroic warrior strides through a misty forest at dawn, cinematic anime style",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"duration": "5",
"aspect_ratio": "16:9",
"shot_type": "customize",
"generate_audio": false
}'
Output
{
"request_id": "kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-reference-to-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-reference-to-video",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Video O3 4K Reference to Video generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Conditional* | string | — | — | Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. Reference uploaded images as @Image1, @Image2 and elements as @Element1, @Element2. |
| multi_prompt | Conditional* | object[] | — | — | List of shot objects for multi-shot sequences, each with prompt (string, required) and duration (enum, default "5"). Alternative to prompt. |
| start_image_url | No | string | — | — | Image to use as the first frame of the video. |
| end_image_url | No | string | — | — | Image to use as the last frame of the video. |
| image_urls | No | string[] | — | Max 7 (elements + reference images) combined | Reference images for style and appearance — mention them in your prompt as @Image1, @Image2, etc. Up to 7 images total (including any element images). |
| elements | No | object[] | — | Max 7 (elements + reference images) combined | Characters or objects to feature — mention them in your prompt as @Element1, @Element2. For each, you can add a main image, 1–3 extra angle images, an optional clip, and a voice. |
| duration | No | enum (string) | 5 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | Length of the generated video in seconds. |
| aspect_ratio | No | enum (string) | 16:9 | 16:9, 9:16, 1:1 | Aspect ratio of the generated video frame. |
| shot_type | No | enum (string) | customize | customize, intelligent | Type of multi-shot generation. intelligent lets the model automatically determine the shot structure. |
| generate_audio | No | boolean | false | true, false | Whether to generate native audio synchronized with the video (no extra cost). |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| start_image_url | 1 | JPG, PNG · < 10 MB | Start frame image. |
| end_image_url | 1 | JPG, PNG · < 10 MB | End frame image. |
| image_urls | 7 | JPG, PNG · < 10 MB | Reference image(s), up to 7 combined. |
Example Request
{
"prompt": "A heroic warrior strides through a misty forest at dawn, cinematic anime style",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/nano-banana-pro-async_019efef2-90a7-74ff-577a-87e614a738b25/output.jpg"
],
"duration": "5",
"aspect_ratio": "16:9",
"shot_type": "customize",
"generate_audio": false
}
Response
{
"request_id": "kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-o3-4k-reference-to-video' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-reference-to-video",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-o3-4k-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-reference-to-video",
"error": null,
"output": { "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-reference-to-video_019dxxxx/output.mp4"], "media_type": "video/mp4" },
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Video O3 4K API Pricing
Kling Video O3 4K API Documentation
https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/reference
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video O3 4K Video to Video Reference generate request - Kling Video O3 4K Video to Video Reference
Request Code
POST https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/reference
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Restyle the video with a vibrant anime aesthetic and dynamic lighting effects",
"video_url": "https://imagesai.appypie.com/7686410/HjRiOy5cjxaM5YMXUY5U_017731482701572.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png"
],
"keep_audio": false,
"aspect_ratio": "auto",
"duration": "5"
}
import requests
url = "https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/reference"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Restyle the video with a vibrant anime aesthetic and dynamic lighting effects",
"video_url": "https://imagesai.appypie.com/7686410/HjRiOy5cjxaM5YMXUY5U_017731482701572.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png"
],
"keep_audio": False,
"aspect_ratio": "auto",
"duration": "5"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/reference';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'Restyle the video with a vibrant anime aesthetic and dynamic lighting effects',
video_url: 'https://imagesai.appypie.com/7686410/HjRiOy5cjxaM5YMXUY5U_017731482701572.mp4',
image_urls: [
'https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png'
],
keep_audio: false,
aspect_ratio: 'auto',
duration: '5'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/reference" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Restyle the video with a vibrant anime aesthetic and dynamic lighting effects",
"video_url": "https://imagesai.appypie.com/7686410/HjRiOy5cjxaM5YMXUY5U_017731482701572.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png"
],
"keep_audio": false,
"aspect_ratio": "auto",
"duration": "5"
}'
Output
{
"request_id": "kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-video-to-video-reference",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-video-to-video-reference",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Video O3 4K Video to Video Reference generate request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | Text prompt describing the video to generate. Reference the input video as @Video1, reference images as @Image1, @Image2, and elements as @Element1, @Element2. Maximum 2500 characters. |
| video_url | string | Yes | — | URL of the reference video to transform. Only .mp4 or .mov formats, 3–15 seconds long, 720–3840px on each side, 24–60 FPS, maximum 200MB. |
| image_urls | array of strings | No | — | Reference images that guide style and appearance. Reference them in the prompt as @Image1, @Image2, and so on. Maximum 4 items in total across image_urls and elements when a video is supplied. Each image must be at least 300×300px, aspect ratio between 0.4 and 2.5, maximum 10MB. |
| keep_audio | boolean | No | true | If true, the original audio from the reference video is kept. If false, the generated video is silent. |
| elements | array of objects | No | — | Characters or objects to include in the generated video. Reference them in the prompt as @Element1, @Element2. Each item takes frontal_image_url (the main frontal view) and reference_image_urls (1–3 additional angles, at least one required). Counts toward the maximum of 4 items shared with image_urls. |
| shot_type | string | No | customize | The type of multi-shot video generation. "customize" is the only accepted value. |
| aspect_ratio | string | No | auto | Aspect ratio of the generated video. Allowed values: "auto", "16:9", "9:16", "1:1". |
| duration | string | No | — | Length of the generated video in seconds, sent as a string. Allowed values: "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15". |
Minimum Request
{
"prompt": "Restyle the video with a vibrant anime aesthetic and dynamic lighting effects",
"video_url": "https://imagesai.appypie.com/7686410/HjRiOy5cjxaM5YMXUY5U_017731482701572.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png"
]
}
Full Request (all options)
{
"prompt": "Restyle the video with a vibrant anime aesthetic and dynamic lighting effects",
"video_url": "https://imagesai.appypie.com/7686410/HjRiOy5cjxaM5YMXUY5U_017731482701572.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png"
],
"keep_audio": false,
"aspect_ratio": "auto",
"duration": "5"
}
Response
{
"request_id": "kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Kling Video O3 4K Video to Video Reference generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-o3-4k-video-to-video-reference' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-video-to-video-reference",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-video-to-video-reference",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-video-to-video-reference_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Video O3 4K API Pricing
Kling Video O3 4K API Documentation
https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/edit
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video O3 4K Video to Video Edit generate request - Kling Video O3 4K Video to Video Edit
Request Code
POST https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/edit
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Transform the environment into a lush tropical rainforest with dense vegetation and colorful birds",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/ZU2sxXLmgRF6dgSktn9o_017731475651251.png"
],
"keep_audio": true
}
import requests
url = "https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/edit"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Transform the environment into a lush tropical rainforest with dense vegetation and colorful birds",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/ZU2sxXLmgRF6dgSktn9o_017731475651251.png"
],
"keep_audio": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/edit";
const data = {
prompt: "Transform the environment into a lush tropical rainforest with dense vegetation and colorful birds",
video_url: "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
image_urls: [
"https://imagesai.appypie.com/7686410/ZU2sxXLmgRF6dgSktn9o_017731475651251.png"
],
keep_audio: true
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -X POST "https://gateway.pixazo.ai/kling-video-o3-4k/v1/video-to-video/edit" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Transform the environment into a lush tropical rainforest with dense vegetation and colorful birds",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/ZU2sxXLmgRF6dgSktn9o_017731475651251.png"
],
"keep_audio": true
}
Output
{
"request_id": "kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-video-to-video-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-video-to-video-edit",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Video O3 4K Video to Video Edit generate request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | Text description of the edit to apply. Reference the source video as @Video1, reference images as @Image1, @Image2, and elements as @Element1, @Element2. Maximum 2500 characters. |
| video_url | string | Yes | — | Publicly accessible URL of the source video to edit. Only .mp4 and .mov formats, 3-15 seconds long, 720-3840px resolution, 24-60 fps, maximum 200MB. The edited result follows the length of this source video. |
| image_urls | array of strings | No | — | Public URLs of reference images that guide style and appearance. Reference them in the prompt as @Image1, @Image2. Each image must be at least 300x300px, with an aspect ratio between 0.40 and 2.50, and at most 10MB. Maximum 4 total (elements + reference images) when using video. |
| keep_audio | boolean | No | true | If true, preserves the original audio track from the input video in the output. If false, the output video will be silent. |
| elements | array of objects | No | — | Characters or objects to include in the edit, referenced in the prompt as @Element1, @Element2. Each entry accepts frontal_image_url (the main front-facing view) and reference_image_urls (1-3 additional angles; at least one image is required). Counts toward the maximum of 4 total (elements + reference images) when using video. |
| shot_type | string | No | customize | The type of multi-shot video generation. "customize" is the only accepted value. |
Minimum Request
{
"prompt": "Transform the environment into a lush tropical rainforest with dense vegetation and colorful birds",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4"
}
Full Request (all options)
{
"prompt": "Transform the environment into a lush tropical rainforest with dense vegetation and colorful birds",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"image_urls": [
"https://imagesai.appypie.com/7686410/ZU2sxXLmgRF6dgSktn9o_017731475651251.png"
],
"keep_audio": true
}
Response
{
"request_id": "kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Kling Video O3 4K Video to Video Edit generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-o3-4k-video-to-video-edit' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-o3-4k-video-to-video-edit",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-o3-4k-video-to-video-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-o3-4k-video-to-video-edit_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Video O3 4K API Pricing
Kling Image O3 API Documentation
https://gateway.pixazo.ai/kling-image/v1/kling-image-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Image O3 Text to Image - Kling Image API
Request Code
POST https://gateway.pixazo.ai/kling-image/v1/kling-image-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A serene mountain lake at sunset with golden reflections, painterly style",
"resolution": "1K",
"aspect_ratio": "16:9",
"num_images": 1,
"output_format": "png"
}
import requests
url = "https://gateway.pixazo.ai/kling-image/v1/kling-image-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A serene mountain lake at sunset with golden reflections, painterly style",
"resolution": "1K",
"aspect_ratio": "16:9",
"num_images": 1,
"output_format": "png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-image/v1/kling-image-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"prompt": "A serene mountain lake at sunset with golden reflections, painterly style",
"resolution": "1K",
"aspect_ratio": "16:9",
"num_images": 1,
"output_format": "png"
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-image/v1/kling-image-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A serene mountain lake at sunset with golden reflections, painterly style",
"resolution": "1K",
"aspect_ratio": "16:9",
"num_images": 1,
"output_format": "png"
}'
Output
{
"request_id": "kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-image",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-image",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Image O3 Text to Image - Kling Image API
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description of the image to generate. Max 2500 characters. |
| elements | No | array | — | — | Optional ElementInput objects (characters/objects) for face control and character consistency. Reference them in the prompt as @Element1, @Element2, etc. |
| resolution | No | string | 1K | 1K, 2K, 4K | Target output resolution (1K standard, 2K high-res, 4K ultra high-res). Higher resolutions increase cost. |
| result_type | No | string | single | single, series | Output type: "single" for one or more independent results, "series" for a coordinated sequence. |
| num_images | No | integer | 1 | 1–9 | Number of output images to generate. Only applicable when result_type is "single". |
| series_amount | No | integer | — | 2–9 | Number of images in a coordinated sequence. Only applicable when result_type is "series". |
| aspect_ratio | No | string | 16:9 | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 | Desired aspect ratio of the generated images. |
| output_format | No | string | png | png, jpeg, webp | Output image format. |
| sync_mode | No | boolean | false | true, false | If on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link. |
Example Request
{
"prompt": "A serene mountain lake at sunset with golden reflections"
}
Response
{
"request_id": "kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
| X-Webhook-URL | Optional callback URL |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance. Required: $0.028"
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-image' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-image",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-image_019d7186-b8be-7937-493d-23360408abdb0"
Response (Completed)
{
"request_id": "kling-image_019d7186-b8be-7937-493d-23360408abdb0",
"status": "COMPLETED",
"model_id": "kling-image",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image_019d7186-b8be-7937-493d-23360408abdb0/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-04-09T09:15:47.804Z",
"updated_at": "2026-04-09 09:16:53",
"completed_at": "2026-04-09 09:16:53"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type (image/png) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Image O3 API Pricing
| Resolution | Price (USD) |
|---|---|
| 1K | $0.028 |
| 2K | $0.028 |
| 4K | $0.056 |
Kling Image O3 API Documentation
https://gateway.pixazo.ai/kling-image-o3-i2i/v1/kling-image-o3-i2i-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Image O3 Image to Image - Kling Image O3 i2i API
Request Code
POST https://gateway.pixazo.ai/kling-image-o3-i2i/v1/kling-image-o3-i2i-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Reimagine this as a detailed pencil sketch with cross-hatching on aged parchment",
"image_urls": [
"https://imagesai.appypie.com/7686410/a4i4mHl7B9MUtbt09qBA_017731443271512.png"
],
"resolution": "1K",
"aspect_ratio": "auto",
"num_images": 1,
"output_format": "png"
}
import requests
url = "https://gateway.pixazo.ai/kling-image-o3-i2i/v1/kling-image-o3-i2i-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Reimagine this as a detailed pencil sketch with cross-hatching on aged parchment",
"image_urls": [
"https://imagesai.appypie.com/7686410/a4i4mHl7B9MUtbt09qBA_017731443271512.png"
],
"resolution": "1K",
"aspect_ratio": "auto",
"num_images": 1,
"output_format": "png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-image-o3-i2i/v1/kling-image-o3-i2i-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"prompt": "Reimagine this as a detailed pencil sketch with cross-hatching on aged parchment",
"image_urls": [
"https://imagesai.appypie.com/7686410/a4i4mHl7B9MUtbt09qBA_017731443271512.png"
],
"resolution": "1K",
"aspect_ratio": "auto",
"num_images": 1,
"output_format": "png"
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-image-o3-i2i/v1/kling-image-o3-i2i-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Reimagine this as a detailed pencil sketch with cross-hatching on aged parchment",
"image_urls": [
"https://imagesai.appypie.com/7686410/a4i4mHl7B9MUtbt09qBA_017731443271512.png"
],
"resolution": "1K",
"aspect_ratio": "auto",
"num_images": 1,
"output_format": "png"
}'
Output
{
"request_id": "kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-image-o3-i2i",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-image-o3-i2i",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Image O3 Image to Image - Kling Image O3 i2i API
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description of how to transform the input image. Reference images using @Image1, @Image2, etc. (or @Image if only one). Max 2500 characters. |
| image_urls | Yes | array of strings | — | 1–10 images | List of HTTPS URLs pointing to reference images (max 10). Reference them in the prompt using @Image1, @Image2, etc. (1-indexed). |
| elements | No | array | — | — | Optional ElementInput objects (characters/objects) for advanced face control and character consistency. Reference them in the prompt as @Element1, @Element2, etc. |
| resolution | No | string | 1K | 1K, 2K, 4K | Target output resolution (1K standard, 2K high-res, 4K ultra high-res). Higher resolutions increase cost. |
| result_type | No | string | single | single, series | Output type: "single" for one or more independent results, "series" for a coordinated sequence. |
| num_images | No | integer | 1 | 1–9 | Number of output images to generate. Only applicable when result_type is "single". |
| series_amount | No | integer | — | 2–9 | Number of images in a coordinated sequence. Only applicable when result_type is "series". |
| aspect_ratio | No | string | auto | auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 | Desired aspect ratio of the generated images. "auto" intelligently determines the ratio based on the input content. |
| output_format | No | string | png | png, jpeg, webp | Output image format. |
| sync_mode | No | boolean | false | true, false | If on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 10 | JPG, PNG, WEBP · < 10 MB | Image(s) to edit (up to 10). |
Example Request
{
"prompt": "Reimagine this as a detailed pencil sketch with cross-hatching on aged parchment",
"image_urls": [
"https://imagesai.appypie.com/7686410/a4i4mHl7B9MUtbt09qBA_017731443271512.png"
]
}
Response
{
"request_id": "kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
| X-Webhook-URL | Optional callback URL |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance. Required: $0.028"
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-image-o3-i2i' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-image-o3-i2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-image-o3-i2i",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-image-o3-i2i_019d7185-ed08-7995-df07-aee084160a265"
Response (Completed)
{
"request_id": "kling-image-o3-i2i_019d7185-ed08-7995-df07-aee084160a265",
"status": "COMPLETED",
"model_id": "kling-image-o3-i2i",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-o3-i2i_019d7185-ed08-7995-df07-aee084160a265/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-04-09T09:15:47.804Z",
"updated_at": "2026-04-09 09:16:53",
"completed_at": "2026-04-09 09:16:53"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type (image/png) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Image O3 API Pricing
| Resolution | Price (USD) |
|---|---|
| 1K | $0.028 |
| 2K | $0.028 |
| 4K | $0.056 |
Kling 2.6 Standard API Documentation
https://gateway.pixazo.ai/kling-video-v2-6-standard-motion-control/v1/kling-video-v2-6-standard-motion-control-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video v2.6 Standard Motion Control generate request - Kling Video v2.6 Standard Motion Control API
Request Code
POST https://gateway.pixazo.ai/kling-video-v2-6-standard-motion-control/v1/kling-video-v2-6-standard-motion-control-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.jpg",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.mp4",
"character_orientation": "video",
"keep_original_sound": true
}
import requests
url = "https://gateway.pixazo.ai/kling-video-v2-6-standard-motion-control/v1/kling-video-v2-6-standard-motion-control-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.jpg",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.mp4",
"character_orientation": "video",
"keep_original_sound": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-video-v2-6-standard-motion-control/v1/kling-video-v2-6-standard-motion-control-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.jpg',
video_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.mp4',
character_orientation: 'video',
keep_original_sound: true
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-video-v2-6-standard-motion-control/v1/kling-video-v2-6-standard-motion-control-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.jpg",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.mp4",
"character_orientation": "video",
"keep_original_sound": true
}'
Output
{
"request_id": "kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v2-6-standard-motion-control",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v2-6-standard-motion-control",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Video v2.6 Standard Motion Control generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| image_url | Yes | string | — | Public URL · JPG, PNG, WEBP · < 10 MB · 340–3850 px · aspect 0.4–2.5 | Reference image URL. The characters, backgrounds and other elements in the generated video are based on this reference image. The character should have clear body proportions, avoid occlusion, and occupy more than 5% of the image area. Must be publicly accessible. |
| video_url | Yes | string | — | Public URL · MP4, MOV · 3–30 s · < 100 MB | Reference video URL. The character actions in the generated video follow this reference video, which should contain a realistic-style character with the full or upper body (including head) visible and unobstructed. Maximum duration depends on character_orientation — 10 s for "image", 30 s for "video". Must be publicly accessible. |
| character_orientation | Yes | string | — | image, video | Controls whether the output character’s orientation matches the reference image or the reference video. "video" matches the video’s orientation — better for complex motions (video up to 30 s); "image" matches the image’s orientation — better for following camera movements (video up to 10 s). |
| prompt | No | string | — | Up to 2500 characters | Optional text prompt describing background elements — their appearance, timing and behaviour — and subtle adjustments to the character’s animation. |
| keep_original_sound | No | boolean | true | true, false | Whether to keep the original sound from the reference video. When true (the default), the reference video’s audio is preserved in the output; when false, the output is silent. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP · < 10 MB | Character image. |
| video | 1 | MP4, MOV | Motion-control video. |
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.jpg",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/motion.mp4",
"character_orientation": "video",
"keep_original_sound": true
}
Response
{
"request_id": "kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-v2-6-standard-motion-control' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v2-6-standard-motion-control",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-v2-6-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v2-6-standard-motion-control",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v2-6-standard-motion-control_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling 2.6 Standard API Pricing
Kling 3.0 API Documentation
https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling 3.0 Text to Video Standard generate request - Kling 3.0 Text to Video Standard
Request Code
POST https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Cinematic drone shot flying through ancient stone ruins covered in moss and vines at golden hour. Camera starts low, rises through crumbling archways, revealing a vast misty valley beyond. Volumetric light rays pierce through gaps in the stone. Epic scale, photorealistic, 8K quality.",
"duration": "5",
"multi_prompt": null,
"generate_audio": true,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}
import requests
url = "https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Cinematic drone shot flying through ancient stone ruins covered in moss and vines at golden hour. Camera starts low, rises through crumbling archways, revealing a vast misty valley beyond. Volumetric light rays pierce through gaps in the stone. Epic scale, photorealistic, 8K quality.",
"duration": "5",
"multi_prompt": None,
"generate_audio": True,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request';
const data = {
prompt: 'Cinematic drone shot flying through ancient stone ruins covered in moss and vines at golden hour. Camera starts low, rises through crumbling archways, revealing a vast misty valley beyond. Volumetric light rays pierce through gaps in the stone. Epic scale, photorealistic, 8K quality.',
duration: '5',
multi_prompt: null,
generate_audio: true,
shot_type: 'customize',
aspect_ratio: '16:9',
negative_prompt: 'blur, distort, and low quality',
cfg_scale: 0.5
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Cinematic drone shot flying through ancient stone ruins covered in moss and vines at golden hour. Camera starts low, rises through crumbling archways, revealing a vast misty valley beyond. Volumetric light rays pierce through gaps in the stone. Epic scale, photorealistic, 8K quality.",
"duration": "5",
"multi_prompt": null,
"generate_audio": true,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}'
Output
{
"request_id": "kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-3-0-text-to-video-standard",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-3-0-text-to-video-standard",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling 3.0 Text to Video Standard generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | No | string | — | — | Text prompt for video generation (max 2500 characters). Either prompt or multi_prompt must be provided, but not both. Be specific about camera movement, lighting, mood, and visual elements for best results. |
| duration | No | string | "5" | "3"–"15" (whole seconds) | The duration of the generated video in seconds. |
| multi_prompt | No | array of objects | — | — | List of prompts for multi-shot video generation. If provided, overrides the single prompt and divides the video into multiple shots, each with its own prompt and duration (per-shot 1–15s; total across shots at most 15s). Mutually exclusive with prompt. |
| generate_audio | No | boolean | true | true, false | Whether to generate native audio for the video. Supports Chinese and English voice output; other languages are automatically translated to English. |
| shot_type | No | string | "customize" | "customize", "intelligent" | The type of multi-shot video generation. "intelligent" lets the model automatically determine the shot structure (used with multi_prompt). |
| aspect_ratio | No | string | "16:9" | "16:9", "9:16", "1:1" | The aspect ratio of the generated video frame. |
| negative_prompt | No | string | "blur, distort, and low quality" | — | Describes undesired elements to avoid in the output. Helps refine visual quality. |
| cfg_scale | No | number | 0.5 | 0–1 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| elements | No | array of objects | — | — | Optional elements (characters/objects) to include in the video. Each element is an image set (frontal + reference images) or a video, optionally with a bound voice, referenced in the prompt as @Element1, @Element2, etc. Note: not listed in the provider’s current text-to-video schema (elements are supported on the image-to-video and reference-to-video endpoints) and may be ignored here. |
Example Request
{
"prompt": "Cinematic drone shot flying through ancient stone ruins covered in moss and vines at golden hour. Camera starts low, rises through crumbling archways, revealing a vast misty valley beyond. Volumetric light rays pierce through gaps in the stone. Epic scale, photorealistic, 8K quality.",
"duration": "5",
"multi_prompt": null,
"generate_audio": true,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}
Response
{
"request_id": "kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Kling 3.0 Text to Video Standard check status - Kling 3.0 Text to Video Standard
Request Code
POST https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request-result
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"request_id": "abc123-def456"
}
import requests
url = "https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request-result"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"request_id": "abc123-def456"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request-result';
const data = {
request_id: 'abc123-def456'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1/kling-3-0-text-to-video-standard-request-result" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"request_id": "abc123-def456"
}'
Output
{
"video": {
"url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/XXXXXXXXXXXXXXXXXX.mp4",
"content_type": "video/mp4",
"file_name": "output.mp4",
"file_size": 6841082
}
}
Request Parameters - Kling 3.0 Text to Video Standard check status
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| request_id | Yes | string | — | — | The unique identifier returned from the initial request to check its status. |
Example Request
{
"request_id": "abc123-def456"
}
Response
{
"video": {
"url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/XXXXXXXXXXXXXXXXXX.mp4",
"content_type": "video/mp4",
"file_name": "output.mp4",
"file_size": 6841082
}
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Kling 3.0 Text to Video Standard check status.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-3-0-text-to-video-standard' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-3-0-text-to-video-standard",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-3-0-text-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-3-0-text-to-video-standard",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-3-0-text-to-video-standard_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling 3.0 API Pricing
Kling 3.0 API Documentation
https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling 3.0 Image to Video Standard generate request - Kling 3.0 Image to Video Standard
Request Code
POST https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5",
"multi_prompt": null,
"generate_audio": true,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}
import requests
url = "https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5",
"multi_prompt": None,
"generate_audio": True,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request";
const data = {
prompt: "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
start_image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
end_image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
duration: "5",
multi_prompt: null,
generate_audio: true,
shot_type: "customize",
aspect_ratio: "16:9",
negative_prompt: "blur, distort, and low quality",
cfg_scale: 0.5
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -X POST "https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5",
"multi_prompt": null,
"generate_audio": true,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}'
Output
{
"request_id": "kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-3-0-image-to-video-standard",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-3-0-image-to-video-standard",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling 3.0 Image to Video Standard generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | No | string | — | — | Text prompt for video generation (max 2500 characters). Either prompt or multi_prompt must be provided, but not both. Describe the desired motion, lighting, and style. |
| start_image_url | Yes | string | — | — | URL of the starting (first-frame) image the video is generated from. Must be a publicly accessible image URL. |
| end_image_url | No | string | — | — | Optional URL of the image used for the end (last frame) of the video, enabling a first-to-last-frame transition. |
| duration | No | string | "5" | "3"–"15" (whole seconds) | The duration of the generated video in seconds. |
| multi_prompt | No | array of objects | — | — | List of prompts for multi-shot video generation. If provided, divides the video into multiple shots, each with its own prompt and duration (per-shot 1–15s; total across shots at most 15s). Mutually exclusive with prompt. |
| generate_audio | No | boolean | true | true, false | Whether to generate native audio for the video. Supports Chinese and English voice output; other languages are automatically translated to English. |
| shot_type | No | string | "customize" | "customize", "intelligent" | The type of multi-shot video generation. "intelligent" lets the model automatically determine the shot structure (used with multi_prompt). |
| aspect_ratio | No | string | — | "16:9", "9:16", "1:1" | Output video aspect ratio. Note: not listed in the provider's current image-to-video schema (aspect ratio typically follows the start image) and may be ignored. |
| negative_prompt | No | string | "blur, distort, and low quality" | — | Describes undesired elements to avoid in the output (e.g., blur, distortion, low quality). |
| cfg_scale | No | number | 0.5 | 0–1 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| elements | No | array of objects | — | — | Optional elements (characters/objects) to include in the video. Each element is an image set (frontal + reference images) or a video, optionally with a bound voice, referenced in the prompt as @Element1, @Element2, etc. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP · < 10 MB | Start / end frame image. |
Example Request
{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5",
"multi_prompt": null,
"generate_audio": true,
"shot_type": "customize",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5
}
Response
{
"request_id": "kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Kling 3.0 Image to Video Standard check status - Kling 3.0 Image to Video Standard
Request Code
POST https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request-result
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"request_id": "abc123-def456"
}
import requests
url = "https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request-result"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"request_id": "abc123-def456"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request-result";
const data = {
request_id: "abc123-def456"
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -X POST "https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1/kling-3-0-image-to-video-standard-request-result" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"request_id": "abc123-def456"
}'
Output
{
"video": {
"url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/XXXXXXXXXXXXXXXXXX.mp4",
"content_type": "video/mp4",
"file_name": "output.mp4",
"file_size": 6841082
}
}
Request Parameters - Kling 3.0 Image to Video Standard check status
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| request_id | Yes | string | — | — | The unique identifier returned from the initial request to track status. |
Example Request
{
"request_id": "abc123-def456"
}
Response
{
"video": {
"url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/XXXXXXXXXXXXXXXXXX.mp4",
"content_type": "video/mp4",
"file_name": "output.mp4",
"file_size": 6841082
}
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Kling 3.0 Image to Video Standard check status.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-3-0-image-to-video-standard' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-3-0-image-to-video-standard",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-3-0-image-to-video-standard_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-3-0-image-to-video-standard",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-3-0-image-to-video-standard_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling 3.0 API Pricing
Kling 3.0 API Documentation
https://gateway.pixazo.ai/kling-video-v3-standard-motion-control/v1/kling-video-v3-standard-motion-control-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video V3 Standard Motion Control generate request - Kling Video V3 Standard Motion Control
Request Code
POST https://gateway.pixazo.ai/kling-video-v3-standard-motion-control/v1/kling-video-v3-standard-motion-control-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A dancer performing graceful ballet movements under soft stage lighting",
"image_url": "https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"character_orientation": "video"
}
import requests
url = "https://gateway.pixazo.ai/kling-video-v3-standard-motion-control/v1/kling-video-v3-standard-motion-control-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A dancer performing graceful ballet movements under soft stage lighting",
"image_url": "https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"character_orientation": "video"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-video-v3-standard-motion-control/v1/kling-video-v3-standard-motion-control-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
"prompt": "A dancer performing graceful ballet movements under soft stage lighting",
"image_url": "https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"character_orientation": "video"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -X POST "https://gateway.pixazo.ai/kling-video-v3-standard-motion-control/v1/kling-video-v3-standard-motion-control-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A dancer performing graceful ballet movements under soft stage lighting",
"image_url": "https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"character_orientation": "video"
}'
Output
{
"request_id": "kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v3-standard-motion-control",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v3-standard-motion-control",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Video V3 Standard Motion Control generate request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | No | — | Optional text description of the desired scene, action, or context for the generated video. |
| image_url | string | Yes | — | Reference image URL. The characters, backgrounds, and other elements in the generated video are based on this reference image. Characters should have clear body proportions, avoid occlusion, and occupy more than 5% of the image area. Must be a publicly accessible HTTP/HTTPS link. |
| video_url | string | Yes | — | Reference video URL. The character actions in the generated video match this reference video. Should contain a realistic-style character with the entire body or upper body (including head) visible, without obstruction. Duration limit depends on character_orientation: 10s max for "image", 30s max for "video". Must be a publicly accessible HTTP/HTTPS link (MP4). |
| keep_original_sound | boolean | No | true | Whether to keep the original sound from the reference video. If true, retains the reference video’s audio track in the output; if false, the output is silent. |
| character_orientation | string | Yes | — | Controls whether the output character’s orientation matches the reference image or the reference video. Allowed values: "video" (matches the reference video — better for complex motions, max 30s) or "image" (matches the reference image — better for camera movements, max 10s). |
| elements | array of objects | No | — | Optional element for facial-consistency binding (max 1) to enhance identity preservation. Reference it in the prompt as @Element1. Only supported when character_orientation is "video". |
Minimum Request
{
"prompt": "A dancer performing graceful ballet movements under soft stage lighting",
"image_url": "https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"character_orientation": "video"
}
Full Request (all options)
{
"prompt": "A dancer performing graceful ballet movements under soft stage lighting",
"image_url": "https://imagesai.appypie.com/7686410/i7J8Ng1tyasfkl8lb87E_017731313181830.png",
"video_url": "https://imagesai.appypie.com/7686410/x0rwHY3NB68rZQsXt89Y_017731480901430.mp4",
"keep_original_sound": true,
"character_orientation": "video"
}
Response
{
"request_id": "kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Kling Video V3 Standard Motion Control generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-v3-standard-motion-control' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v3-standard-motion-control",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-v3-standard-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v3-standard-motion-control",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v3-standard-motion-control_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling 3.0 API Pricing
Kling 3.0 API Documentation
https://gateway.pixazo.ai/kling-video-v3-pro-motion-control/v1/kling-video-v3-pro-motion-control-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Video V3 Pro Motion Control generate request - Kling Video V3 Pro Motion Control
Request Code
POST https://gateway.pixazo.ai/kling-video-v3-pro-motion-control/v1/kling-video-v3-pro-motion-control-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A martial artist performing fluid tai chi movements in a misty mountain garden",
"image_url": "https://imagesai.appypie.com/7686410/i9btXmOM5lEGjk4kOIbQ_017731217941336.png",
"video_url": "https://imagesai.appypie.com/7686410/WOEvtLfKq6UWLcDI62m6_017731466021741.mp4",
"character_orientation": "video"
}
import requests
url = "https://gateway.pixazo.ai/kling-video-v3-pro-motion-control/v1/kling-video-v3-pro-motion-control-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A martial artist performing fluid tai chi movements in a misty mountain garden",
"image_url": "https://imagesai.appypie.com/7686410/i9btXmOM5lEGjk4kOIbQ_017731217941336.png",
"video_url": "https://imagesai.appypie.com/7686410/WOEvtLfKq6UWLcDI62m6_017731466021741.mp4",
"character_orientation": "video"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-video-v3-pro-motion-control/v1/kling-video-v3-pro-motion-control-request';
const data = {
prompt: 'A martial artist performing fluid tai chi movements in a misty mountain garden',
image_url: 'https://imagesai.appypie.com/7686410/i9btXmOM5lEGjk4kOIbQ_017731217941336.png',
video_url: 'https://imagesai.appypie.com/7686410/WOEvtLfKq6UWLcDI62m6_017731466021741.mp4',
character_orientation: 'video'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-video-v3-pro-motion-control/v1/kling-video-v3-pro-motion-control-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A martial artist performing fluid tai chi movements in a misty mountain garden",
"image_url": "https://imagesai.appypie.com/7686410/i9btXmOM5lEGjk4kOIbQ_017731217941336.png",
"video_url": "https://imagesai.appypie.com/7686410/WOEvtLfKq6UWLcDI62m6_017731466021741.mp4",
"character_orientation": "video"
}'
Output
{
"request_id": "kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v3-pro-motion-control",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v3-pro-motion-control",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Video V3 Pro Motion Control generate request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | No | — | Optional text description of the desired motion and context for the character animation. |
| image_url | string | Yes | — | Reference image URL. The characters, backgrounds, and other elements in the generated video are based on this reference image. Characters should have clear body proportions, avoid occlusion, and occupy more than 5% of the image area. Must be a publicly accessible HTTP/HTTPS link. |
| video_url | string | Yes | — | Reference video URL. The character actions in the generated video match this reference video. Should contain a realistic-style character with the entire body or upper body (including head) visible, without obstruction. Duration limit depends on character_orientation: 10s max for "image", 30s max for "video". Must be a publicly accessible HTTP/HTTPS link (MP4). |
| keep_original_sound | boolean | No | true | Whether to keep the original sound from the reference video. If true, retains the reference video’s audio track in the output; if false, the output is silent. |
| character_orientation | string | Yes | — | Controls whether the output character’s orientation matches the reference image or the reference video. Allowed values: "video" (matches the reference video — better for complex motions, max 30s) or "image" (matches the reference image — better for camera movements, max 10s). |
| elements | array of objects | No | — | Optional element for facial-consistency binding (max 1) to enhance identity preservation. Reference it in the prompt as @Element1. Only supported when character_orientation is "video". |
Minimum Request
{
"prompt": "A martial artist performing fluid tai chi movements in a misty mountain garden",
"image_url": "https://imagesai.appypie.com/7686410/i9btXmOM5lEGjk4kOIbQ_017731217941336.png",
"video_url": "https://imagesai.appypie.com/7686410/WOEvtLfKq6UWLcDI62m6_017731466021741.mp4",
"character_orientation": "video"
}
Full Request (all options)
{
"prompt": "A martial artist performing fluid tai chi movements in a misty mountain garden",
"image_url": "https://imagesai.appypie.com/7686410/i9btXmOM5lEGjk4kOIbQ_017731217941336.png",
"video_url": "https://imagesai.appypie.com/7686410/WOEvtLfKq6UWLcDI62m6_017731466021741.mp4",
"keep_original_sound": true,
"character_orientation": "video"
}
Response
{
"request_id": "kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Kling Video V3 Pro Motion Control generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-video-v3-pro-motion-control' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-video-v3-pro-motion-control",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-video-v3-pro-motion-control_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-video-v3-pro-motion-control",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-video-v3-pro-motion-control_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling 3.0 API Pricing
Kling Avatar 2 Pro API Documentation
https://gateway.pixazo.ai/kling-ai-avatar-v2-pro-789/v1/kling-ai-avatar-v2-pro-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling AI Avatar v2 Pro generate request - Kling AI Avatar v2 Pro API
Request Code
POST https://gateway.pixazo.ai/kling-ai-avatar-v2-pro-789/v1/kling-ai-avatar-v2-pro-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/abhinav_YF5ZZmi6.mp3",
"prompt": "smiling warmly, slight head turn"
}
import requests
url = "https://gateway.pixazo.ai/kling-ai-avatar-v2-pro-789/v1/kling-ai-avatar-v2-pro-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/abhinav_YF5ZZmi6.mp3",
"prompt": "smiling warmly, slight head turn"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-ai-avatar-v2-pro-789/v1/kling-ai-avatar-v2-pro-request';
const data = {
image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png',
audio_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/abhinav_YF5ZZmi6.mp3',
prompt: 'smiling warmly, slight head turn'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-ai-avatar-v2-pro-789/v1/kling-ai-avatar-v2-pro-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/abhinav_YF5ZZmi6.mp3",
"prompt": "smiling warmly, slight head turn"
}'
Output
{
"request_id": "kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-ai-avatar-v2-pro-789",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-ai-avatar-v2-pro-789",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling AI Avatar v2 Pro generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| image_url | Yes | string | — | — | A static image (face portrait) to be animated. Supported formats: JPEG, PNG. |
| audio_url | Yes | string | — | — | Upload an audio file (MP3 or WAV) to drive lip-sync and facial animation. Up to 60 seconds. |
| prompt | No | string | "." | — | Additional descriptive prompt to guide avatar expression and motion style. Example: "smiling warmly, slight head turn". |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP · < 10 MB | Avatar image. |
| audio | 1 | MP3, WAV | Reference audio (drives lip-sync). |
Minimum Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/abhinav_YF5ZZmi6.mp3"
}
Full Request (all options)
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/abhinav_YF5ZZmi6.mp3",
"prompt": "smiling warmly, slight head turn"
}
Response
{
"request_id": "kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Kling AI Avatar v2 Pro generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-ai-avatar-v2-pro-789' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-ai-avatar-v2-pro-789",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-ai-avatar-v2-pro-789_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-ai-avatar-v2-pro-789",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-ai-avatar-v2-pro-789_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Avatar 2 Pro API Pricing
Kling Image 3 t2i API Documentation
https://gateway.pixazo.ai/kling-image-t2i/v1/kling-image-t2i-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Kling Image t2i generate request - Kling Image t2i
Request Code
POST https://gateway.pixazo.ai/kling-image-t2i/v1/kling-image-t2i-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "An aerial view of a lavender field in Provence at sunset, rows of purple flowers stretching to the horizon, warm golden light, countryside landscape photography",
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "16:9",
"output_format": "png"
}
import requests
url = "https://gateway.pixazo.ai/kling-image-t2i/v1/kling-image-t2i-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "An aerial view of a lavender field in Provence at sunset, rows of purple flowers stretching to the horizon, warm golden light, countryside landscape photography",
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "16:9",
"output_format": "png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/kling-image-t2i/v1/kling-image-t2i-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
"prompt": "An aerial view of a lavender field in Provence at sunset, rows of purple flowers stretching to the horizon, warm golden light, countryside landscape photography",
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "16:9",
"output_format": "png"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -X POST "https://gateway.pixazo.ai/kling-image-t2i/v1/kling-image-t2i-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "An aerial view of a lavender field in Provence at sunset, rows of purple flowers stretching to the horizon, warm golden light, countryside landscape photography",
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "16:9",
"output_format": "png"
}'
Output
{
"request_id": "kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-image-t2i",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_0.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_1.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_2.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_3.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-image-t2i",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Kling Image t2i generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | Up to 2500 characters | Text prompt describing the image to generate. |
| negative_prompt | No | string | — | Up to 2500 characters | Text describing what to exclude from the generated image. |
| elements | No | array | — | Array of element objects | Optional characters or objects to include in the image for face/identity control. Each element references an input image. |
| resolution | No | string | 1K | "1K", "2K" | Image generation resolution. "1K" is standard; "2K" is high-resolution. |
| num_images | No | integer | 1 | 1–9 | Number of images to generate per request. |
| aspect_ratio | No | string | 16:9 | "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" | Aspect ratio of the generated images. |
| output_format | No | string | png | "jpeg", "png", "webp" | Format of the generated image. |
| sync_mode | No | boolean | false | true, false | If on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link. |
Minimum Request
{
"prompt": "A realistic photo of a golden retriever puppy playing in a sunlit meadow"
}
Full Request (all options)
{
"prompt": "A realistic photo of a golden retriever puppy playing in a sunlit meadow",
"resolution": "2K",
"num_images": 4,
"aspect_ratio": "1:1",
"output_format": "webp"
}
Response
{
"request_id": "kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Kling Image t2i generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-image-t2i' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-image-t2i",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-image-t2i_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-image-t2i",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx/output_0.ext",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx/output_1.ext",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx/output_2.ext",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-image-t2i_019dxxxx-xxxx/output_3.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Image 3 t2i API Pricing
Kling 1.6 API Documentation
https://gateway.pixazo.ai/kling-ai-video/v1/getImageToVideoTask
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image To Video Request - klingai Video API
Request Code
POST https://gateway.pixazo.ai/kling-ai-video/v1/getImageToVideoTask
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Bird fishing in water",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/b-d-a-lbdo-2-5-21.jpg",
"negative_prompt": "blur, distort, and low quality"
}
import requests
url = "https://gateway.pixazo.ai/kling-ai-video/v1/getImageToVideoTask"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Bird fishing in water",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/b-d-a-lbdo-2-5-21.jpg",
"negative_prompt": "blur, distort, and low quality"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-ai-video/v1/getImageToVideoTask';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'Bird fishing in water',
image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/b-d-a-lbdo-2-5-21.jpg',
negative_prompt: 'blur, distort, and low quality'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/kling-ai-video/v1/getImageToVideoTask" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" --data-raw '{
"prompt": "Bird fishing in water",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/b-d-a-lbdo-2-5-21.jpg",
"negative_prompt": "blur, distort, and low quality"
}'
Output
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "klingai-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "klingai-video",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Image To Video Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| image | Yes | string | — | — | Public URL of the input image to animate. Supported formats: JPG/PNG; max 10MB; minimum 300px on each side; aspect ratio between 1:2.5 and 2.5:1. |
| prompt | Yes | string | — | — | The instruction or description of the video scene to generate. Cannot exceed 2500 characters. |
| negative_prompt | Optional | string | — | — | Negative text prompt describing what to avoid in the video. Cannot exceed 2500 characters. |
| duration | Optional | string | 5 | 5, 10 | Length of the generated video, in seconds. |
| cfg_scale | Optional | float | 0.5 | 0 - 1 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP · < 10 MB | Input image to animate. |
Example Request
{
"prompt": "Bird fishing in water",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/b-d-a-lbdo-2-5-21.jpg",
"negative_prompt": "blur, distort, and low quality"
}
Response
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'klingai-video' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "klingai-video",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "klingai-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/klingai-video_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling 1.6 API Pricing
Kling 1.6 API Documentation
https://gateway.pixazo.ai/kling-ai-video/v1/generateVideoTask
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text To Video Request - klingai Video API
Request Code
POST https://gateway.pixazo.ai/kling-ai-video/v1/generateVideoTask
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "An enchanted forest with glowing mushrooms, fireflies, and a sparkling river flowing through the trees.",
"negative_prompt": "nude, porn, abusive"
}
import requests
url = "https://gateway.pixazo.ai/kling-ai-video/v1/generateVideoTask"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "An enchanted forest with glowing mushrooms, fireflies, and a sparkling river flowing through the trees.",
"negative_prompt": "nude, porn, abusive"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-ai-video/v1/generateVideoTask';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'An enchanted forest with glowing mushrooms, fireflies, and a sparkling river flowing through the trees.',
negative_prompt: 'nude, porn, abusive'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/kling-ai-video/v1/generateVideoTask" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "An enchanted forest with glowing mushrooms, fireflies, and a sparkling river flowing through the trees.",
"negative_prompt": "nude, porn, abusive"
}'
Output
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "klingai-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "klingai-video",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Text To Video Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | The instruction or description for the video scene to be generated. Cannot exceed 2500 characters |
| negative_prompt | No | string | — | — | Negative text prompt describing what to avoid in the video. Cannot exceed 2500 characters |
| duration | Optional | string | 5 | 5, 10 | Length of the generated video, in seconds. |
| cfg_scale | No | float | 0.5 | 0 - 1 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| aspect_ratio | No | string | 16:9 | 16:9, 9:16, 1:1 | The aspect ratio of the generated video frame (width:height). |
Example Request
{
"prompt": "An enchanted forest with glowing mushrooms, fireflies, and a sparkling river flowing through the trees.",
"negative_prompt": "nude, porn, abusive"
}
Response
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'klingai-video' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "klingai-video",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "klingai-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "klingai-video",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/klingai-video_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling 1.6 API Pricing
Kling O1 API Documentation
https://gateway.pixazo.ai/kling-o1-edit-video-video-to-video-634/v1/kling-o1-edit-video-video-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Generate Request - Kling O1 Edit Video API
Request Code
POST https://gateway.pixazo.ai/kling-o1-edit-video-video-to-video-634/v1/kling-o1-edit-video-video-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Transform the scene into a vibrant autumn forest with golden leaves falling and warm afternoon sunlight, while preserving the original motion and camera angles.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4"
}
import requests
url = "https://gateway.pixazo.ai/kling-o1-edit-video-video-to-video-634/v1/kling-o1-edit-video-video-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Transform the scene into a vibrant autumn forest with golden leaves falling and warm afternoon sunlight, while preserving the original motion and camera angles.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-o1-edit-video-video-to-video-634/v1/kling-o1-edit-video-video-to-video-request';
const data = {
prompt: "Transform the scene into a vibrant autumn forest with golden leaves falling and warm afternoon sunlight, while preserving the original motion and camera angles.",
video_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4"
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-o1-edit-video-video-to-video-634/v1/kling-o1-edit-video-video-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Transform the scene into a vibrant autumn forest with golden leaves falling and warm afternoon sunlight, while preserving the original motion and camera angles.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4"
}'
Output
{
"request_id": "kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-edit-video-video-to-video-634",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-edit-video-video-to-video-634",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Generate Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Natural language instruction describing the desired video transformation. Use placeholders like @Element1 and @Image1 to reference elements and images defined in the payload. |
| video_url | Yes | string | — | — | Reference video to be edited (must be publicly accessible). Only .mp4/.mov formats, 3–10 seconds, 720–2160px resolution, 24–60 FPS, max 200MB. |
| keep_audio | No | boolean | false | true, false | Whether to keep the original audio track from the reference video in the output. |
| image_urls | No | array of strings | [] | — | Reference images for style/appearance, referenced in the prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images). |
| elements | No | array of objects | [] | — | Elements (characters/objects) to include, referenced in the prompt as @Element1, @Element2, etc. Maximum 4 total (elements + reference images). |
| elements[i].frontal_image_url | Yes (within elements) | string | — | — | Front-facing image of the element used to preserve its identity throughout the video. |
| elements[i].reference_image_urls | No | array of strings | — | — | Additional reference images (side views, poses) for this element to keep it visually consistent. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| video | 1 | MP4, MOV | Source video to edit. |
| image | — | JPG, PNG, WEBP · < 10 MB | Reference image(s). |
Minimum Request
{
"prompt": "Replace tree with a Mango Tree with flower. All purpul flower color should change to yellow",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/kling-o1-reference-image-to-video-382/zLDbsHoe_0jS8ClKdo9P__output.mp4"
}
Full Request (all options)
{
"prompt": "Transform the scene into a vibrant autumn forest with golden leaves falling and warm afternoon sunlight, while preserving the original motion and camera angles.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"elements": [
{
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
],
"frontal_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
]
}
Response
{
"request_id": "kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Generate Request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-o1-edit-video-video-to-video-634' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-edit-video-video-to-video-634",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-edit-video-video-to-video-634",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-edit-video-video-to-video-634_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling O1 API Pricing
Kling O1 API Documentation
https://gateway.pixazo.ai/kling-o1-first-frame-last-frame-to-video-857/v1/kling-o1-first-frame-last-frame-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Generate Request - Kling O1 First Frame Last Frame to Video API
Request Code
POST https://gateway.pixazo.ai/kling-o1-first-frame-last-frame-to-video-857/v1/kling-o1-first-frame-last-frame-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5"
}
import requests
url = "https://gateway.pixazo.ai/kling-o1-first-frame-last-frame-to-video-857/v1/kling-o1-first-frame-last-frame-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-o1-first-frame-last-frame-to-video-857/v1/kling-o1-first-frame-last-frame-to-video-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.',
start_image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png',
end_image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png',
duration: '5'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-o1-first-frame-last-frame-to-video-857/v1/kling-o1-first-frame-last-frame-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5"
}'
Output
{
"request_id": "kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-first-frame-last-frame-to-video-857",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-first-frame-last-frame-to-video-857",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Generate Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | A detailed natural language description of the visual transformation you want to generate. Use @Image1 to reference the start frame and @Image2 to reference the end frame. |
| start_image_url | Yes | string | — | — | JPG or PNG image used as the first (start) frame of the video. Max 10MB, min 300×300px, aspect ratio 0.40–2.50. |
| end_image_url | No | string | — | — | Optional JPG or PNG image used as the last (end) frame. When provided, the model animates a transition from the start frame to this end frame. |
| duration | No | string | 5 | 3, 4, 5, 6, 7, 8, 9, 10 | Length of the generated video in seconds, passed as a numeric string. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP · < 10 MB | Start / end frame image. |
Example Request
{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png",
"duration": "5"
}
Response
{
"request_id": "kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-o1-first-frame-last-frame-to-video-857' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-first-frame-last-frame-to-video-857",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-first-frame-last-frame-to-video-857",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-first-frame-last-frame-to-video-857_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling O1 API Pricing
Kling O1 API Documentation
https://gateway.pixazo.ai/kling-o1-image-208/v1/kling-o1-image-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Generate Request - Kling O1 Image API
Request Code
POST https://gateway.pixazo.ai/kling-o1-image-208/v1/kling-o1-image-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "@image1 is the model and @image2 is the glasses. Perform a virtual try-on by placing the glasses from @image2 onto the model in @image1.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Captura-de-tela-2025-07-17%20171002.png"
],
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "auto",
"output_format": "png"
}
import requests
import json
url = "https://gateway.pixazo.ai/kling-o1-image-208/v1/kling-o1-image-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "@image1 is the model and @image2 is the glasses. Perform a virtual try-on by placing the glasses from @image2 onto the model in @image1.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Captura-de-tela-2025-07-17%20171002.png"
],
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "auto",
"output_format": "png"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-o1-image-208/v1/kling-o1-image-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: '@image1 is the model and @image2 is the glasses. Perform a virtual try-on by placing the glasses from @image2 onto the model in @image1.',
image_urls: [
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg',
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Captura-de-tela-2025-07-17%20171002.png'
],
resolution: '1K',
num_images: 1,
aspect_ratio: 'auto',
output_format: 'png'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-o1-image-208/v1/kling-o1-image-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "@image1 is the model and @image2 is the glasses. Perform a virtual try-on by placing the glasses from @image2 onto the model in @image1.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Captura-de-tela-2025-07-17%20171002.png"
],
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "auto",
"output_format": "png"
}'
Output
{
"request_id": "kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-image-208",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-image-208",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Generate Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | max 2500 characters | Text prompt describing the desired output. Reference input images using @Image1, @Image2, etc. Example: "@Image1 is the model and @Image2 is the glasses. Place the glasses from @Image2 onto the model in @Image1." |
| image_urls | Yes | array of strings | — | — | List of reference image URLs (up to 10), referenced in the prompt as @Image1, @Image2, etc. Each image: max 10MB, min 300×300px, aspect ratio 0.40–2.50. |
| elements | No | array of objects | — | — | Optional elements (characters/objects) to include in the output image, referenced in the prompt as @Element1, @Element2, etc. Maximum 10 total combined with reference images. |
| elements[i].frontal_image_url | Yes (within elements) | string | — | — | Front-facing image of the element used to preserve its identity. |
| elements[i].reference_image_urls | No | array of strings | — | — | Additional reference images of the element for visual consistency. |
| resolution | No | string | 1K | 1K, 2K | Output image resolution. 1K = standard, 2K = high-resolution. |
| num_images | No | integer | 1 | 1–9 | Number of output images to generate. |
| aspect_ratio | No | string | auto | auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 | Aspect ratio of the output image. "auto" adapts to the input image dimensions. |
| output_format | No | string | png | jpeg, png, webp | File format of the generated image. |
| sync_mode | No | boolean | false | true, false | If on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP · < 10 MB | Image(s) to edit. |
Example Request
{
"prompt": "@image1 is the model and @image2 is the glasses. Perform a virtual try-on by placing the glasses from @image2 onto the model in @image1.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Captura-de-tela-2025-07-17%20171002.png"
],
"resolution": "1K",
"num_images": 1,
"aspect_ratio": "auto",
"output_format": "png"
}
Response
{
"request_id": "kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-o1-image-208' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-image-208",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-o1-image-208_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-image-208",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-image-208_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling O1 API Pricing
Kling O1 API Documentation
https://gateway.pixazo.ai/kling-o1-reference-image-to-video-382/v1/kling-o1-reference-image-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Generate Request - Kling O1 Reference Image to Video API
Request Code
POST https://gateway.pixazo.ai/kling-o1-reference-image-to-video-382/v1/kling-o1-reference-image-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Take @Image1 as the start frame. Create a smooth cinematic transition that matches the style and composition of @Image2. The camera should move elegantly, maintaining visual consistency between the two reference images. Cinematic lighting, professional quality, 35mm lens.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png"
],
"duration": "5",
"aspect_ratio": "16:9"
}
import requests
url = "https://gateway.pixazo.ai/kling-o1-reference-image-to-video-382/v1/kling-o1-reference-image-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Take @Image1 as the start frame. Create a smooth cinematic transition that matches the style and composition of @Image2. The camera should move elegantly, maintaining visual consistency between the two reference images. Cinematic lighting, professional quality, 35mm lens.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png"
],
"duration": "5",
"aspect_ratio": "16:9"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-o1-reference-image-to-video-382/v1/kling-o1-reference-image-to-video-request';
const data = {
prompt: 'Take @Image1 as the start frame. Create a smooth cinematic transition that matches the style and composition of @Image2. The camera should move elegantly, maintaining visual consistency between the two reference images. Cinematic lighting, professional quality, 35mm lens.',
image_urls: [
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png',
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png'
],
duration: '5',
aspect_ratio: '16:9'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-o1-reference-image-to-video-382/v1/kling-o1-reference-image-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Take @Image1 as the start frame. Create a smooth cinematic transition that matches the style and composition of @Image2. The camera should move elegantly, maintaining visual consistency between the two reference images. Cinematic lighting, professional quality, 35mm lens.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f2.png"
],
"duration": "5",
"aspect_ratio": "16:9"
}'
Output
{
"request_id": "kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-reference-image-to-video-382",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-reference-image-to-video-382",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Generate Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Detailed description of the desired video motion, camera path, lighting, and styling. Use @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. |
| image_urls | No | array[string] | — | — | Optional additional reference images for style/appearance, referenced in the prompt as @Image1, @Image2, etc. Maximum 7 total (elements + reference images). |
| elements | No | array[object] | — | — | Elements (characters/objects) to include, referenced in the prompt as @Element1, @Element2, etc. Maximum 7 total combined with reference images. |
| elements[i].reference_image_urls | No | array[string] | — | — | Additional reference images of this element (side views, poses) to keep it looking consistent. |
| elements[i].frontal_image_url | Yes (within elements) | string | — | — | Front-facing image of the element used to preserve identity throughout the motion (e.g., character face or object front). |
| duration | No | string | 5 | 3, 4, 5, 6, 7, 8, 9, 10 | Duration of the generated video in seconds, passed as a numeric string. |
| aspect_ratio | No | string | 16:9 | 16:9, 9:16, 1:1 | Aspect ratio of the output video. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image_urls | — | JPG, PNG, WEBP · < 10 MB | Reference image(s). |
| reference_image_urls | — | JPG, PNG, WEBP · < 10 MB | Per-subject reference image(s). |
| frontal_image_url | 1 | JPG, PNG, WEBP · < 10 MB | Per-subject frontal image. |
Example Request
{
"prompt": "Take @Image1 as the start frame. Start with a high-angle satellite view of the ancient greenhouse ruin surrounded by nature. The camera swoops down and flies inside the building, revealing the character from @Element1 standing in the sun-drenched center. The camera then seamlessly transitions into a smooth 180-degree orbit around the character, moving to the back view. As the open backpack comes into focus, the camera continues to push forward, zooming deep inside the bag to reveal the glowing stone from @Element2 nestled inside. Cinematic lighting, hopeful atmosphere, 35mm lens. Make sure to keep it as the style of @Image2.",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
],
"elements": [
{
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://...NyJ6bnpa_xBue-K.png"
],
"frontal_image_url": "...qshvMZROKh9lW3.png"
},
{
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"frontal_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
}
],
"duration": "5",
"aspect_ratio": "16:9"
}
Response
{
"request_id": "kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-o1-reference-image-to-video-382' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-reference-image-to-video-382",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-o1-reference-image-to-video-382_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-reference-image-to-video-382",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-reference-image-to-video-382_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling O1 API Pricing
Kling O1 API Documentation
https://gateway.pixazo.ai/kling-o1-reference-video-to-video-315/v1/kling-o1-reference-video-to-video-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Generate Request - Kling O1 Reference Video to Video API
Request Code
POST https://gateway.pixazo.ai/kling-o1-reference-video-to-video-315/v1/kling-o1-reference-video-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Based on @Video1, generate the next shot. Keep the style of the video.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
"elements": [
{
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"frontal_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
],
"aspect_ratio": "16:9",
"duration": "5"
}
import requests
import json
url = "https://gateway.pixazo.ai/kling-o1-reference-video-to-video-315/v1/kling-o1-reference-video-to-video-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Based on @Video1, generate the next shot. Keep the style of the video.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
"elements": [
{
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"frontal_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
],
"aspect_ratio": "16:9",
"duration": "5"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
// For Node.js
// or use fetch in browsers
const url = 'https://gateway.pixazo.ai/kling-o1-reference-video-to-video-315/v1/kling-o1-reference-video-to-video-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'Based on @Video1, generate the next shot. Keep the style of the video.',
video_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4',
elements: [
{
reference_image_urls: [
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg'
],
frontal_image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg'
}
],
aspect_ratio: '16:9',
duration: '5'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/kling-o1-reference-video-to-video-315/v1/kling-o1-reference-video-to-video-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Based on @Video1, generate the next shot. Keep the style of the video.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
"elements": [
{
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"frontal_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
],
"aspect_ratio": "16:9",
"duration": "5"
}'
Output
{
"request_id": "kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-reference-video-to-video-315",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-reference-video-to-video-315",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Generate Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description guiding generation of the next shot. Use @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. |
| video_url | Yes | string | — | — | Reference video URL (must be publicly accessible). Only .mp4/.mov formats, 3–10 seconds, 720–2160px resolution, max 200MB. |
| keep_audio | No | boolean | false | true, false | Whether to keep the original audio track from the reference video in the output. |
| image_urls | No | array of strings | [] | — | Reference images for style/appearance, referenced in the prompt as @Image1, @Image2, etc. Maximum 4 total combined with elements. |
| elements | No | array of objects | [] | — | Elements (characters/objects) to include, referenced in the prompt as @Element1, @Element2, etc. Maximum 4 total combined with reference images. |
| elements.reference_image_urls | No | array of strings | — | — | Additional reference images to guide this element's look. |
| elements.frontal_image_url | Yes (within elements) | string | — | — | Front-facing image of the element used to maintain consistency in pose or facial appearance. |
| aspect_ratio | No | string | auto | auto, 16:9, 9:16, 1:1 | Aspect ratio of the output video. "auto" scales to match the input video. |
| duration | No | string | 5 | 3, 4, 5, 6, 7, 8, 9, 10 | Duration of the generated video in seconds, passed as a numeric string. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| video | 1 | MP4, MOV | Source video. |
| image_urls | — | JPG, PNG, WEBP · < 10 MB | Reference image(s). |
| reference_image_urls | — | JPG, PNG, WEBP · < 10 MB | Per-subject reference image(s). |
| frontal_image_url | 1 | JPG, PNG, WEBP · < 10 MB | Per-subject frontal image. |
Example Request
{
"prompt": "Based on @Video1, generate the next shot. Keep the style of the video.",
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
"elements": [
{
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"frontal_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
],
"aspect_ratio": "16:9",
"duration": "5"
}
Response
{
"request_id": "kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-o1-reference-video-to-video-315' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-o1-reference-video-to-video-315",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-o1-reference-video-to-video-315_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-o1-reference-video-to-video-315",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-o1-reference-video-to-video-315_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling O1 API Pricing
Kling Virtual Try-on API Documentation
https://gateway.pixazo.ai/kling-ai-vton/v1/getVirtualTryOnTask
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Generate Image Request - Kling Virtual Try On API
Request Code
POST https://gateway.pixazo.ai/kling-ai-vton/v1/getVirtualTryOnTask
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"human_image": "https://images.unsplash.com/photo-1529139574466-a303027c1d8b?w=512&q=80",
"cloth_image": "https://images.unsplash.com/photo-1620012253295-c15cc3e65df4?w=512&q=80",
"callback_url": ""
}
import requests
url = "https://gateway.pixazo.ai/kling-ai-vton/v1/getVirtualTryOnTask"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"human_image": "https://images.unsplash.com/photo-1529139574466-a303027c1d8b?w=512&q=80",
"cloth_image": "https://images.unsplash.com/photo-1620012253295-c15cc3e65df4?w=512&q=80",
"callback_url": ""
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/kling-ai-vton/v1/getVirtualTryOnTask';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
human_image: 'https://images.unsplash.com/photo-1529139574466-a303027c1d8b?w=512&q=80',
cloth_image: 'https://images.unsplash.com/photo-1620012253295-c15cc3e65df4?w=512&q=80',
callback_url: ''
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/kling-ai-vton/v1/getVirtualTryOnTask" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"human_image": "https://images.unsplash.com/photo-1529139574466-a303027c1d8b?w=512&q=80",
"cloth_image": "https://images.unsplash.com/photo-1620012253295-c15cc3e65df4?w=512&q=80",
"callback_url": ""
}'
Output
{
"request_id": "kling-ai-vton_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-ai-vton_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "kling-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-virtual-try-on",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.jpg"
],
"media_type": "image/jpeg"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "kling-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-virtual-try-on",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Generate Image Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| human_image | Yes | string | — | — | Upload your image. Ex: https://images.unsplash.com/photo-1529139574466-a303027c1d8b?w=512&q=80. Supported image formats include .jpg / .jpeg / .png. The image file size cannot exceed 10MB, and the image resolution should not be less than 300×300px. |
| cloth_image | Yes | string | — | — | Upload your image. Ex: https://images.unsplash.com/photo-1620012253295-c15cc3e65df4?w=512&q=80. The clothing/garment image to virtually try on the person. Supported image formats include .jpg / .jpeg / .png. The image file size cannot exceed 10MB, and the image resolution should not be less than 300×300px. |
| callback_url | No | string | None | — | Default: None. The callback notification address for the result of this task. If configured, the server will actively notify when the task status changes. The specific message schema of the notification can be found in "Callback Protocol". |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| human_image | 1 | JPG, PNG, WEBP · < 10 MB | Person / model photo. |
| cloth_image | 1 | JPG, PNG, WEBP · < 10 MB | Garment image. |
Example Request
{
"human_image": "https://images.unsplash.com/photo-1529139574466-a303027c1d8b?w=512&q=80",
"cloth_image": "https://images.unsplash.com/photo-1620012253295-c15cc3e65df4?w=512&q=80",
"callback_url": ""
}
Response
{
"request_id": "kling-ai-vton_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-ai-vton_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your subscription key |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'kling-ai-vton' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "kling-ai-vton_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "kling-ai-vton",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/kling-ai-vton_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "kling-ai-vton_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-ai-vton",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-ai-vton_019dxxxx-xxxx/output.jpg"
],
"media_type": "image/jpeg"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Kling Virtual Try-on API Pricing
Kling Lipsync API Documentation
POST https://gateway.pixazo.ai/kling-lipsync-text-to-video/v1/text-to-video/lip-sync
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Video + Text to Video - Kling Lipsync Text to Video
Request Code
POST https://gateway.pixazo.ai/kling-lipsync-text-to-video/v1/text-to-video/lip-sync
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
"text": "Mental health is as important as physical health.",
"voice_id": "genshin_klee2",
"voice_language": "en",
"voice_speed": 1
}
import requests
url = "https://gateway.pixazo.ai/kling-lipsync-text-to-video/v1/text-to-video/lip-sync"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
payload = {
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
"text": "Mental health is as important as physical health.",
"voice_id": "genshin_klee2",
"voice_language": "en",
"voice_speed": 1
}
resp = requests.post(url, headers=headers, json=payload)
print(resp.json()) # { "request_id": "...", "status": "QUEUED", "polling_url": "..." }
const res = await fetch("https://gateway.pixazo.ai/kling-lipsync-text-to-video/v1/text-to-video/lip-sync", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
video_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
text: "Mental health is as important as physical health.",
voice_id: "genshin_klee2",
voice_language: "en",
voice_speed: 1
})
});
const data = await res.json();
console.log(data); // { request_id, status: "QUEUED", polling_url }
curl -X POST "https://gateway.pixazo.ai/kling-lipsync-text-to-video/v1/text-to-video/lip-sync" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
"text": "Mental health is as important as physical health.",
"voice_id": "genshin_klee2",
"voice_language": "en",
"voice_speed": 1
}'
Output
{
"request_id": "kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Instead of polling, you can receive a callback when the request reaches a terminal state. Pass the webhook headers on the submit request; the gateway will POST the result to your URL.
| Header | Type | Required | Description |
|---|---|---|---|
| X-Webhook-URL | string | No | HTTPS URL to receive the callback. Providing it enables webhook delivery. |
| X-Webhook-Mode | string | No | terminal (default) fires once on COMPLETED/ERROR; sync fires on each status transition. |
Example: enable webhook
curl -X POST "https://gateway.pixazo.ai/kling-lipsync-text-to-video/v1/text-to-video/lip-sync" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
-H "X-Webhook-URL: https://your-server.com/webhooks/pixazo" \
-H "X-Webhook-Mode: terminal" \
--data-raw '{ "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4", "text": "Mental health is as important as physical health.", "voice_id": "genshin_klee2", "voice_language": "en", "voice_speed": 1 }'
Callback Payload (success)
{
"request_id": "kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-lipsync-text-to-video",
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-lipsync-text-to-video_019dxxxx.../output.mp4"],
"media_type": "video/mp4"
}
}
Failure callback shape
{
"request_id": "kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"error": "Failed to download the file. Please check if the URL is accessible."
}
- terminal mode delivers one callback on COMPLETED or ERROR; sync mode delivers on each status transition.
- Deliveries are keyed by
request_id— make your handler idempotent. - Respond with HTTP 200 within a few seconds; non-2xx responses are retried.
- The webhook URL must be HTTPS and publicly reachable.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| video_url | Yes | string | — | — | Upload the talking-head video to animate (MP4 or MOV), ≤100MB, 2–60s, 720p/1080p only (width/height 720–1920px). Validation fails otherwise. |
| text | Yes | string | — | ≤120 characters | Text to synthesize into speech and lip-sync onto the video. Maximum 120 characters. |
| voice_id | Yes | string | — | genshin_vindi2, zhinen_xuesheng, AOT, ai_shatang, genshin_klee2, genshin_kirara, ai_kaiya, oversea_male1, ai_chenjiahao_712, girlfriend_4_speech02, chat1_female_new-3, chat_0407_5-1, cartoon-boy-07, uk_boy1, cartoon-girl-01, PeppaPig_platform, ai_huangzhong_712, ai_huangyaoshi_712, ai_laoguowang_712, chengshu_jiejie, you_pingjing, calm_story1, uk_man2, laopopo_speech02, heainainai_speech02, reader_en_m-v1, commercial_lady_en_f-v1, tiyuxi_xuedi, tiexin_nanyou, girlfriend_1_speech02, girlfriend_2_speech02, zhuxi_speech02, uk_oldman3, dongbeilaotie_speech02, chongqingxiaohuo_speech02, chuanmeizi_speech02, chaoshandashu_speech02, ai_taiwan_man2_speech02, xianzhanggui_speech02, tianjinjiejie_speech02, diyinnansang_DB_CN_M_04-v2, yizhipiannan-v1, guanxiaofang-v2, tianmeixuemei-v1, daopianyansang-v1, mengwa-v1 | Voice ID used for speech synthesis. |
| voice_language | No | string | en | zh, en | Language of the synthesized voice. |
| voice_speed | No | float | 1 | 0.8–2 | Speech rate for the generated speech. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| video | 1 | MP4, MOV · < 100 MB | Reference video (2–60s). |
Example Request
{
"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
"text": "Mental health is as important as physical health.",
"voice_id": "genshin_klee2",
"voice_language": "en",
"voice_speed": 1
}
Example Response
{
"request_id": "kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Required | Description |
|---|---|---|
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| Content-Type | Yes | Must be application/json. |
| X-Webhook-URL | No | HTTPS callback URL (see Webhook section). |
Response Handling
Common status codes returned by the submit endpoint.
| Status Code | Meaning |
|---|---|
| 202 Accepted | Request queued. Returns request_id, status: "QUEUED", and polling_url. |
| 400 Bad Request | Invalid request body or unknown model. |
| 401 Unauthorized | Missing or invalid subscription key. |
| 402 Payment Required | Insufficient wallet balance. |
| 403 Forbidden | Subscription not permitted to access this API. |
| 429 Too Many Requests | Rate limit exceeded. |
| 500 Internal Server Error | Unexpected gateway error. |
Error Responses
Queue-system errors are returned at submit time; generation errors are surfaced via the status endpoint / webhook with status: "ERROR".
// 402 — insufficient balance
{ "error": "Insufficient balance", "message": "Wallet balance is too low for this request." }
// 400 — model not found / invalid body
{ "error": "Model not found", "message": "Model 'kling-lipsync-text-to-video' not found or is disabled" }
// generation failure (via status / webhook)
{ "request_id": "kling-lipsync-text-to-video_019dxxxx...", "status": "ERROR", "error": "Failed to download the input file." }
Retrieving Results
Poll the status endpoint with the request_id until status is COMPLETED (or FAILED/ERROR).
curl -X GET "https://gateway.pixazo.ai/v2/requests/status/kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"
Completed response
{
"request_id": "kling-lipsync-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "kling-lipsync-text-to-video",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/kling-lipsync-text-to-video_019dxxxx.../output.mp4"],
"media_type": "video/mp4"
},
"created_at": "2026-06-30T09:20:33.812Z",
"completed_at": "2026-06-30T09:22:19.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique identifier for the request. |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR. |
| model_id | string | The model that handled the request (kling-lipsync-text-to-video). |
| error | string | null | Error message when the request fails; null otherwise. |
| output.media_url | string[] | Array of URLs to the generated lip-synced MP4 video. |
| output.media_type | string | MIME type of the output (video/mp4). |
| created_at | string | ISO-8601 timestamp when the request was created. |
| completed_at | string | ISO-8601 timestamp when the request reached a terminal state. |
| polling_url | string | URL to poll for status (returned on submit). |
Status Values & Flow
| Status | Meaning |
|---|---|
| QUEUED | Request accepted and waiting to be processed. |
| PROCESSING | The lip-sync job is running. |
| COMPLETED | Done — output.media_url contains the synced video. |
| FAILED / ERROR | Generation failed — see error. |
Typical workflow
QUEUED → PROCESSING → COMPLETED (or FAILED / ERROR). Submit the request, then poll GET /v2/requests/status/{request_id} (or use a webhook) until the status is terminal, then download the video from output.media_url.
Kling Lipsync API Pricing
⚡ Performance
Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.
