Kling
In this page's examples, {BASE_URL} is https://api.uniall.ai.
Overview
Kling video capabilities use stable version-level model IDs. Select quality with the top-level resolution field and select the workflow with operation; do not encode quality, audio, or an upstream route in the model name.
| Model | Video capabilities | Resolution |
|---|---|---|
kling-v3-turbo | Text-to-video and single-first-frame image-to-video | 720p, 1080p |
kling-v3 | Text-to-video, image-to-video, first-last-frame, motion control, and digital human | std, pro |
kling-v3-omni | Text-to-video, image-to-video, first-last-frame, multimodal reference, and video editing | std, pro |
kling-o1 | Text-to-video, image-to-video, first-last-frame, multimodal reference, and video editing | std, pro |
Availability depends on the model catalog, the API key's model permissions, and currently enabled routes. Historical quality, audio, silent, and digital-human tier model IDs are no longer accepted and are not converted automatically.
When To Use It
- Use
kling-v3-turbofor fast text or single-image video generation with720por1080poutput. - Use
kling-v3for first-last-frame generation, motion control, or digital-human video. - Use
kling-v3-omnifor multimodal references and video editing with up to four reference images. - Use
kling-o1for the same reference and editing request shape with a3to10second generation range.
Endpoint
| Action | Method | Path |
|---|---|---|
| Create a video task | POST | /v1/videos |
| Query a video task | GET | /v1/videos/{task_id} |
| Download a completed video | GET | /v1/videos/{task_id}/content |
POST /v1/videos/generations and POST /v1/video/generations remain compatible creation paths. New integrations should use POST /v1/videos.
Authentication
Authorization: Bearer sk-***
Content-Type: application/json
Resolution And Audio
Pass resolution at the request body's top level. Do not use size in its place. When omitted, Turbo defaults to 720p; the other Kling video models default to std. Pass it explicitly when predictable output and billing records matter.
Kling video requests do not accept a sound switch. Describe dialogue, music, ambient sound, or silence in prompt. The audio_url and voice_id fields used by digital-human tasks are lip-sync inputs, not sound switches.
Operations
operation | Supported models | Required input |
|---|---|---|
text_to_video | Turbo, V3, Omni, O1 | prompt |
image_to_video | Turbo, V3, Omni, O1 | prompt and image |
first_last_frame | V3, Omni, O1 | prompt, image, and last_image |
reference_to_video | Omni, O1 | prompt and image or video references |
edit_video | Omni, O1 | prompt and video_url; reference images are optional |
motion_control | V3 | prompt, image, video, and character_orientation |
avatar | V3 | See Digital Human Video |
Duration rules:
- Turbo and V3 generation operations accept
3to15seconds. - Omni text-to-video, image-to-video, and first-last-frame operations accept
3to15seconds;reference_to_videoaccepts3to10seconds. - O1 generation operations accept
3to10seconds. - Motion control, digital human, and video editing use the duration rules of their operation; omit
durationunless the operation explicitly accepts it. - Turbo text-to-video accepts
aspect_ratio; Turbo image-to-video does not.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Stable Kling video model ID. |
prompt | string | Yes | Prompt required by the UniAll video task interface. |
operation | string | Recommended | Workflow from the operations table. |
resolution | string | No | Model-specific quality value; defaults are described above. |
duration | integer | Conditional | Output duration for operations that accept it. |
aspect_ratio | string | Conditional | 16:9, 9:16, or 1:1. |
image | string | Conditional | Public HTTP(S) image URL for image-to-video or the first frame. |
last_image | string | Conditional | Last-frame image URL; use it together with image. |
reference_image_urls | string[] | No | Up to four reference-image URLs for multimodal reference or editing. |
video_url | string | Conditional | Base video URL for reference or editing operations. |
video | string | Conditional | Motion-reference video URL for motion_control. |
keep_original_sound | string | No | yes or no for multimodal reference and video editing. |
character_orientation | string | Conditional | image or video for motion_control. |
watermark | boolean | No | Whether to add an AIGC watermark. |
Request Examples
Turbo Text-To-Video
curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3-turbo",
"operation": "text_to_video",
"prompt": "A paper airplane crosses a quiet city street at dawn, cinematic camera movement, soft ambient sound.",
"duration": 3,
"resolution": "720p",
"aspect_ratio": "16:9",
"watermark": false
}'
Turbo Image-To-Video
curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3-turbo",
"operation": "image_to_video",
"prompt": "The paper airplane glides steadily forward while the camera follows slowly.",
"image": "https://example.com/plane.png",
"duration": 5,
"resolution": "1080p"
}'
Do not pass aspect_ratio for Turbo image-to-video.
V3 First-Last-Frame
curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3",
"operation": "first_last_frame",
"prompt": "The subject turns naturally toward the camera with a continuous, smooth transition.",
"image": "https://example.com/first.png",
"last_image": "https://example.com/last.png",
"duration": 5,
"resolution": "pro"
}'
V3 Motion Control
curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3",
"operation": "motion_control",
"prompt": "Preserve the subject identity and clothing while reproducing the motion from the reference video.",
"image": "https://example.com/person.png",
"video": "https://example.com/motion.mp4",
"resolution": "pro",
"character_orientation": "image"
}'
Omni Multimodal Reference
curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3-omni",
"operation": "reference_to_video",
"prompt": "Preserve the subject and clothing while applying the referenced motion to the base video.",
"reference_image_urls": [
"https://example.com/person.png",
"https://example.com/clothes.png"
],
"video_url": "https://example.com/base.mp4",
"duration": 8,
"resolution": "pro",
"keep_original_sound": "yes"
}'
Omni Video Editing
curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3-omni",
"operation": "edit_video",
"prompt": "Keep the subject motion unchanged and replace the background with a city street at night.",
"video_url": "https://example.com/source.mp4",
"reference_image_urls": [
"https://example.com/city-style.png"
],
"resolution": "pro",
"keep_original_sound": "yes"
}'
Use the same text, image, first-last-frame, reference, and editing request shape with kling-o1; its generation duration range is 3 to 10 seconds.
Response Example
{
"id": "task_xxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "kling-v3",
"status": "queued",
"progress": 0
}
Task Status And Result
Save id or task_id, then follow Video Generation Overview for the shared 3-to-10-second polling interval, terminal statuses, result fields, error contract, and authenticated download flow.
Billing Notes
Video billing normally depends on the public model, operation, resolution, and actual output duration. Task submission may reserve balance; the task settlement record and current model catalog price are the final billing source.
Common Errors
- Using a historical quality, audio, silent, or digital-human tier model ID instead of one of the version-level IDs above.
- Passing
sizeinstead ofresolution, or passingsoundto a video request. - Passing
aspect_ratioto Turbo image-to-video. - Requesting a duration outside the selected model and operation range.
- Mixing
image,reference_image_urls, and video inputs in a way that duplicates the same reference. - Passing image or video URLs that the service cannot access publicly.
- Resubmitting a paid task after one polling request times out instead of continuing to query the original
task_id.
Public responses do not expose provider names, upstream task IDs, routes, credentials, or raw upstream requests.