Kling Video
Create text-to-video, image-to-video, and Omni reference/edit video tasks with Kling.
Endpoints
POST /text-to-video/{model}
POST /image-to-video/{model}
POST /omni-video/{model}
Authorization: Bearer $API_KEY
Content-Type: application/json{model} is the complete public Kling video model ID, for example kling/kling-4.0. The upstream accepts the task immediately; save the returned task ID and poll via GET /v1/tasks/{taskId}.
Models and supported endpoints
| Model | text-to-video | image-to-video | omni-video | Resolutions | Duration |
|---|---|---|---|---|---|
kling/kling-4.0 | ✓ | ✓ | ✓ | 720p, 1080p | 3–30s |
kling/kling-4.0-flash | ✓ | ✓ | ✓ | 720p, 1080p | 3–30s |
kling/kling-3.0-omni | — | — | ✓ | 720p, 1080p, 4k | 3–15s |
kling/kling-3.0-turbo | ✓ | ✓ | — | 720p, 1080p | 3–15s |
kling/kling-3.0 | ✓ | ✓ | — | 720p, 1080p, 4k | 3–15s |
Text to video
Applies to: kling-4.0, kling-4.0-flash, kling-3.0-turbo, kling-3.0
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Generation prompt, up to 3072 characters. |
settings.resolution | string | No | Default 1080p (4.0 series) or 720p (3.0 series). |
settings.aspect_ratio | string | No | 21:9, 16:9 (default), 9:16, 1:1. The 3.0 series does not support 21:9. |
settings.duration | integer | No | Seconds; reads explicit duration from prompt when omitted, otherwise defaults to 10. |
settings.audio | string | No | native (generate audio) or off; kling-3.0-turbo defaults to native, others default to off. |
options.callback_url | string | No | Public terminal callback URL. |
options.external_task_id | string | No | Custom task ID, unique within the account; does not overwrite the system ID. |
curl "https://api.modelrover.ai/text-to-video/kling/kling-4.0" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A girl sitting on a train, gazing out the window with a wistful expression, her head swaying gently with the carriage",
"settings": {
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 10,
"audio": "native"
},
"options": {
"callback_url": "https://example.com/hooks/video?token=unguessable"
}
}'Image to video
Applies to: kling-4.0, kling-4.0-flash, kling-3.0-turbo, kling-3.0
Provide reference frames through the contents array. Each item requires a type and the corresponding text, url, or id field.
type | Description | Applies to |
|---|---|---|
prompt | Prompt text (exactly one required) | All |
first_frame | First-frame image (URL or base64); at least one frame is required | All |
last_frame | Last-frame image | All |
middle_frame | Mid-video keyframe; multiple allowed, ordered sequentially | 4.0 series only |
Images must be .jpg / .jpeg / .png, ≤ 30 MB each, ≥ 300px on each side, aspect ratio between 2:5 and 5:2, up to 10 total. When multiple middle_frame items are provided, assign each an id and reference them with @id in the prompt.
{
"contents": [
{ "type": "first_frame", "url": "https://example.com/start.jpg", "id": "frame_1" },
{ "type": "last_frame", "url": "https://example.com/end.jpg", "id": "frame_2" },
{ "type": "prompt", "text": "Smooth cinematic transition from the dawn forest in @frame_1 to the starlit snowy forest in @frame_2" }
],
"settings": { "resolution": "1080p", "duration": 8 },
"options": { "callback_url": "https://example.com/hooks/video?token=unguessable" }
}Omni video
Applies to: kling-4.0, kling-4.0-flash, kling-3.0-omni
The omni endpoint extends image-to-video with reference images and videos, elements, and voices, enabling reference-to-video, video editing, and other composite scenarios.
type | Description |
|---|---|
prompt | Prompt text (exactly one required) |
first_frame / middle_frame / last_frame | Keyframe images; same rules as image-to-video |
refer_image | Style or content reference image, up to 10; cannot be mixed with keyframes |
feature_video | Feature reference video (motion or style reference), up to 5 |
base_video | Video to edit, at most 1 |
element | Preset or custom element, requires element_id; up to 7 total (≤ 3 video elements) |
voice | Custom voice, requires voice_id; up to 3; 4.0 series only |
Videos must be .mp4 or .mov, ≤ 300 MB each, 3–30s each; images, videos, elements, and voices combined cannot exceed 15.
{
"contents": [
{ "type": "refer_image", "url": "https://example.com/character.jpg", "id": "char_1" },
{ "type": "prompt", "text": "Preserve the facial features and clothing of @char_1 and have her running across a meadow" }
],
"settings": {
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 8,
"audio": "native"
},
"options": { "callback_url": "https://example.com/hooks/video?token=unguessable" }
}settings.audio additionally accepts original on the omni endpoint, which preserves the source video's audio track. original cannot be combined with a voice item.
Create response
{
"code": 0,
"data": {
"id": "9dcf8ab2-c4b7-42be-a516-597223897b99",
"status": "submitted"
}
}data.id is the platform task ID. Task statuses are submitted, processing, succeeded, and failed.
Task response
curl "https://api.modelrover.ai/v1/tasks/9dcf8ab2-c4b7-42be-a516-597223897b99" \
-H "Authorization: Bearer $API_KEY"{
"code": 0,
"data": {
"id": "9dcf8ab2-c4b7-42be-a516-597223897b99",
"status": "succeeded",
"videos": [
{ "url": "https://cdn.klingai.com/...", "duration": 10 }
],
"usage": { "output_duration": 10 }
}
}Video results are temporarily retained for 48 hours and automatically deleted upon expiration—download and transfer them to your own storage immediately after completion.
Restrictions
options.watermark_info, client routing, and paid service-tier selections are rejected.external_task_idmust be unique within the account and cannot be reused.- Body size defaults to 50 MiB; base64-encoded images count toward the body size.
See Tasks and callbacks for polling, callback delivery, and task lifecycle.
Help us improve this page
Found something unclear, outdated, or incorrect?
Last updated on