Kling Omni Video
Channel type: Kling Omni Video (63) Gateway path:
POST https://maasunion.com/kling/v1/omni/videos·GET https://maasunion.com/kling/v1/omni/videos/{task_id}Official upstream:https://api-beijing.klingai.com(/v1/videos/omni-video)
Overview
The Omni models can combine a Prompt with images, subjects, videos, and other content to achieve multiple capabilities, including:
- Text-to-Video, Image-to-Video, first & last frame to video
- Image/subject reference to video
- Instruction transform (video editing)
- Video reference (camera motion/style/generate next shot)
- Multi-shot video (
kling-v3-omni) - Sound generation (
kling-v3-omni,sound: on)
Reference materials in the prompt using <<<>>>, for example:
<<<image_1>>>— the 1st reference image (corresponds toimage_list[0])<<<element_1>>>— the 1st subject (corresponds toelement_list[0])<<<video_1>>>— the 1st reference video (corresponds tovideo_list[0])
This gateway keeps the request/response format identical to the official Kling OmniVideo API; the request body is passed through to the upstream as-is.
Supported Models
| model_name | Description |
|---|---|
kling-video-o1 | Omni O1, primarily single-shot |
kling-v3-omni | Omni V3, supports multi-shot, sound generation, etc. |
Authentication
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer {your_api_token} |
Content-Type | Required for POST | application/json |
The upstream channel side uses official Kling authentication, handled automatically by the gateway; the client does not need to and should not pass the upstream key.
Prompt Reference Syntax
- The prompt must not exceed 2,500 characters
- Specify subjects, images, or videos using the
<<<>>>format:<<<image_1>>>,<<<image_2>>>— reference the images at the corresponding index inimage_list<<<element_1>>>,<<<element_2>>>— reference the subjects at the corresponding index inelement_list<<<video_1>>>— reference the video at the corresponding index invideo_list
- Different model versions and video modes support different ranges; see the Kling Capability Map
Create Task
POST https://maasunion.com/kling/v1/omni/videos
Submit a video generation task. On success it returns a task ID, which you can use to poll the result via the Query Task endpoint.
Request Body Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | string | Yes | — | Model name: kling-video-o1, kling-v3-omni |
multi_shot | boolean | No | false | Whether multi-shot. When true, prompt is invalid; when false, shot_type and multi_prompt are invalid |
shot_type | string | Conditional | — | Shot mode: customize (custom), intelligence (smart). Required when multi_shot=true |
prompt | string | Conditional | — | Text prompt, ≤ 2500 characters. Must not be empty when multi_shot=false, or multi_shot=true and shot_type=intelligence |
multi_prompt | array | Conditional | — | Shot list, see multi_prompt Description. Must not be empty when multi_shot=true and shot_type=customize |
image_list | array | No | — | Reference image list, see image_list Description |
element_list | array | No | — | Subject reference list, see element_list Description |
video_list | array | No | — | Reference video list, see video_list Description |
sound | string | No | off | Whether to generate sound: on / off. When there is a reference video, it can only be off |
mode | string | No | pro | Generation mode: std (720P), pro (1080P), 4k (4K) |
aspect_ratio | string | Conditional | — | Aspect ratio: 16:9, 9:16, 1:1. Usually required when not using a first frame or video editing |
duration | string | No | 5 | Video duration (seconds), enum 315; in some scenarios 3 |
watermark_info | object | No | — | Watermark configuration, e.g. {"enabled": false} |
callback_url | string | No | — | Callback URL for task status changes |
external_task_id | string | No | — | Custom task ID (unique on the user side, saved by the upstream) |
multi_prompt Description
Define the index, prompt, and duration of each shot via index, prompt, and duration:
- At most 6 shots, at least 1
- Each shot prompt ≤ 512 characters
- Each shot duration ≥ 1 second and ≤ the total task duration
- The sum of all shot durations equals the total task
duration
"multi_prompt": [
{ "index": 1, "prompt": "string", "duration": "5" },
{ "index": 2, "prompt": "string", "duration": "5" }
]image_list Description
Reference image list, including subjects, scenes, style reference images, etc.; can also be used as the first or last frame to generate video.
| Parameter | Type | Required | Description |
|---|---|---|---|
image_url | string | Yes | Image URL or Base64 (supports the data:image/...;base64, prefix; the gateway normalizes it automatically) |
type | string | No | first_frame (first frame), end_frame (last frame). When there is a last frame, a first frame must also be present |
Image requirements:
| Item | Limit |
|---|---|
| Format | .jpg / .jpeg / .png |
| File size | ≤ 10 MB |
| Dimensions | Width and height both ≥ 300 px |
| Aspect ratio | 1:2.5 ~ 2.5:1 |
Other rules:
- If an image is not the first or last frame, do not configure the
typeparameter - Last frame only is not supported (when there is a last frame image, a first frame image must be present)
- When generating video from a first frame or first & last frame, the video editing feature cannot be used
- When using
kling-video-o1, setting first/last frames is not supported when there are more than 2 images in the array - The
image_urlparameter value must not be empty
element_list Description
Subject reference list, configured based on the IDs of subjects in the Kling subject library.
| Parameter | Type | Required | Description |
|---|---|---|---|
element_id | long | Yes | The subject ID in the subject library |
Subjects are divided into video custom subjects (video character subjects) and image custom subjects (multi-image subjects), with different applicable scopes.
video_list Description
Reference videos, obtained via URL. Can be used as a feature reference video or as a video to be edited.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
video_url | string | Yes | — | Video URL |
refer_type | string | No | base | feature (feature reference) / base (to be edited, instruction transform) |
keep_original_sound | string | No | — | Keep original sound: yes / no (also applies to the feature type) |
Video requirements:
| Item | Limit |
|---|---|
| Format | MP4 / MOV only |
| Duration | ≥ 3 seconds; upper limit depends on the model version |
| Resolution | 720 px ~ 2160 px (width/height dimensions) |
| Frame rate | 24 ~ 60 fps (output is 24 fps) |
| Quantity | At most 1 video |
| Size | ≤ 200 MB |
Other rules:
- When the reference video is a video to be edited (
refer_type=base), you cannot define video first/last frames - When there is a reference video, the
soundparameter value can only beoff - The
video_urlparameter value must not be empty
mode Description
| Mode | Output resolution |
|---|---|
std | 720P |
pro | 1080P |
4k | 4K |
Request Example
Image-to-Video
curl --request POST \
--url "https://maasunion.com/kling/v1/omni/videos" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-video-o1",
"prompt": "让<<<image_1>>>中的人物向镜头挥手",
"image_list": [
{ "image_url": "https://example.com/reference.png" }
],
"duration": "5",
"mode": "pro",
"aspect_ratio": "16:9"
}'Multi-Shot (kling-v3-omni)
curl --request POST \
--url "https://maasunion.com/kling/v1/omni/videos" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-v3-omni",
"multi_shot": true,
"shot_type": "customize",
"prompt": "",
"multi_prompt": [
{ "index": 1, "prompt": "<<<image_1>>>A person sitting on a park bench, sunlight filtering through trees.", "duration": "2" },
{ "index": 2, "prompt": "A car speeding down a rainy street, headlights glowing.", "duration": "3" }
],
"image_list": [{ "image_url": "https://example.com/frame.png" }],
"mode": "pro",
"sound": "on",
"aspect_ratio": "16:9",
"duration": "5"
}'Response Example (200)
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "task_xxxxxxxx",
"task_info": { "external_task_id": "string" },
"task_status": "submitted",
"created_at": 1722769557708,
"updated_at": 1722769557708
}
}| Field | Description |
|---|---|
code | Error code; 0 means success |
data.task_id | Gateway task ID (used for subsequent queries) |
data.task_status | submitted / processing / succeed / failed |
data.created_at / updated_at | Unix millisecond timestamps |
Note: The response structure is identical to the official Kling one;
data.task_idis the public task ID assigned by the gateway. Please save this ID for querying.
Query Task
GET https://maasunion.com/kling/v1/omni/videos/{task_id}
| Path parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | The data.task_id from the create task response |
Request Example
curl --request GET \
--url "https://maasunion.com/kling/v1/omni/videos/your-task-id" \
--header "Authorization: Bearer sk-xxxxxxxx"Response Example (Success)
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "task_xxxxxxxx",
"task_status": "succeed",
"task_status_msg": "string",
"watermark_info": { "enabled": false },
"task_result": {
"videos": [
{
"id": "string",
"url": "string",
"watermark_url": "string",
"duration": "5"
}
]
},
"task_info": { "external_task_id": "string" },
"final_unit_deduction": "string",
"created_at": 1722769557708,
"updated_at": 1722769557708
}
}| Field | Description |
|---|---|
data.task_status | submitted / processing / succeed / failed |
data.task_status_msg | Reason shown on failure (e.g. content moderation) |
data.task_result.videos[].url | Video download URL (valid for about 30 days; please persist in time) |
data.task_result.videos[].watermark_url | Watermarked video URL |
data.final_unit_deduction | Number of credits deducted by the upstream |
Scenario Examples
Image/Subject Reference
curl --location "https://maasunion.com/kling/v1/omni/videos" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-video-o1",
"prompt": "<<<image_1>>>在东京的街头漫步,偶遇<<<element_1>>>和<<<element_2>>>,并跳到<<<element_2>>>的怀里。视频画面风格与<<<image_2>>>相同",
"image_list": [
{ "image_url": "https://example.com/a.png" },
{ "image_url": "https://example.com/b.png" }
],
"element_list": [
{ "element_id": 123456789 },
{ "element_id": 987654321 }
],
"mode": "pro",
"aspect_ratio": "1:1",
"duration": "7"
}'Instruction Transform (Video Editing)
curl --location "https://maasunion.com/kling/v1/omni/videos" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-video-o1",
"prompt": "给<<<video_1>>>中的穿蓝衣服的女孩,戴上<<<image_1>>>中的王冠",
"image_list": [{ "image_url": "https://example.com/crown.png" }],
"video_list": [{
"video_url": "https://example.com/input.mp4",
"refer_type": "base",
"keep_original_sound": "yes"
}],
"mode": "pro"
}'Video Reference (Camera Motion/Style)
curl --location "https://maasunion.com/kling/v1/omni/videos" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-video-o1",
"prompt": "参考<<<video_1>>>的运镜方式,生成一段视频:<<<element_1>>>和<<<element_2>>>在东京街头漫步",
"element_list": [
{ "element_id": 123456789 },
{ "element_id": 987654321 }
],
"video_list": [{
"video_url": "https://example.com/ref.mp4",
"refer_type": "feature",
"keep_original_sound": "yes"
}],
"mode": "pro",
"aspect_ratio": "1:1",
"duration": "7"
}'First & Last Frame
curl --location "https://maasunion.com/kling/v1/omni/videos" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-video-o1",
"prompt": "视频中的人跳舞",
"image_list": [
{ "image_url": "https://example.com/start.png", "type": "first_frame" },
{ "image_url": "https://example.com/end.png", "type": "end_frame" }
],
"mode": "pro"
}'Capability Matrix
| Feature | kling-video-o1 | kling-v3-omni |
|---|---|---|
| Text-to-Video | ✅ | ✅ |
| Image-to-Video | ✅ | ✅ |
| Multi-image reference | ✅ | ✅ |
| First & last frame | ✅ | ✅ |
| Subject reference | ✅ | ✅ |
| Instruction transform (video editing) | ✅ | ✅ |
| Video reference (next shot) | ✅ | ✅ |
| Multi-shot | ❌ | ✅ |
| Sound generation (sound) | ❌ | ✅ |
| Mode | kling-video-o1 | kling-v3-omni |
|---|---|---|
| std (720P) | ✅ | ✅ |
| pro (1080P) | ✅ | ✅ |
| 4k | ✅ | ✅ |
Element Count Limits
Without Reference Video
| Scenario | Total reference images + multi-image subjects | Number of video character subjects |
|---|---|---|
| Multi-image subjects only | ≤ 7 | — |
| Video character subjects only | — | ≤ 3 |
| Both | ≤ 4 | ≤ 3 |
With Reference Video
- Video character subjects are not supported
- Total reference images + multi-image subjects ≤ 4
First & Last Frame Scenarios
- When
kling-v3-omniuses first & last frames, it supports up to 3 subjects - When
kling-video-o1uses first & last frames, subjects are not supported
FAQ
When can duration be specified?
- Text-to-Video, Image-to-Video (without first & last frame): 3~10 seconds optional
- Video editing (refer_type=base): cannot be specified; aligned with the input video
- Other scenarios (no video + images/subjects, or video + refer_type=feature): 3~10 seconds optional
When is aspect_ratio required?
- Not supported: Instruction transform (video editing), Image-to-Video (with first & last frame)
- Usually required: Text-to-Video, image/subject reference, video reference, etc.
Relationship between multi_shot and prompt?
- When
multi_shot=true,promptis invalid; you must usemulti_prompt(shot_type=customize) orprompt(shot_type=intelligence) - When
multi_shot=false,shot_typeandmulti_promptare invalid
Notes
- Asynchronous task: The create endpoint only returns a task ID; you must poll the Query Task endpoint to get the video URL.
- Video URL validity: Valid for about 30 days after generation (anti-leech format); please persist in time.
- model_name is required: The request body must include
model_name. - Base64 images: The gateway automatically removes the
data:image/...;base64,prefix before forwarding to the upstream. - With a reference video:
soundcan only beoff. - Gateway query: Use the gateway
task_idfrom the create response to query; do not use the original upstream ID.
For more general information, see Kling Gateway Overview.
How is this guide?