aslocalized example text.in use endpointKling 3.0 Video Generation API (endpoint).endpointtask and.
Overview
Kling 3.0 Omni (can 3.0 reference )Reference videoModel:endpoint when supported Text-to-Video, first frame / First/Last Frame to Video, Reference image-to-Video, Reference videovideo generationand Video Editing, in Prompt@id asset.cansubject (/ ), task., image or,Kling 3.0; andKling 3.0 Turbo.
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 |
| localized example text | 16:9 (default)/ 9:16 / 1:1 |
| localized example text | supported (native)or Reference video original audio (original) |
| subject | supported, up to 3 |
| localized example text | output Duration; with, Reference video task 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|
| subject / ID| `element_id`, `voice_id` return asset ID, number ID|
| subject /|, subject and|
| 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/omni-video/kling-3.0-omni" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "in,," }
],
"settings": { "resolution": "720p", "duration": 5, "aspect_ratio": "16:9", "audio": "native" }
}'
**Reference image-to-Video**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/omni-video/kling-3.0-omni" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "@image_1 in the@image_2 localized example text" },
{ "type": "refer_image", "url": "https://example.com/girl.png", "id": "image_1" },
{ "type": "refer_image", "url": "https://example.com/cafe.png", "id": "image_2" }
],
"settings": { "resolution": "1080p", "duration": 5 },
"options": { "external_task_id": "my-order-001" }
}'
**subject**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/omni-video/kling-3.0-omni" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "@zhang," },
{ "type": "element", "element_id": "kel_xxxxxxxx", "id": "zhang" }
],
"settings": { "resolution": "720p", "duration": 5 }
}'
**Video Editing**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/omni-video/kling-3.0-omni" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "type": "prompt", "text": "localized example text@video_1 localized example text" },
{ "type": "base_video", "url": "https://example.com/source.mp4", "id": "video_1" }
],
"settings": { "resolution": "720p", "duration": 5, "audio": "off", "multi_shot": false }
}'
---
## Endpoints
| Method | Path (Base URL)| localized example text|
|--------|------|------|
| POST | `/omni-video/kling-3.0-omni` | create Video Generationtask|
| GET | `/tasks` | Query Task (Task ID or Task ID, supported )|
| POST | `/v1/general/advanced-custom-elements` | create subject|
| GET | `/v1/general/advanced-custom-elements` | subject list|
| GET | `/v1/general/advanced-custom-elements/{id}` | query subject|
| POST | `/v1/general/delete-advanced-elements` | subject|
| POST | `/v1/general/custom-voices` | create|
| GET | `/v1/general/custom-voices` | list|
| GET | `/v1/general/custom-voices/{id}` | query|
| POST | `/v1/general/delete-voices` | localized example text|
---
### 1. Create Task
**POST** `/omni-video/kling-3.0-omni`
#### Request Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| contents | array | Yes | asset:Prompt, image, video, subject,|
| settings | object | No | output:Resolution, Duration,,,|
| options | object | No |:Callback URL, Task ID|
#### contents
localized example text`type`, must with 1`prompt`:
| type | field | Description |
|------|------|------|
| `prompt` | `text` | Prompt, exceeds 2500 characters.can use`@id` asset,`@image_1`, `@zhang` |
| `first_frame` | `url`, `id` | first frame image|
| `last_frame` | `url`, `id` | last frame image, must when provide first frame|
| `refer_image` | `url`, `id` | Reference image (Scenario,, etc. )|
| `feature_video` | `url`, `id` | Reference video ( reference,, etc. )|
| `base_video` | `url`, `id` | video ( in video)|
| `element` | `element_id`, `id` | subject,`element_id` as create subject endpoint return ID,`id` RequiredPrompt|
`id` in Prompt, task, maximum 64 characters.localized example text`element` localized example text.
**localized example text**
- supported「onlyfirst frame」and「last frame」, supported only last frame
- with`base_video` when first frame and last frame
- Reference video (`feature_video` + `base_video`)up to 1,`base_video` up to 1 - image ( first frame+ last frame+ Reference image)up to 7 images; Reference video when up to 4 images
- Reference image and subject and: no Reference video when exceeds 7, Reference video when exceeds 4
- subject up to 3
- with`feature_video` when:`audio` as`off`, `multi_shot` as`true`
- with`base_video` when:`audio` as`native`, `multi_shot` as`false`
- with first frame with Reference video when,`aspect_ratio` Required (If omittedlocalized example text`16:9`)
**asset Requirements**
| Type | Requirements |
|------|------|
| Image | jpg / jpeg / png, exceeds 50MB, width and height at least 300px, Aspect ratio 1:2.5 ~ 2.5:1 |
| Video | mp4 / mov, exceeds 200MB, Duration 3-15.5 seconds, width and height 700-4553px, exceeds 8294400, Aspect ratio 0.4~2, frame rate 24-60fps|
#### settings
| Parameter | Type | Required | default | Description |
|------|------|------|------|------|
| resolution | string | No | `720p` | `720p` / `1080p` / `4k` |
| duration | int | No | `5` | 3-15, seconds|
| aspect_ratio | string | No | `16:9` | `16:9` / `9:16` / `1:1`.with first frame or Reference video when asset, can If omitted|
| audio | string | No | `off` | `native` Generate Sound;`original` Reference video original audio (Reference video);`off` no|
| multi_shot | boolean | No | `true` | localized example text.localized example text`false` when use Format Prompt|
**PromptFormat**
localized example text`n, m,;` Format, and:`n` as (up to 6 ),`m` as Duration (seconds, and etc. Duration), maximum 512 characters.
#### 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|
| multi_prompt | array | No | list, Prompt and Duration.and`prompt`, field when`prompt` 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
```json{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261119185636_i6ytlp00ylxj",
"data": {
"id": "task_20261119185636_po18jfkw",
"status": "submitted",
"create_time": 1795085796292,
"update_time": 1795085796292,
"external_id": "my-order-001"
}
}
---
### 2. 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_20261119185903_kx9hp2i88fr8",
"data": [
{
"id": "task_20261119185636_po18jfkw",
"status": "succeeded",
"create_time": 1795085796000,
"update_time": 1795085968000,
"external_id": "my-order-001",
"outputs": [
{ "type": "video", "url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20261119/xxx.mp4", "duration": "5" }
]
}
]
}
---
## subject
subject task.create subject`element_id`, in task`contents` localized example text.
subject:
-**image subject**:2-4 images image (1 images image+ 1-3 images ),,,,, Scenario etc.
-**videocharactersubject**:1 video.videocharacter subject task「Reference video」localized example text### 3. create subject**POST** `/v1/general/advanced-custom-elements`
| Parameter | Type | Required | Description |
|------|------|------|------|
| element_name | string | Yes | subject, exceeds 20 characters|
| element_description | string | Yes | subject, exceeds 100 characters|
| reference_type | string | Yes | `image_refer` image subject /`video_refer` videocharactersubject|
| element_image_list | object | Conditionally required | `reference_type=image_refer` when Required,|
| element_video_list | object | Conditionally required | `reference_type=video_refer` when Required,|
| element_voice_id | string | No |, create endpoint return ID|
| tag_list | array | No | subject,`[{ "tag_id": "o_102" }]` |
| external_task_id | string | No | Task ID|
**element_image_list**
```json{
"frontal_image": "https://example.com/front.jpg",
"refer_images": [
{ "image_url": "https://example.com/side.jpg" },
{ "image_url": "https://example.com/back.jpg" }
]
}
image 1 images Required, Reference image 1-3 images, and image with.image jpg / jpeg / png, exceeds 10MB, width and height at least 300px, Aspect ratio 1:2.5 ~ 2.5:1.
**element_video_list**
```json{
"refer_videos": [ { "video_url": "https://example.com/person.mp4" } ]
}
1, mp4 / mov, exceeds 200MB, Duration 3-8 seconds, 1080P, Aspect ratio 16:9 or 9:16.videowhen will when and and subject.
**tag_id localized example text**
| tag_id | Meaning | tag_id | Meaning |
|--------|------|--------|------|
| `o_101` | localized example text| `o_105` | localized example text|
| `o_102` | localized example text| `o_106` | Scenario |
| `o_103` | localized example text| `o_107` | localized example text|
| `o_104` | localized example text| `o_108` | localized example text|
**Request Example**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/v1/general/advanced-custom-elements" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"element_name": "images",
"element_description": ",",
"reference_type": "image_refer",
"element_image_list": {
"frontal_image": "https://example.com/front.jpg",
"refer_images": [
{ "image_url": "https://example.com/side.jpg" },
{ "image_url": "https://example.com/back.jpg" }
]
},
"tag_list": [ { "tag_id": "o_102" } ]
}'
**Response Example**
```json{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261119190012_abc123",
"data": {
"task_id": "kel_xxxxxxxx",
"task_status": "succeed",
"task_result": {
"elements": [
{
"element_id": "kel_xxxxxxxx",
"element_name": "images",
"element_description": ",",
"reference_type": "image_refer",
"status": "succeed"
}
]
},
"created_at": 1795085900000,
"updated_at": 1795085912000
}
}
create, endpointup to etc. 15 seconds.`task_status` as`processing` when`task_id` query,`succeed` after in task.
### 4. query subject**GET** `/v1/general/advanced-custom-elements/{id}`
Path Parameters `id` as create returned when applicable`task_id` (localized example text`element_id`).and create endpoint.
### 5. subject list**GET** `/v1/general/advanced-custom-elements`
| Parameter | Required | default | Description |
|------|------|------|------|
| pageNum | No | 1 | localized example text|
| pageSize | No | 30 |, maximum 100|
```json{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261119185903_kx9hp2i88fr8",
"data": {
"elements": [
{ "element_id": "kel_xxxxxxxx", "element_name": "images", "reference_type": "image_refer", "status": "succeed" }
],
"total": 1,
"page_num": 1,
"page_size": 30
}
}
### 6. subject**POST** `/v1/general/delete-advanced-elements`
```json{ "element_id": "kel_xxxxxxxx" }
---
## can subject, subject in video.
### 7. create**POST** `/v1/general/custom-voices`
| Parameter | Type | Required | Description |
|------|------|------|------|
| voice_name | string | Yes |, exceeds 20 characters|
| voice_url | string | localized example text| video file, mp3 / wav / mp4 / mov|
| video_id | string | localized example text| as audio asset|
| external_task_id | string | No | Task ID|
`voice_url` and`video_id` **mustlocalized example text**.audioin no, with, Duration 5-30 seconds.
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/v1/general/custom-voices" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "voice_name": "A", "voice_url": "https://example.com/voice.mp3" }'
**Response Example**
```json{
"code": 0,
"message": "SUCCEED",
"request_id": "trace_20261119190105_def456",
"data": {
"task_id": "kvo_xxxxxxxx",
"task_status": "succeed",
"task_result": {
"voices": [
{ "voice_id": "kvo_xxxxxxxx", "voice_name": "A", "status": "succeed" }
]
},
"created_at": 1795085960000,
"updated_at": 1795085971000
}
}
### 8. query / list /| Method | Path | Description |
|--------|------|------|
| GET | `/v1/general/custom-voices/{id}` | ID query, create endpoint|
| GET | `/v1/general/custom-voices` | list, Parametersubject list, return`data.voices[]` |
| POST | `/v1/general/delete-voices` |, body as`{ "voice_id": "kvo_xxxxxxxx" }` |
---
## 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-19T18:59:07+08:00
X-Funcloud-Signature: {localized example text}
**Body**:task, field and query endpoint`data[]`, with`code` / `data` localized example text.
```json{
"id": "task_20261119185636_po18jfkw",
"status": "succeeded",
"create_time": 1795085796000,
"update_time": 1795085968000,
"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 / asset in, 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 Reference video task
-**asset**:asset`id`, in Prompt`@id`,
-**subject**:subject in (`@Zhang` and`@ZhangSan`), can
-**subject**:subject create can in task,
-**etc.**:localized example text`external_task_id`, ID will (400/1201), when after can query task booking