Kling Video 3 Turbo Pro API, Kling Video 3.0 Motion Control API, Kling Video O3 API, Kling 2.6 API: Pricing, Documentation
by Kuaishou
Kling Video 3 Turbo Pro API, developers can generate high-quality videos from text and images, with advanced features like motion control, video-to-video editing, and avatar generation. The API supports extended video lengths and cinematic quality output.
Models Version
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
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 — Per-Second Rates
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 — Per-Second Rates
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 — Per-Second Rates
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. |
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"
}
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"
}
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"
};
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"
}'
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"
}
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"
}
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"
}
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'
};
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"
}'
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"
}
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.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. |
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": "4K",
"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.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://example.com/input-video.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://example.com/input-video.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://example.com/input-video.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://example.com/input-video.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 | — | 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://example.com/input-video.mp4",
"image_urls": [
"https://example.com/background.jpg"
],
"elements": [
{
"reference_image_urls": [
"https://example.com/reference1.jpg",
"https://example.com/reference2.jpg"
],
"frontal_image_url": "https://example.com/frontal.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. |
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://...23FGBYdGLgbK3u.png",
"https://...uKQFSE7A7c5uUeUF.png"
],
"elements": [
{
"reference_image_urls": [
"https://...t9xugpOTQyZW0O.png",
"https://...NyJ6bnpa_xBue-K.png"
],
"frontal_image_url": "...qshvMZROKh9lW3.png"
},
{
"reference_image_urls": [
"https://...Wihspyv4pp6hgj7D.png"
],
"frontal_image_url": "https://...HJlgcaTyR5Ujj2H.png"
}
],
"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://example.com/media/scene1.mp4",
"elements": [
{
"reference_image_urls": [
"https://example.com/images/style_frame_1.png"
],
"frontal_image_url": "https://example.com/images/frontal_pose.png"
}
],
"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://example.com/media/scene1.mp4",
"elements": [
{
"reference_image_urls": [
"https://example.com/images/style_frame_1.png"
],
"frontal_image_url": "https://example.com/images/frontal_pose.png"
}
],
"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://example.com/media/scene1.mp4',
elements: [
{
reference_image_urls: [
'https://example.com/images/style_frame_1.png'
],
frontal_image_url: 'https://example.com/images/frontal_pose.png'
}
],
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://example.com/media/scene1.mp4",
"elements": [
{
"reference_image_urls": [
"https://example.com/images/style_frame_1.png"
],
"frontal_image_url": "https://example.com/images/frontal_pose.png"
}
],
"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 | — | 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://example.com/media/scene1.mp4",
"elements": [
{
"reference_image_urls": [
"https://example.com/images/style_frame_1.png"
],
"frontal_image_url": "https://example.com/images/frontal_pose.png"
}
],
"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://example.com/input.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://example.com/input.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://example.com/input.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://example.com/input.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://example.com/input.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://example.com/input.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.
