跳转到主要内容
POST
/
kling
/
v1
/
videos
/
omni-video
curl --request POST \ --url https://api.cometapi.com/kling/v1/videos/omni-video \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "prompt": "The boy in <<<image_1>>> is wearing <<<element_1>>> and, together with the girl in <<<image_2>>>, sits side by side in <<<element_2>>>, playfully and intimately chatting, close-up shot." } '
{}
使用此端点可进行 Kling Omni 工作流,包括纯文本生成视频、基于图片参考的生成,以及视频变换流程。

选择输入模式

  • 文本生成视频:发送 promptmodeaspect_ratioduration
  • 基于图片参考的生成:添加 image_list
  • 元素引导生成:添加 element_list
  • 视频变换:添加 video_list,并设置 refer_type: base

任务流程

1

创建 Omni 任务

提交请求并保存返回的 task_id
2

轮询 Omni 任务

持续使用 Omni Query 直到任务完成。
3

持久化已完成的视频

如果你需要持久访问,请将返回的 MP4 URL 转存到你自己的存储中。
2026-03-12 的实时验证确认,最小化的文本生成视频请求返回了 task_status: submitted,随后通过 Omni Query 查询后,任务最终达到 SUCCESS 并返回了最终的 MP4 URL。

授权

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

请求头

Content-Type
string

Content type of the request body.

请求体

application/json
prompt
string
默认值:Hello
必填

Text prompt describing the desired video. Max 2500 characters. Reference images or elements inline using <<<image_1>>>, <<<element_1>>>, <<<video_1>>> syntax.

model_name
string

Model to use. Currently only kling-video-o1 is supported.

image_list
object[]

Reference images for the generation. Each entry can optionally include a type field set to first_frame or end_frame to pin the image as the video's start or end frame. Accepts URLs or Base64 strings. Formats: JPG, JPEG, PNG. Max 10 MB per image, minimum 300 px per side, aspect ratio 1:2.5–2.5:1. When used with reference videos, image + element count must not exceed 4; without reference videos, the limit is 7.

element_list
object[]

Pre-registered element references by ID. Combined with images, the total count must not exceed 4 (with reference video) or 7 (without).

mode
string

Generation mode. std (standard, faster and more cost-effective) or pro (professional, higher quality output).

aspect_ratio
string

Output video aspect ratio (width:height). Values: 16:9, 9:16, 1:1. Required when not using a first-frame reference image or video editing.

duration
string

Video length in seconds. Values: 3–10. Text-to-video and first-frame-to-video only support 5 and 10. When editing an existing video, duration matches the input and this parameter is ignored.

video_list
string[]

Reference video for style transfer or the base video to edit. Use refer_type to distinguish: feature for style reference, base for the video to modify. Set keep_original_sound to yes or no to control audio retention. Only MP4/MOV, 3–10 seconds, 720–2160 px, 24–60 fps, max 200 MB. Only one video is accepted.

callback_url
string

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

响应

200 - application/json

Success

The response is of type object.