Overview
Kling O1 (can O1)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.
endpointPath, Request / field Kling (endpoint).complete,Base URL and API Key can, localized example text.
| localized example text | Description |
|---|---|
| Resolution | 720p (default)/ 1080p |
| Duration | 3-10 seconds, default 5 seconds |
| localized example text | 16:9 (default)/ 9:16 / 1:1 |
| localized example text | output Duration; Reference video (feature_video / base_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 (`type=element`) | supported|
| 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-o1" \
-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" }
}'
**first frame+ Reference image-to-Video**
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/kling/omni-video/kling-o1" \
-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": "first_frame", "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" }
}'
**Query Task**
```bashcurl -X GET "https://mm-internal-cn.leonecloud.com/kling/tasks?task_ids=task_20261118183451_g2usgll6" \
-H "Authorization: Bearer your_api_key_here"
---
## Endpoints
| Method | Path (Base URL)| localized example text|
|--------|------|------|
| POST | `/omni-video/kling-o1` | create Video Generationtask|
| GET | `/tasks` | Query Task (Task ID or Task ID, supported )|
---
### 1. Create Task
**POST** `/omni-video/kling-o1`
#### Request Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| contents | array | Yes | asset:Prompt, image, video,|
| 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`, `@video_1` |
| `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)|
`id`, in Prompt, task, maximum 64 characters.
**localized example text**
- supported「onlyfirst frame」and「last frame」, supported only last frame
- use last frame when, Reference image
- with`feature_video` when last frame; with`base_video` when first frame and last frame
- Reference video (`feature_video` + `base_video`)up to 1 - image ( first frame+ last frame+ Reference image)up to 7 images; Reference video when up to 4 images
- with first frame, with Reference image and Reference video when, Duration 5 seconds or 10 seconds
**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-10 seconds, width and height 700-2160px, frame rate 24-60fps|
#### settings
| Parameter | Type | Required | default | Description |
|------|------|------|------|------|
| resolution | string | No | `720p` | `720p` / `1080p` |
| duration | int | No | `5` | 3-10, 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` | `off`:no;`original`:Reference video original audio, reference Video|
#### 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_20261118183451_habsqkh21sle",
"data": {
"id": "task_20261118183451_g2usgll6",
"status": "submitted",
"create_time": 1794998091228,
"update_time": 1794998091228,
"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_20261118183921_datgzuu8hbks",
"data": [
{
"id": "task_20261118183451_g2usgll6",
"status": "succeeded",
"create_time": 1794998091000,
"update_time": 1794998347000,
"external_id": "my-order-001",
"outputs": [
{ "type": "video", "url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20261118/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-18T18:39: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_20261118183451_g2usgll6",
"status": "succeeded",
"create_time": 1794998091000,
"update_time": 1794998347000,
"external_id": "my-order-001",
"outputs": [
{ "type": "video", "url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20261118/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, Reference video task will
-**asset**:asset`id`, in Prompt`@id`,
-**etc.**:localized example text`external_task_id`, ID will (400/1201), when after can query task booking