Video / Kling

Kling 3.0 Video Generation

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 textDescription
Resolution720p (default)/ 1080p / 4k
Duration3-15 seconds, default 5 seconds (no Parameter)
localized example text16:9 (default)/ 9:16 / 1:1
localized example textsupported (native)or Reference video original audio (original)
localized example textsupported (multi_shot)
localized example textsupported
localized example textoutput 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 ()**
```bash

curl -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**
```bash

curl -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**
```bash

curl -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

MethodPath (Base URL)localized example text
POST/text-to-video/kling-3.0Text-to-Video
POST/image-to-video/kling-3.0first frame / First/Last Frame to Video
POST/motion-control/kling-3.0localized example text
GET/tasksQuery Task (Task ID or Task ID, supported )

1. Text-to-Video

POST /text-to-video/kling-3.0

Request Parameters

ParameterTypeRequiredDescription
promptstringYesPrompt, exceeds 2500 characters
settingsobjectNooutput,
optionsobjectNo: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

ParameterTypeRequiredDescription
contentsarrayYesasset,
settingsobjectNooutput,
optionsobjectNolocalized example text

contents

typefieldDescription
prompttextPrompt, exceeds 2500 characters
first_frameurlfirst frame image, Required
last_frameurllast 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

ParameterTypeRequiredDescription
contentsarrayYesasset,
settingsobjectYesmustlocalized example textcharacter_orientation
optionsobjectNolocalized example text

contents

typefieldDescription
prompttextPrompt, exceeds 2500 characters
imageurlReference image, Required, 1 images
videourlReference video, Required, 1

asset Requirements

TypeRequirements
Reference imagejpg / jpeg / png, exceeds 50MB, width and height at least 300px, Aspect ratio 1:2.5 ~ 2.5:1.or and, and
reference Videomp4 / 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

ParameterTypeRequireddefaultlocalized example textDescription
resolutionstringNo720plocalized example text720p / 1080p / 4k.supported4k
durationintNo5, image3-15, seconds.no Parameter
aspect_ratiostringNo16:9localized example text16:9 / 9:16 / 1:1.Image-to-Videofirst frame
audiostringNoofflocalized example text/ image:native Generate Sound,off no.:original Reference video original audio,off no, defaultoriginal
multi_shotbooleanNotrue, imagelocalized example text.localized example textfalse when use Format Prompt
character_orientationstringRequired-localized example textimage and image in (Reference video exceeds 10 seconds);video and video in (Reference video exceeds 30 seconds)
first field will, will.

options

ParameterTypeRequiredDescription
callback_urlstringNotaskcomplete after Callback URL, http(s), exceeds 512 characters
external_task_idstringNoTask ID,, exceeds 128 characters.can use query

field

field in supported, insettings localized example text.with, If omitted and as.

ParameterTypeRequiredDescription
negative_promptstringNoPrompt,, exceeds 2500 characters
multi_promptarrayNolist, Prompt and Duration.andprompt, field whenprompt localized example text

multi_prompt localized example text

fieldTypeRequiredDescription
indexintYes, 1, up to 6
promptstringYesPrompt, maximum 512 characters
durationintNoDuration (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)

ParameterRequiredDescription
task_idslocalized example textCreate Taskreturndata.id, localized example text, localized example text
external_task_idslocalized example textcreate whenexternal_task_id, localized example text, localized example text

Parameter, up to 50 task.task.

Response Parameters

ParameterTypeDescription
data[].idstringTask ID
data[].statusstringsubmitted /processing in /succeeded Success / failed Failure
data[].messagestringFailure(onlyFailure when )
data[].create_timeintCreated Time, Unix seconds
data[].update_timeintUpdated Time, Unix seconds
data[].external_idstringTask ID ( with )
data[].outputs[]arraygenerated result (onlySuccesswhen )
data[].outputs[].typestringlocalized example textvideo
data[].outputs[].urlstringvideolocalized example text
data[].outputs[].durationstringvideoDuration, 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 CodecodeDescription
4001201Parameter,message
4011000API Key invalid or missing
4031103no ( IP in )
4041203Task not found, or Model not
4291101Insufficient balance
4291302Requestlocalized example text
5005000Internal server error
5035001, 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 textexternal_task_id, ID will (400/1201), when after can query task booking
Updated 2026-11-24