创建 Kling Omni 视频
使用 CometAPI POST /kling/v1/videos/omni-video 创建 Kling O1 视频任务,并通过 Omni 查询路由跟踪状态。
选择输入模式
- 文生视频:发送
prompt、mode、aspect_ratio和duration - 首帧图片参考:添加包含
image_url和type: first_frame的image_list项,然后在prompt中使用<<<image_1>>>引用该图片 - 带水印输出:当你需要在查询响应中获得带水印的视频 URL 时,添加
watermark_info.enabled: true - model ID:省略
model_name以使用该路由默认值,或发送已测试的 Omni Video model ID,例如kling-video-o1或kling-v3-omni
时长和宽高比
size 字段。请将 aspect_ratio 视为画面形状请求;16:9 的文生视频请求可渲染为全高清 1920x1080。
任务流程
创建 Omni 任务
task_id。轮询 Omni 任务
持久化已完成的视频
授权
Bearer token authentication. Use your CometAPI key.
请求头
Content type of the request body.
请求体
Text prompt describing the desired video. Maximum length is 2,500 characters. When you send image_list, reference the image with <<<image_1>>>.
Optional model ID for this Kling Omni video request. Omit this field to use the route default.
Optional first-frame image reference for image-referenced Omni generation.
Whether to generate audio with the video. Use on or off.
on, off Generation mode. Use std for standard generation or pro when the selected model supports the higher-quality mode.
std, pro Aspect ratio request for beta Kling Omni generation. The endpoint does not expose an exact size field; a 16:9 text-to-video request can render as 1920x1080.
16:9, 9:16, 1:1 Requested output length for text-to-video and first-frame image-reference workflows. Use 5 or 10 as a string.
5, 10 Watermark options. When enabled is true, the task can return watermarked result URLs in addition to original result URLs.
Webhook URL for task status notifications. The server sends a callback when the task status changes.
Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.