aslocalized example text.in use endpointKling 3.0 Video Generation API (endpoint), endpointKling 3.0 API (endpoint).endpointtask and.
Overview
Kling 3.0 (can 3.0)supported Text-to-Video, first frame / First/Last Frame to Video and, can video, and supported Prompt.
with Model: 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 / 4k |
| Duration | 3-15 seconds, default 5 seconds (no Parameter) |
| localized example text | 16:9 (default)/ 9:16 / 1:1 |
| localized example text | supported (native)or Reference video original audio (original) |
| localized example text | supported (multi_shot) |
| 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 ()**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/text-to-video/kling-3.0" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "in,,,",
"settings": { "resolution": "1080p", "duration": 5, "aspect_ratio": "16:9", "audio": "native" }
}'
**video**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/text-to-video/kling-3.0" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "1, 3,; 2, 4, in; 3, 3,;",
"settings": { "resolution": "720p", "duration": 10, "multi_shot": true }
}'
**First/Last Frame to Video**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/image-to-video/kling-3.0" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "," },
{ "type": "first_frame", "url": "https://example.com/start.jpg" },
{ "type": "last_frame", "url": "https://example.com/end.jpg" }
],
"settings": { "resolution": "720p", "duration": 5 }
}'
**localized example text** (Reference video image )```bash
curl -X POST "https://mm-internal-cn.leonecloud.com/kling/motion-control/kling-3.0" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "localized example text" },
{ "type": "image", "url": "https://example.com/person.jpg" },
{ "type": "video", "url": "https://example.com/dance.mp4" }
],
"settings": { "resolution": "720p", "character_orientation": "video", "audio": "original" }
}'Query Task
curl -X GET "https://mm-internal-cn.leonecloud.com/kling/tasks?task_ids=task_20261119185417_tivjbqzg" \
-H "Authorization: Bearer your_api_key_here"Endpoints
| Method | Path (Base URL) | localized example text |
|---|---|---|
| POST | /text-to-video/kling-3.0 | Text-to-Video |
| POST | /image-to-video/kling-3.0 | first frame / First/Last Frame to Video |
| POST | /motion-control/kling-3.0 | localized example text |
| GET | /tasks | Query Task (Task ID or Task ID, supported ) |
1. Text-to-Video
POST /text-to-video/kling-3.0
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Prompt, exceeds 2500 characters |
| settings | object | No | output, |
| options | object | No | :Callback URL, Task ID |
PromptFormat
localized example textn, m,; Format, and:
-n:, up to 6
-m:Duration (seconds), at least 1, and etc. Duration
-: Prompt, maximum 512 characters
---### 2. first frame / First/Last Frame to VideoPOST /image-to-video/kling-3.0
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.
3. localized example text**POST** /motion-control/kling-3.0
Reference video, images image.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| contents | array | Yes | asset, |
| settings | object | Yes | mustlocalized example textcharacter_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 textwithduration Parameter, output DurationReference video.when 30 seconds, after output Duration and.
height or when, Model can can use, output will video; output Duration as.
settings
| Parameter | Type | Required | default | localized example text | Description |
|---|---|---|---|---|---|
| resolution | string | No | 720p | localized example text | 720p / 1080p / 4k.supported4k |
| duration | int | No | 5 | , image | 3-15, 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 | off | localized example text | / image:native Generate Sound,off no.:original Reference video original audio,off no, defaultoriginal |
| multi_shot | boolean | No | true | , image | localized example text.localized example textfalse when use Format Prompt |
| 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.
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, insettings localized example text.with, If omitted and as.
| Parameter | Type | Required | Description |
|---|---|---|---|
| negative_prompt | string | No | Prompt,, exceeds 2500 characters |
| multi_prompt | array | No | list, Prompt and Duration.andprompt, field whenprompt localized example text |
multi_prompt localized example text
| field | Type | Required | Description |
|---|---|---|---|
| index | int | Yes | , 1, up to 6 |
| prompt | string | Yes | Prompt, maximum 512 characters |
| duration | int | No | Duration (seconds), at least 1, and etc.settings.duration |
Model supported field will, will.
Response Example
{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261119185416_7nhd8sa77zoo",
"data": {
"id": "task_20261119185417_tivjbqzg",
"status": "submitted",
"create_time": 1795085657121,
"update_time": 1795085657121,
"external_id": "my-order-001"
}
}4. Query Task
GET /tasks
Request Parameters (URL query)
| Parameter | Required | Description |
|---|---|---|
| task_ids | localized example text | Create Taskreturndata.id, localized example text, localized example text |
| external_task_ids | localized example text | create whenexternal_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 textvideo |
| data[].outputs[].url | string | videolocalized example text |
| data[].outputs[].duration | string | videoDuration, seconds |
Response Example
{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261119185903_0vogwknig0un",
"data": [
{
"id": "task_20261119185417_tivjbqzg",
"status": "succeeded",
"create_time": 1795085657000,
"update_time": 1795085829000,
"external_id": "my-order-001",
"outputs": [
{ "type": "video", "url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20261119/xxx.mp4", "duration": "5" }
]
}
]
}Callback Notification
Create Taskwhenoptions.callback_url, taskSuccessor Failure after will POST Request.
Headers
Content-Type: application/json
X-Funcloud-Event: task.completed
X-Funcloud-Timestamp: 2026-11-19T18:57:09+08:00
X-Funcloud-Signature: {localized example text}Body:task, field and query endpointdata[], withcode / data localized example text.
{
"id": "task_20261119185417_tivjbqzg",
"status": "succeeded",
"create_time": 1795085657000,
"update_time": 1795085829000,
"external_id": "my-order-001",
"outputs": [
{ "type": "video", "url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20261119/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 |
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, 4K and
- -Model:andKling 3.0 Turbo; Reference image / Reference video / subjectKling 3.0 Omni
- localized example text:Duration and must etc.
duration, -localized example text:image and Reference video, - -etc.:localized example text
external_task_id, ID will (400/1201), when after can query task booking