Kling Video 3.0 Motion Control API, Kling 3.0, 2.6, 2.0, 1.6, O1 API - AI Video Generation APIs
by Kuaishou
Kling Video 3.0 Motion Control 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 Image O3 Text to Image API Documentation
https://gateway.pixazo.ai/kling-image/v1
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": "auto",
"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": "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/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": "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/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": "auto",
"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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling Image O3 Text to Image - Kling Image API
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| prompt | Yes | string | — | Text description of the image to generate. Max 2500 characters. |
| resolution | No | string | 1K | Target output resolution. Supported: "1K", "2K", "4K". Higher resolutions increase cost. |
| result_type | No | string | single | Output type: "single" for one or more independent results, "series" for a coordinated sequence. |
| num_images | No | integer | 1 | Number of output images to generate (1-9). Only applicable when result_type is "single". |
| series_amount | No | integer | — | Number of images in a coordinated sequence (2-9). Only applicable when result_type is "series". |
| aspect_ratio | No | string | auto | Desired aspect ratio: "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9". |
| output_format | No | string | png | Output image format: "png", "jpeg", or "webp". |
| sync_mode | No | boolean | false | If true, returns image as data URI directly in the response instead of a URL. |
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 Text to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| 1K | $0.028 |
| 2K | $0.028 |
| 4K | $0.056 |
Kling Image O3 Image to Image (Image Editing) API Documentation
https://gateway.pixazo.ai/kling-image-o3-i2i/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling Image O3 Image to Image - Kling Image O3 i2i API
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| prompt | Yes | string | — | Text description of how to transform the input image. Max 2500 characters. |
| image_urls | Yes | array of strings | — | Array of 1-10 HTTPS URLs pointing to reference images. Multiple references can be controlled with @Image1, @Image2 syntax in the prompt. |
| elements | No | array | — | ElementInput objects for advanced face control and character consistency. |
| resolution | No | string | 1K | Target output resolution. Supported: "1K", "2K", "4K". Higher resolutions increase cost. |
| result_type | No | string | single | Output type: "single" for one or more independent results, "series" for a coordinated sequence. |
| num_images | No | integer | 1 | Number of output images to generate (1-9). Only applicable when result_type is "single". |
| series_amount | No | integer | — | Number of images in a coordinated sequence (2-9). Only applicable when result_type is "series". |
| aspect_ratio | No | string | auto | Desired aspect ratio: "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9". "auto" preserves the input image's aspect ratio. |
| output_format | No | string | png | Output image format: "png", "jpeg", or "webp". |
| sync_mode | No | boolean | false | If true, returns image as data URI directly in the response instead of a URL. |
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 Image to Image (Image Editing) API Pricing
| Resolution | Price (USD) |
|---|---|
| 1K | $0.028 |
| 2K | $0.028 |
| 4K | $0.056 |
Kling 3.0 Text to Video API Documentation
https://gateway.pixazo.ai/kling-3-0-text-to-video-standard/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling 3.0 Text to Video Standard generate request
| Parameter | Required | Type | Description |
|---|---|---|---|
| prompt | Yes | string | A detailed text description of the desired video scene. Be specific about camera movement, lighting, mood, and visual elements for best results. |
| duration | Yes | string | Duration of the generated video in seconds. Must be between "3" and "15". |
| multi_prompt | No | string or null | Optional secondary prompt for multi-sequence video generation. Use null for single-prompt generation. |
| generate_audio | No | boolean | Whether to generate synchronized audio with the video. Set to false to disable audio. |
| shot_type | No | string | Type of camera shot. Options: "customize", "static", "pan", "zoom", "dolly". |
| aspect_ratio | No | string | Output video aspect ratio. Options: "16:9", "9:16", "1:1". |
| negative_prompt | No | string | Describes undesired elements to avoid in the output. Helps refine visual quality. |
| cfg_scale | No | number | Classifier-free guidance scale. Controls how closely the output adheres to the prompt. Range: 0.1 to 2.0. Higher values increase prompt fidelity. |
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 | 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 |
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-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 Text to Video API Pricing
| Resolution | Price (USD) |
|---|---|
| Per second of output video (Audio Off) | $0.168 |
| Per second of output video (Audio On) | $0.252 |
Kling 3.0 Image to Video API Documentation
https://gateway.pixazo.ai/kling-3-0-image-to-video-standard/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling 3.0 Image to Video Standard generate request
| Parameter | Required | Type | Description |
|---|---|---|---|
| prompt | Yes | string | Detailed text description of the desired video transformation, including motion, lighting, and style. |
| start_image_url | Yes | string | Publicly accessible URL of the starting image for the video transition. |
| end_image_url | Yes | string | Publicly accessible URL of the ending image for the video transition. |
| duration | Yes | string | Duration of the generated video in seconds. Must be between 3 and 15. |
| multi_prompt | No | string or null | Optional additional prompt for complex scene variations. Use null if not needed. |
| generate_audio | Yes | boolean | Whether to generate synchronized ambient audio matching the video motion and mood. |
| shot_type | Yes | string | Type of camera motion. Options: "customize", "pan_left", "pan_right", "zoom_in", "zoom_out", "tilt_up", "tilt_down". |
| aspect_ratio | Yes | string | Output video aspect ratio. Options: "16:9", "9:16", "1:1". |
| negative_prompt | No | string | Describes undesired elements to avoid in the output (e.g., blur, distort, low quality). |
| cfg_scale | No | number | Control the influence of the prompt on the generation. Lower values (0.1–0.5) allow more creative freedom; higher values (0.6–2.0) follow the prompt more strictly. |
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 | 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 |
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-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 Image to Video API Pricing
| Resolution | Price (USD) |
|---|---|
| Per second of output video (Audio Off) | $0.168 |
| Per second of output video (Audio On) | $0.252 |
Kling Image V3 t2i Text to Image API Documentation
https://gateway.pixazo.ai/kling-image-t2i/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling Image t2i generate request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | Text description describing the desired image. Be specific for optimal results. |
| resolution | string | No | 1K | Image resolution: "1K", "2K", or "4K". Higher resolutions require more processing time. |
| num_images | integer | No | 1 | Number of images to generate per request. Must be between 1 and 4. |
| aspect_ratio | string | No | 16:9 | Image aspect ratio. Supported values: "1:1", "4:3", "16:9", "9:16", "21:9". |
| output_format | string | No | png | Output image format. Supported values: "png", "jpeg", "webp". |
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 |
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-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 V3 t2i Text to Image API Pricing
No data available
Could not load current pricing
Kling Image V3 t2i Text To Image API Documentation
https://gateway.pixazo.ai/kling-image-t2i/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling Image t2i generate request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | Text description describing the desired image. Be specific for optimal results. |
| resolution | string | No | 1K | Image resolution: "1K", "2K", or "4K". Higher resolutions require more processing time. |
| num_images | integer | No | 1 | Number of images to generate per request. Must be between 1 and 4. |
| aspect_ratio | string | No | 16:9 | Image aspect ratio. Supported values: "1:1", "4:3", "16:9", "9:16", "21:9". |
| output_format | string | No | png | Output image format. Supported values: "png", "jpeg", "webp". |
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 |
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-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 V3 t2i Text To Image API Pricing
No data available
Could not load current pricing
Kling v2.6 Standard Video to Video (Video Editing — Motion Control) API Documentation
https://gateway.pixazo.ai/kling-video-v2-6-standard-motion-control/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling Video v2.6 Standard Motion Control generate request
| Parameter | Required | Type | Description |
|---|---|---|---|
| image_url | Yes | string | URL pointing to the static character image (JPEG/PNG) to which motion will be transferred. Must be publicly accessible. Maximum allowed size of 10485760 bytes |
| video_url | Yes | string | URL pointing to the reference video containing the motion to transfer (MP4). Must be publicly accessible and under 10 seconds. |
| character_orientation | No | string | Specifies how the character in the image should align with the video motion. Use "video" to match the video’s orientation or "image" to match the image’s orientation. |
| keep_original_sound | No | boolean | If true, preserves the audio from the reference video in the output. If false, output will be silent. |
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 v2.6 Standard Video to Video (Video Editing — Motion Control) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.07 |
Kling Avatar v2 Pro Audio to Video (Ref Image + Ref Audio to Video — Avatar) API Documentation
https://gateway.pixazo.ai/kling-ai-avatar-v2-pro-789/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Kling AI Avatar v2 Pro generate request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| image_url | string | Yes | — | Publicly accessible URL to a static image (face portrait) to be animated. Supported formats: JPEG, PNG. |
| audio_url | string | Yes | — | Publicly accessible URL to an audio file (MP3, WAV) to drive lip-sync and expression animation. Maximum duration: 60 seconds. |
| prompt | string | No | ." | Additional descriptive prompt to guide avatar expression and motion style. Example: "smiling warmly, slight head turn". |
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 |
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-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 v2 Pro Audio to Video (Ref Image + Ref Audio to Video — Avatar) API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| All | 1s | $0.115 per second |
Kling v1.6 Image to Video API Documentation
https://gateway.pixazo.ai/kling-ai-video/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Image To Video Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| image | Yes | string | Support inputting image Base64 encoding or image URL (ensure accessibility). Ex: https://pub-582b7213209642b9b995c96c95a30381.r2.dev/b-d-a-lbdo-2-5-21.jpg. Please note, if you use the Base64 method, make sure all image data parameters you pass are in Base64 encoding format. When submitting data, do not add any prefixes to the Base64-encoded string, such as data:image/png;base64. The correct parameter format should be the Base64-encoded string itself. |
| prompt | Yes | string | Default: null, The instruction or description for the video scene to be generated. Cannot exceed 2500 characters |
| negative_prompt | Optional | string | Negative text prompt. Cannot exceed 2500 characters |
| duration | Optional | string | The duration of the generated video in seconds Default value: "5". Possible enum values: 5, 10 |
| cfg_scale | Optional | float | Default 0.5, Value range: [0, 1]. Flexibility in video generation; The higher the value, the lower the model's degree of flexibility, and the stronger the relevance to the user's prompt |
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 v1.6 Image to Video API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| All Resolution | 1s | $0.07 |
Kling v1.6 Text to Video API Documentation
https://gateway.pixazo.ai/kling-ai-video/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Text To Video Request
| Parameter | Required | Type | 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. Cannot exceed 2500 characters |
| duration | Optional | string | The duration of the generated video in seconds Default value: "5". Possible enum values: 5, 10 |
| cfg_scale | No | float | Default 0.5, Value range: [0, 1]. Flexibility in video generation; The higher the value, the lower the model's degree of flexibility, and the stronger the relevance to the user's prompt |
| aspect_ratio | No | string | Default: 16:9. The aspect ratio of the generated video frame (width:height). Enum values:16:9, 9:16, 1:1 |
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 v1.6 Text to Video API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| All Resolution | 1s | $0.07 |
Kling O1 Video to Video (Video Editing) API Documentation
https://gateway.pixazo.ai/kling-o1-edit-video-video-to-video-634/v1
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": "Replace the character in the video with @Element1, maintaining the same movements and camera angles. Transform the landscape into @Image1",
"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": "Replace the character in the video with @Element1, maintaining the same movements and camera angles. Transform the landscape into @Image1",
"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: "Replace the character in the video with @Element1, maintaining the same movements and camera angles. Transform the landscape into @Image1",
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": "Replace the character in the video with @Element1, maintaining the same movements and camera angles. Transform the landscape into @Image1",
"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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Generate Request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | 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 | string | Yes | — | Publicly accessible URL of the input video to be edited. Must be accessible without authentication. Reference video URL. Only .mp4/.mov formats supported, 3-10 seconds duration, 720-2160px resolution, max 200MB. Min width: 720px, Min height: 720px, Max width: 2160px, Max height: 2160px, Min duration: 3.0s, Max duration: 10.05s, Min FPS: 24.0, Max FPS: 60.0, Timeout: 30.0s |
| image_urls | array of strings | No | [] | Array of image URLs to be used as background or environment replacements in the prompt (referenced as @Image1, @Image2, etc.). |
| elements | array of objects | No | [] | Array of element definitions containing reference and frontal images for subject replacement. Each element is referenced in the prompt via @Element1, @Element2, etc. |
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": "Replace the character in the video with @Element1, maintaining the same movements and camera angles. Transform the landscape into @Image1",
"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 |
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-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 Video to Video (Video Editing) API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| All | 1s | $0.168 per second |
Kling O1 Image to Video (First/Last Frame to Video) API Documentation
https://gateway.pixazo.ai/kling-o1-first-frame-last-frame-to-video-857/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Generate Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| prompt | Yes | string | A detailed natural language description of the visual transformation you want to generate. Include motion, lighting, style, and mood. |
| start_image_url | Yes | string | Publicly accessible URL to the JPG or PNG image that represents the starting frame of the video. |
| end_image_url | Yes | string | Publicly accessible URL to the JPG or PNG image that represents the ending frame of the video. |
| duration | Optional | string | Duration of the resulting video in seconds. Must be a numeric string (e.g., "5", "10"). |
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 Image to Video (First/Last Frame to Video) API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| All | 1s | $0.112 per second |
Kling O1 Image to Image API Documentation
https://gateway.pixazo.ai/kling-o1-image-208/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Generate Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| prompt | Yes | string | A detailed textual instruction describing the transformation. Must reference images using `@image1` and `@image2` to indicate subject and source. Example: `"@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 | Yes | array of strings | Array of two URLs pointing to the source images. `@image1` corresponds to the first URL (subject), `@image2` to the second URL (reference object). |
| resolution | No | string | Target resolution of the output image. Accepted values: `"1K"`, `"2K"`, `"4K"`. |
| num_images | No | integer | Number of output images to generate. Supported values: 1–4. |
| aspect_ratio | No | string | Desired aspect ratio for the output. Accepted values: `"auto"`, `"1:1"`, `"4:3"`, `"16:9"`, `"9:16"`. `"auto"` adapts to input image dimensions. |
| output_format | No | string | Format of the generated image output. Accepted values: `"png"`, `"jpeg"`. |
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 Image to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.028 |
Kling O1 Reference to Video (Ref Image to Video) API Documentation
https://gateway.pixazo.ai/kling-o1-reference-image-to-video-382/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Generate Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| prompt | Yes | string | Detailed textual description of the desired video motion, camera path, lighting, and styling. Use `@Image{i}` to reference input images and `@Element{i}` to reference visual elements. |
| image_urls | Yes | array[string] | Array of URLs pointing to reference images. Use `@Image1`, `@Image2`, etc. in the prompt to reference these in order. Must contain at least one image. |
| elements | No | array[object] | Array of visual elements to anchor in the video. Each element contains reference images and a frontal image for identity consistency. |
| elements[i].reference_image_urls | No | array[string] | Array of URLs for additional reference images of the element (e.g., side views, poses) to improve consistency. |
| elements[i].frontal_image_url | No | string | Front-facing image of the element used to preserve identity throughout motion (e.g., character face or object front). |
| duration | No | string | Duration of the generated video in seconds. Valid values: "3", "5", "10". |
| aspect_ratio | No | string | Aspect ratio of the output video. Valid values: "16:9", "9:16", "1:1". |
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 Reference to Video (Ref Image to Video) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.9 |
Kling O1 Reference to Video (Ref Video to Video) API Documentation
https://gateway.pixazo.ai/kling-o1-reference-video-to-video-315/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Generate Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| prompt | Yes | string | Text description guiding the generation of the next shot. Should reference the reference video and desired style or action. |
| video_url | Yes | string | Publicly accessible URL to the input reference video. Must be a stable link (e.g., HTTPS). |
| image_urls | No | array of strings | Array of image URLs to supplement visual context. These are ignored if `elements` is provided. |
| elements | No | array of objects | Array of element objects for advanced control over specific regions. Each element defines a reference image and frontal view. This overrides `image_urls`. |
| elements.reference_image_urls | Yes (within elements) | array of strings | Array of reference images to guide the visual style of the generated segment. Used in conjunction with `frontal_image_url`. |
| elements.frontal_image_url | Yes (within elements) | string | Frontal view image of a subject to maintain consistency in pose or facial appearance. |
| aspect_ratio | No | string | Desired aspect ratio of the output video. "auto" scales to match the input video. Values: "auto", "1:1", "16:9", "9:16". |
| duration | No | string | Desired duration of the generated video in seconds. Accepts integer values as strings (e.g., "5", "10"). |
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 Reference to Video (Ref Video to Video) API Pricing
No data available
Could not load current pricing
Kling v1 Image to Image (Virtual Try On) API Documentation
https://gateway.pixazo.ai/kling-ai-vton/v1
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://storage.googleapis.com/imagesai.appypie.com/testing/00034_00.jpg",
"image_tail": "https://storage.googleapis.com/imagesai.appypie.com/testing/04469_00.jpg",
"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://storage.googleapis.com/imagesai.appypie.com/testing/00034_00.jpg",
"image_tail": "https://storage.googleapis.com/imagesai.appypie.com/testing/04469_00.jpg",
"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://storage.googleapis.com/imagesai.appypie.com/testing/00034_00.jpg',
image_tail: 'https://storage.googleapis.com/imagesai.appypie.com/testing/04469_00.jpg',
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://storage.googleapis.com/imagesai.appypie.com/testing/00034_00.jpg",
"image_tail": "https://storage.googleapis.com/imagesai.appypie.com/testing/04469_00.jpg",
"callback_url": ""
}'
Output
{
"request_id": "kling-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-virtual-try-on_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 - Generate Image Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| human_image | Yes | string | Support inputting image Base64 encoding or image URL (ensure accessibility). Ex: https://storage.googleapis.com/imagesai.appypie.com/testing/00034_00.jpg. Please note, if you use the Base64 method, make sure all image data parameters you pass are in Base64 encoding format. When submitting data, do not add any prefixes to the Base64-encoded string, such as data:image/png;base64. The correct parameter format should be the Base64-encoded string itself. 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 |
| image_tail | No | string | Default: null, Support inputting image Base64 encoding or image URL (ensure accessibility). Ex: https://storage.googleapis.com/imagesai.appypie.com/testing/04469_00.jpg. Please note, if you use the Base64 method, make sure all image data parameters you pass are in Base64 encoding format. When submitting data, do not add any prefixes to the Base64-encoded string, such as data:image/png;base64. The correct parameter format should be the Base64-encoded string itself. 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 | 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" |
Example Request
{
"human_image": "https://storage.googleapis.com/imagesai.appypie.com/testing/00034_00.jpg",
"image_tail": "https://storage.googleapis.com/imagesai.appypie.com/testing/04469_00.jpg",
"callback_url": ""
}
Response
{
"request_id": "kling-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/kling-virtual-try-on_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-virtual-try-on' not found or is disabled"
}
Error via Status/Webhook
{
"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
}
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-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"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/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 v1 Image to Image (Virtual Try On) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.14 |
