aslocalized example text.in use endpointKling 2.6 Video Generation API (endpoint).endpointtask and.
Overview
Kling 2.6 (can 2.6)supported Text-to-Video, first frame / First/Last Frame to Video and, can video.
with height and DurationKling 3.0; andKling 3.0 Turbo; Reference image / Reference video / Video Editing / subjectKling 3.0 Omni.
endpointPath, Request / field Kling (endpoint).complete,Base URL and API Key can, localized example text.
| localized example text | Description |
|---|---|
| Resolution | 720p (default)/ 1080p |
| Duration | 5 or 10 seconds, default 5 seconds ( no Parameter) |
| localized example text | 16:9 (default)/ 9:16 / 1:1 |
| localized example text | supported (native, only 1080p)or Reference video original audio (original, ) |
| localized example text | supported (Kling 3.0) |
| localized example text | supported |
| localized example text | output Duration, with height, |
Base URL: https://mm-internal-cn.leonecloud.com/kling
Authentication
with endpoint in Request in API Key:```
Authorization: Bearer {YOUR_API_KEY}
> API Key can, Not required AccessKey / SecretKey JWT.
---
## and| localized example text| localized example text|
|----|--------|
| asset| http(s) URL, supported base64|
| watermark | watermark:`options.watermark_info` can, with`watermark_url` |
| query results | return`billing` field, localized example text|
| localized example text| Callback Request,「Callback Notification」 |
---
## Quick Start
**Text-to-Video (no, 720p)**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/text-to-video/kling-2.6" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "in,,,",
"settings": { "resolution": "720p", "duration": 5, "aspect_ratio": "16:9" }
}'
**Text-to-Video (, must 1080p)**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/text-to-video/kling-2.6" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": ", in",
"settings": { "resolution": "1080p", "duration": 10, "aspect_ratio": "16:9", "audio": "native" }
}'
**first frame video generation**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/image-to-video/kling-2.6" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "," },
{ "type": "first_frame", "url": "https://example.com/first.jpg" }
],
"settings": { "resolution": "720p", "duration": 5 }
}'
**First/Last Frame to Video (only 1080p, output no )**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/image-to-video/kling-2.6" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "localized example text" },
{ "type": "first_frame", "url": "https://example.com/first.jpg" },
{ "type": "last_frame", "url": "https://example.com/last.jpg" }
],
"settings": { "resolution": "1080p", "duration": 5 }
}'
**localized example text**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/motion-control/kling-2.6" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "music" },
{ "type": "image", "url": "https://example.com/character.jpg" },
{ "type": "video", "url": "https://example.com/motion.mp4" }
],
"settings": { "resolution": "720p", "character_orientation": "video", "audio": "original" }
}'
**Query Task**
```bashcurl -X GET "https://mm-internal-cn.leonecloud.com/kling/tasks?task_ids=task_20261120182955_0pk7cbqj" \
-H "Authorization: Bearer your_api_key_here"
---
## Endpoints
| Method | Path (Base URL)| localized example text|
|--------|------|------|
| POST | `/text-to-video/kling-2.6` | Text-to-Video |
| POST | `/image-to-video/kling-2.6` | first frame / First/Last Frame to Video|
| POST | `/motion-control/kling-2.6` | localized example text|
| GET | `/tasks` | Query Task (Task ID or Task ID, supported )|
---
### 1. Text-to-Video
**POST** `/text-to-video/kling-2.6`
#### Request Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| prompt | string | Yes | Prompt, exceeds 2500 characters|
| settings | object | No | output,|
| options | object | No |:Callback URL, Task ID|
> when`settings.resolution` mustlocalized example text`1080p`, 720p supported with.
---
### 2. first frame / First/Last Frame to Video**POST** `/image-to-video/kling-2.6`
#### Request Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| contents | array | Yes | asset,|
| settings | object | No | output,|
| options | object | No | localized example text|
#### contents
| type | field | Description |
|------|------|------|
| `prompt` | `text` | Prompt, exceeds 2500 characters|
| `first_frame` | `url` | first frame image, Required|
| `last_frame` | `url` | last frame image, must when provide first frame|
supported「onlyfirst frame」and「last frame」, supported only last frame.first frame,`aspect_ratio` localized example text.
**last frame Limit**
| Limit | Description |
|------|------|
| only 1080p | last frame when supported`1080p`.If omitted `resolution` will 1080p ( 1080p),`720p` will|
| output no| last frame video with, when`settings.audio` localized example text`native` |
---
### 3. localized example text**POST** `/motion-control/kling-2.6`
Reference video, images image.
#### Request Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| contents | array | Yes | asset,|
| settings | object | Yes | mustlocalized example text`character_orientation` |
| options | object | No | localized example text|
#### contents
| type | field | Description |
|------|------|------|
| `prompt` | `text` | Prompt, exceeds 2500 characters|
| `image` | `url` | Reference image, Required, 1 images|
| `video` | `url` | Reference video, Required, 1|
**asset Requirements**
| Type | Requirements |
|------|------|
| Reference image| jpg / jpeg / png, exceeds 50MB, width and height at least 300px, Aspect ratio 1:2.5 ~ 2.5:1.or and, and|
| reference Video| mp4 / mov, exceeds 100MB, width and height 340-3850px.Duration3 seconds; video when maximum 30 seconds, image when maximum 10 seconds.recommended,,|
**Billing**
localized example text**with`duration` Parameter**, output DurationReference video.when 30 seconds, after output Duration and.
> height or when, Model can can use, output will video; output Duration as.
and / image:`original` Reference video original audio,`off` no.
---
### settings
| Parameter | Type | Required | default | localized example text| Description |
|------|------|------|------|---------|------|
| resolution | string | No | `720p` | localized example text| `720p` / `1080p`.last frame when only`1080p` |
| duration | int | No | `5` |, image| supported`5` or`10`, seconds.no Parameter|
| aspect_ratio | string | No | `16:9` | localized example text| `16:9` / `9:16` / `1:1`.Image-to-Videofirst frame|
| audio | string | No | no| localized example text| / image:`native` Generate Sound (**only 1080p**), `off` no.:`original` Reference video original audio,`off` no|
| character_orientation | string | Required| - | localized example text| `image` and image in (Reference video exceeds 10 seconds);`video` and video in (Reference video exceeds 30 seconds)|
> first field will, will.Kling 2.6 supported`multi_shot`, localized example text[Kling 3.0](/docs/kling-3-0).
### options
| Parameter | Type | Required | Description |
|------|------|------|------|
| callback_url | string | No | taskcomplete after Callback URL, http(s), exceeds 512 characters|
| external_task_id | string | No | Task ID,, exceeds 128 characters.can use query|
### field
field in supported, in`settings` localized example text.with, If omitted and as.
| Parameter | Type | Required | Description |
|------|------|------|------|
| negative_prompt | string | No | Prompt,, exceeds 2500 characters|
> Model supported field will, will.
### Response Example
```json{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261120182955_u9ctvr4a2vqq",
"data": {
"id": "task_20261120182955_0pk7cbqj",
"status": "submitted",
"create_time": 1795170595000,
"update_time": 1795170595000,
"external_id": "my-order-001"
}
}
---
### 4. Query Task
**GET** `/tasks`
#### Request Parameters (URL query)
| Parameter | Required | Description |
|------|------|------|
| task_ids | localized example text| Create Taskreturn`data.id`, localized example text`,` localized example text|
| external_task_ids | localized example text| create when`external_task_id`, localized example text`,` localized example text|
Parameter, up to 50 task.task.
#### Response Parameters
| Parameter | Type | Description |
|------|------|------|
| data[].id | string | Task ID |
| data[].status | string | `submitted` /`processing` in /`succeeded` Success / `failed` Failure |
| data[].message | string | Failure(onlyFailure when )|
| data[].create_time | int | Created Time, Unix seconds|
| data[].update_time | int | Updated Time, Unix seconds|
| data[].external_id | string | Task ID ( with )|
| data[].outputs[] | array | generated result (onlySuccesswhen )|
| data[].outputs[].type | string | localized example text`video` |
| data[].outputs[].url | string | videolocalized example text|
| data[].outputs[].duration | string | videoDuration, seconds|
#### Response Example
```json{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261120183210_0vogwknig0un",
"data": [
{
"id": "task_20261120182955_0pk7cbqj",
"status": "succeeded",
"create_time": 1795170595000,
"update_time": 1795170781000,
"external_id": "my-order-001",
"outputs": [
{ "type": "video", "url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20261120/xxx.mp4", "duration": "5" }
]
}
]
}
---
## Callback Notification
Create Taskwhen`options.callback_url`, taskSuccessor Failure after will POST Request.
**Headers**Content-Type: application/json
X-Funcloud-Event: task.completed
X-Funcloud-Timestamp: 2026-11-20T18:32:10+08:00
X-Funcloud-Signature: {localized example text}
**Body**:task, field and query endpoint`data[]`, with`code` / `data` localized example text.
```json{
"id": "task_20261120182955_0pk7cbqj",
"status": "succeeded",
"create_time": 1795170595000,
"update_time": 1795170781000,
"external_id": "my-order-001",
"outputs": [
{ "type": "video", "url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20261120/xxx.mp4", "duration": "5" }
]
}
return HTTP 2xx as; not when in 5 seconds, 10 seconds after, 3.
---
## Error Codes
ErrorHTTP Status Code, as`{ "code": <localized example text>, "message": "...", "request_id": "..." }`:
| HTTP Status Code | code | Description |
|------|------|------|
| 400 | 1201 | Parameter,`message` |
| 401 | 1000 | API Key invalid or missing |
| 403 | 1103 | no ( IP in )|
| 404 | 1203 | Task not found, or Model not|
| 429 | 1101 | Insufficient balance |
| 429 | 1302 | Requestlocalized example text|
| 500 | 5000 | Internal server error |
| 503 | 5001 |, after|
Parameter:| message | localized example text|
|---------|------|
| `Kling 2.6 with videoonly supported 1080p` | `audio=native` localized example text`resolution` localized example text`1080p` |
| `use last frame when only supported 1080p` | when last frame,`720p` |
| `use last frame when supported Generate Sound, settings.audio as native` | last frame and with|
| `settings.duration as 5 / 10` | Durationsupported|
taskFailure (query results `status=failed`)Failure, will.
---
## Best Practices
- **Pollinglocalized example text**:First 30 seconds3 seconds, after 10 seconds.recommended
-**when**:720p 5 secondsvideoUsually 3 ~ 5 minutes, 1080p and
-**1080p**:720p supported with, in 720p`audio=native`
- **last frame and**:with last frame; last frame no
-**Model**:4K, Duration or[Kling 3.0](/docs/kling-3-0); Reference image / Reference video / subject[Kling 3.0 Omni](/docs/kling-3-0-omni)
- **localized example text**:image and Reference video,
-**etc.**:localized example text`external_task_id`, ID will (400/1201), when after can query task booking