Kling
Kuaishou · Video
kling- Modes
- 3
Modes and prices
- The cheapest mode: T2v
- 30 tokens
- per video 5 s
A mode is a version or variant of the model with its own price and parameters. Without mode the default one is used.
| Mode | Price |
|---|---|
T2vt2vduration 5 — 30 · duration 10 — 50 balance tokens per video | 30 tokensper video 5 s |
I2vi2vduration 5 — 40 · duration 10 — 60 balance tokens per video | 40 tokensper video 5 s |
Kling 3.0kling3std — 15 · pro — 17 balance tokens per second | 75 tokensper video 5 s · std |
Mode
T2v
"model": "kling:t2v"Price
30 tokens per video 5 s. This is the price of the example request below, in balance tokens. POST /v1/quotes gives the exact price of your request before it runs.duration: 5
balance tokens per video
| duration | Price |
|---|---|
| 5 | 30 |
| 10 | 50 |
The highlighted price is the example request's.
All price rules: 2
The rules go in order: the first one a request matches sets its price.
| duration | Price |
|---|---|
| 5 | 30 per generation |
| 10 | 50 per generation |
Price make-up (pricing from GET /v1/models/{id})
{
"unit": "tokens",
"kind": "by_parameters",
"base": 30,
"example_price": 30,
"matrix": [
{
"when": {
"duration": "5"
},
"price": 30
},
{
"when": {
"duration": "10"
},
"price": 50
}
]
}Example request
curl https://api.unitool.ai/v1/generations \
-H "Authorization: Bearer $UNITOOL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=60" \
-d '{
"model": "kling",
"mode": "t2v",
"input": {
"prompt": "A red fox running through fresh snow at sunrise",
"aspect_ratio": "16:9",
"duration": "5"
},
"metadata": {
"order_id": "A-1042"
}
}'{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "t2v",
"status": "queued",
"progress": 0,
"cost": {
"estimated_tokens": 30,
"charged_tokens": 0,
"refunded_tokens": 0,
"settled": false
},
"outputs": [],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": null,
"expires_at": null
}Result
While the generation runs, read it by id: the status changes from queued or running to succeeded. With the Prefer: wait header the finished object may come in the answer to POST itself, as 200 instead of 202.
curl https://api.unitool.ai/v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60 \
-H "Authorization: Bearer $UNITOOL_API_KEY"{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "t2v",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 30,
"charged_tokens": 30,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "video",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
"content_type": "video/mp4",
"width": 1280,
"height": 720,
"duration_sec": 5,
"size": 6815744,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}If the generation fails
The HTTP answer is still 200. The reason is in error.code, what happened to the tokens in error.refund. All codes: Media generations
{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "t2v",
"status": "failed",
"progress": 0,
"cost": {
"estimated_tokens": 30,
"charged_tokens": 30,
"refunded_tokens": 30,
"settled": true
},
"outputs": [],
"error": {
"code": "model_error",
"message": "The model failed to produce a result.",
"refund": "full"
},
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": null
}Parameters
| Parameter | Description |
|---|---|
promptstring · required | |
aspect_ratiostring | Values:16:99:161:1Default "16:9" |
durationstring | Values:510Default "5" |
I2v
"model": "kling:i2v"Price
40 tokens per video 5 s. This is the price of the example request below, in balance tokens. POST /v1/quotes gives the exact price of your request before it runs.duration: 5
balance tokens per video
| duration | Price |
|---|---|
| 5 | 40 |
| 10 | 60 |
The highlighted price is the example request's.
All price rules: 2
The rules go in order: the first one a request matches sets its price.
| duration | Price |
|---|---|
| 5 | 40 per generation |
| 10 | 60 per generation |
Price make-up (pricing from GET /v1/models/{id})
{
"unit": "tokens",
"kind": "by_parameters",
"base": 40,
"example_price": 40,
"matrix": [
{
"when": {
"duration": "5"
},
"price": 40
},
{
"when": {
"duration": "10"
},
"price": 60
}
]
}Example request
curl https://api.unitool.ai/v1/generations \
-H "Authorization: Bearer $UNITOOL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=60" \
-d '{
"model": "kling",
"mode": "i2v",
"input": {
"prompt": "A red fox running through fresh snow at sunrise",
"aspect_ratio": "16:9",
"duration": "5",
"image_urls": "https://example.com/input.png"
},
"metadata": {
"order_id": "A-1042"
}
}'{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "i2v",
"status": "queued",
"progress": 0,
"cost": {
"estimated_tokens": 40,
"charged_tokens": 0,
"refunded_tokens": 0,
"settled": false
},
"outputs": [],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": null,
"expires_at": null
}Result
While the generation runs, read it by id: the status changes from queued or running to succeeded. With the Prefer: wait header the finished object may come in the answer to POST itself, as 200 instead of 202.
curl https://api.unitool.ai/v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60 \
-H "Authorization: Bearer $UNITOOL_API_KEY"{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "i2v",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 40,
"charged_tokens": 40,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "video",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
"content_type": "video/mp4",
"width": 1280,
"height": 720,
"duration_sec": 5,
"size": 6815744,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}If the generation fails
The HTTP answer is still 200. The reason is in error.code, what happened to the tokens in error.refund. All codes: Media generations
{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "i2v",
"status": "failed",
"progress": 0,
"cost": {
"estimated_tokens": 40,
"charged_tokens": 40,
"refunded_tokens": 40,
"settled": true
},
"outputs": [],
"error": {
"code": "model_error",
"message": "The model failed to produce a result.",
"refund": "full"
},
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": null
}Parameters
| Parameter | Description |
|---|---|
promptstring | |
aspect_ratiostring | Values:16:99:161:1Default "16:9" |
durationstring | Values:510Default "5" |
image_urlsfile · required | A file_ref (asset:… or attachment:…), an https URL or a data: URL. |
Kling 3.0
"model": "kling:kling3"Price
75 tokens per video 5 s · std. This is the price of the example request below, in balance tokens. POST /v1/quotes gives the exact price of your request before it runs.mode: stdkling3_duration: 5
balance tokens per second
| mode | Price |
|---|---|
| std | 15 |
| pro | 17 |
The highlighted price is the example request's. Example: 5 s × 15 = 75 tokens.
All price rules: 2
The rules go in order: the first one a request matches sets its price.
| mode | Price | For 5 s |
|---|---|---|
| std | 15 per second | 75 |
| pro | 17 per second | 85 |
Price make-up (pricing from GET /v1/models/{id})
{
"unit": "tokens",
"kind": "by_parameters",
"base": 75,
"example_price": 75,
"matrix": [
{
"when": {
"mode": "std"
},
"rate": 15,
"per": "kling3_duration"
},
{
"when": {
"mode": "pro"
},
"rate": 17,
"per": "kling3_duration"
}
]
}Example request
curl https://api.unitool.ai/v1/generations \
-H "Authorization: Bearer $UNITOOL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=60" \
-d '{
"model": "kling",
"mode": "kling3",
"input": {
"prompt": "A red fox running through fresh snow at sunrise",
"mode": "std",
"kling3_duration": "5",
"aspect_ratio": "16:9"
},
"metadata": {
"order_id": "A-1042"
}
}'{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "kling3",
"status": "queued",
"progress": 0,
"cost": {
"estimated_tokens": 75,
"charged_tokens": 0,
"refunded_tokens": 0,
"settled": false
},
"outputs": [],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": null,
"expires_at": null
}Result
While the generation runs, read it by id: the status changes from queued or running to succeeded. With the Prefer: wait header the finished object may come in the answer to POST itself, as 200 instead of 202.
curl https://api.unitool.ai/v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60 \
-H "Authorization: Bearer $UNITOOL_API_KEY"{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "kling3",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 75,
"charged_tokens": 75,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "video",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
"content_type": "video/mp4",
"width": 1280,
"height": 720,
"size": 6815744,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}If the generation fails
The HTTP answer is still 200. The reason is in error.code, what happened to the tokens in error.refund. All codes: Media generations
{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "kling3",
"status": "failed",
"progress": 0,
"cost": {
"estimated_tokens": 75,
"charged_tokens": 75,
"refunded_tokens": 75,
"settled": true
},
"outputs": [],
"error": {
"code": "model_error",
"message": "The model failed to produce a result.",
"refund": "full"
},
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": null
}Parameters
| Parameter | Description |
|---|---|
promptstring · required | |
modestring | Values:stdproDefault "std" |
kling3_durationstring | Values:581015Default "5" |
aspect_ratiostring | Values:16:99:161:1Default "16:9" |
image_urlsarray of file (≤ 2) | A file_ref (asset:… or attachment:…), an https URL or a data: URL. |
Webhook
When the generation finishes, the same object is sent by POST to your address, in the data field. Signature, retries and setup: Webhooks
{
"type": "generation.succeeded",
"timestamp": "2026-11-29T12:00:41.000Z",
"data": {
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "kling",
"mode": "t2v",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 30,
"charged_tokens": 30,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "video",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
"content_type": "video/mp4",
"width": 1280,
"height": 720,
"duration_sec": 5,
"size": 6815744,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}
}Limits
Generations are async: create, wait or poll, the result by link for 7 days. Details: Media generations
Concurrent generations are limited per account, extra ones wait in the queue: Limits and headers