| Model | Resolution | Duration (s) | Notes |
|---|---|---|---|
kling-4.0 | 720p, 1080p (default) | 3–30 | Supports first, middle, and last frames, reference images and videos, elements, and voices |
kling-4.0-flash | 720p | 3–20 | Faster and cheaper; omni reference does not support middle or last frames or voices |
/kling/v1/... endpoints on the other pages in this folder. Add /kling after this site's domain and append the official new-API path.| Endpoint | Method | URL |
|---|---|---|
| Text to video | POST | https://studio.dataeyes.ai/kling/text-to-video/{model} |
| Image to video (first frame) | POST | https://studio.dataeyes.ai/kling/image-to-video/{model} |
| Omni reference to video | POST | https://studio.dataeyes.ai/kling/omni-video/{model} |
| Retrieve tasks | GET | https://studio.dataeyes.ai/kling/tasks?task_ids={task ID} |
Authorization: Bearer sk-xxx. Video generation is asynchronous: the create call returns a task id; poll every 10 seconds or more until status is succeeded or failed.{
"code": 0,
"message": "SUCCEED",
"request_id": "f041e273-01d3-4df9-9f85-e8889a3e4368",
"data": {
"id": "950100470134604273",
"status": "submitted",
"message": "",
"create_time": 1794553985376,
"update_time": 1794553985376
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Describes the scene, actions, camera, and order of events. Up to 26,000 characters in English, or 11,000 non-English characters |
settings.resolution | string | No | See the model table above |
settings.duration | integer | No | Duration in seconds; see the model table above. If omitted, a duration stated in the prompt is used; otherwise 10 seconds |
settings.aspect_ratio | string | No | 16:9 (default), 9:16, 1:1, 21:9 |
options.external_task_id | string | No | Your own task ID, usable for retrieval; must be unique within your account |
options.callback_url | string | No | Callback URL for task status changes |
options.watermark_info.enabled | boolean | No | Also generate a watermarked result; default false |
contents must contain one prompt and one first_frame; the image can be a URL or Base64.aspect_ratio is not supported. options is the same as for text to video.contents, and refer to each item with @id in the prompt. It can also edit an existing video (base_video).contents[].type | Format | Notes |
|---|---|---|
prompt | {"type": "prompt", "text": "..."} | Required; include one |
first_frame / middle_frame / last_frame | {"type": "...", "url": "...", "id": "..."} | Keyframe images. middle_frame and last_frame are kling-4.0 only |
refer_image | {"type": "refer_image", "url": "...", "id": "image_1"} | Reference image (scene, style, character, etc.) |
feature_video | {"type": "feature_video", "url": "...", "id": "video_1"} | Reference video (motion, camera work, etc.) |
base_video | {"type": "base_video", "url": "...", "id": "video_1"} | Video to edit; at most one |
element | {"type": "element", "element_id": "...", "id": "..."} | Element; element_id is a Kling element ID |
voice | {"type": "voice", "voice_id": "...", "id": "..."} | Voice; up to 3; kling-4.0 only |
id and state what each item is for in the prompt.settings parameter | Description |
|---|---|
resolution | See the model table above |
duration | See the model table above. If omitted, a duration in the prompt is used; with base_video, its duration; otherwise 10 seconds |
aspect_ratio | adaptive (default), 16:9, 9:16, 1:1, 21:9. With adaptive, the ratio comes from the prompt, then the video to edit, keyframes, and reference videos, in that order |
audio | native (default; generates matching sound) or original (keeps the input video's audio; needs an input video and cannot be combined with voices) |
?external_task_ids=... instead. Use only one of the two; separate multiple IDs with commas.url truncated):{
"code": 0,
"message": "SUCCEED",
"data": [
{
"id": "950100470134604273",
"status": "succeeded",
"outputs": [
{ "id": "950105024762894184", "type": "video", "url": "https://v4-fdl.kechuangai.com/…mp4?…", "duration": "3.041" }
],
"usage": { "output_duration": "3" },
"create_time": 1794553985376,
"update_time": 1794554134838
}
]
}| Field | Description |
|---|---|
status | submitted, processing, succeeded, failed |
outputs[].url | Video URL; download and save it promptly. outputs[].duration is the actual video length |
usage.output_duration | Billed duration in seconds |
usage.output_duration. See prices in the Model Hub and charges in Usage logs. Invalid parameters (for example 1080p with kling-4.0-flash) return an error and are not billed.