建立 Kling Omni 影片
使用 CometAPI POST /kling/v1/videos/omni-video 建立 Kling O1 影片任務,並透過 Omni 查詢路由追蹤狀態。
選擇輸入模式
- 文字轉影片:傳送
prompt、mode、aspect_ratio和duration - 首幀圖片引用:加入
image_list項目,包含image_url與type: first_frame,然後在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 的文字轉影片請求可渲染為 full-HD 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.