Theme
Omni-Video
POST
https://www.kkiai.com/kling/v1/videos/omni-video
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter Name | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Optional | application/json | |
Authorization | string | Optional | Bearer {{YOUR_API_KEY}} |
Body Parameters (application/json)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
model_name | string | Required | Model name. Enum values: kling-video-o1 kling-v3-omni |
multi_shot | boolean | Required | Whether to generate multi-shot video. When this parameter is true, the prompt parameter is invalid. When this parameter is false, the shot_type parameter and multi_prompt parameter are invalid. |
shot_type | string | Optional | Shot type. Enum values: customize. This parameter is required when multi_shot is true. |
prompt | string | Optional | Text prompt, can include positive and negative descriptions. Prompts can be templated to meet different video generation needs. Cannot exceed 2500 characters. This parameter must not be empty when multi_shot is false. |
multi_prompt | array[object] | Optional | Information for each shot, such as prompt and duration. ● Define shot sequence number, corresponding prompt and duration through index, prompt, and duration parameters, where: ○ Maximum 6 shots supported, minimum 1 shot. ○ Maximum length of each shot content does not exceed 512 characters. ○ Duration of each shot must not exceed the total task duration and must not be less than 1. ○ The sum of all shot durations equals the total task duration. |
└ index | number | Optional | |
└ prompt | string | Optional | |
└ duration | string | Optional | |
sound | string | Optional | Whether to generate sound when generating video. Enum values: on, off |
image_list | array[object] | Optional | Reference image list. Includes reference images for subject, scene, style, etc., and can also be used as first frame or last frame to generate video. When used as first frame or last frame to generate video: Use the type parameter to define whether the image is a first or last frame: first_frame for first frame, end_frame for last frame. Currently does not support last frame only, meaning if there is a last frame image, there must be a first frame image. When generating video with first frame or first and last frames, video editing functionality cannot be used. |
└ image_url | string | Optional | |
└ type | string | Optional | |
video_list | array[object] | Optional | Reference video, obtained via URL. Can be used as feature reference video or as video to be edited, default is video to be edited. Can optionally retain original video audio. Use refer_type parameter to distinguish reference video type: feature for feature reference video, base for video to be edited. When reference video is video to be edited, video first and last frames cannot be defined. Use keep_original_sound parameter to choose whether to retain original video audio, yes to retain, no to not retain. This parameter also applies to feature reference videos. |
└ video_url | string | Optional | |
└ refer_type | string | Optional | |
└ keep_original_sound | string | Optional | |
element_list | array[object] | Optional | |
└ element_id | string | Optional | |
mode | string | Required | Video generation mode. Enum values: std, pro. std: Standard mode (standard), basic mode, high cost-effectiveness. pro: Expert mode (high quality), high performance mode, generates better video quality. |
aspect_ratio | string | Optional | Video aspect ratio (width:height). Enum values: 16:9, 9:16, 1:1. This parameter is required when not using first frame reference or video editing functionality. |
duration | string | Required | Video generation duration in seconds. Enum values: 3, 4, 5, 6, 7, 8, 9, 10, where: When using text-to-video or first frame image to video, only 5 and 10s are supported. When using video editing functionality ("refer_type":"base"), the output result has the same duration as the input video, and this parameter is invalid in this case. In this case, billing is calculated based on the input video duration rounded to the nearest integer. kling-v3-omni supports ● Enum values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, where: When using video editing functionality ("refer_type":"base"), the output result has the same duration as the input video, and this parameter is invalid in this case. In this case, billing is calculated based on the input video duration rounded to the nearest integer. |
watermark_info | object | Optional | Whether to generate results with watermark. ● Define through enabled parameter, carried with key:value, as follows: "watermark_info": { "enabled": boolean // true to generate, false to not generate } |
└ enabled | boolean | Optional | |
callback_url | string | Optional | |
external_task_id | string | Optional |
Request Example
json
{
"model_name": "kling-video-o1",
"prompt": "Generate an image of dancing by the seaside.",
"negative_prompt": "",
// "cfg_scale": 0.5,
"mode": "std",
// "sound": "off",
// "image_list": [
// {
// "image_url": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
// "type": "first_frame"
// }
// ],
// "video_list": [
// {
// "video_url": "",
// "refer_type": "base",
// "keep_original_sound": "yes"
// }
// ],
"element_list": [
{
"element_id": 835266081714884677
}
],
"aspect_ratio": "16:9",
"duration": "5",
"callback_url": "",
"external_task_id": ""
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/kling/v1/videos/omni-video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_name": "kling-video-o1",
"prompt": "Generate an image of dancing by the seaside.",
"negative_prompt": "",
// "cfg_scale": 0.5,
"mode": "std",
// "sound": "off",
// "image_list": [
// {
// "image_url": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
// "type": "first_frame"
// }
// ],
// "video_list": [
// {
// "video_url": "",
// "refer_type": "base",
// "keep_original_sound": "yes"
// }
// ],
"element_list": [
{
"element_id": 835266081714884677
}
],
"aspect_ratio": "16:9",
"duration": "5",
"callback_url": "",
"external_task_id": ""
}'Response
🟢 200 Success
Response Example
json
{}