Tạo video Kling Omni
Sử dụng CometAPI POST /kling/v1/videos/omni-video để tạo tác vụ video Kling O1 và theo dõi trạng thái bằng route truy vấn Omni.
Chọn chế độ đầu vào
- Tạo video từ văn bản: gửi
prompt,mode,aspect_ratiovàduration - Tham chiếu hình ảnh khung hình đầu tiên: thêm các mục
image_listvớiimage_urlvàtype: first_frame, sau đó tham chiếu hình ảnh trongpromptdưới dạng<<<image_1>>> - Đầu ra có watermark: thêm
watermark_info.enabled: truekhi bạn cần URL video có watermark trong phản hồi truy vấn - Model ID: bỏ qua
model_nameđể dùng mặc định của route, hoặc gửi một model ID Omni Video đã được kiểm thử nhưkling-video-o1hoặckling-v3-omni
Thời lượng và tỷ lệ khung hình
size chính xác. Hãy xem aspect_ratio như một yêu cầu về hình dạng khung hình; một yêu cầu tạo video từ văn bản 16:9 có thể được kết xuất ở full-HD 1920x1080.
Luồng tác vụ
Tạo tác vụ Omni
task_id được trả về.Thăm dò tác vụ Omni
Lưu trữ video đã hoàn tất
Ủy quyền
Bearer token authentication. Use your CometAPI key.
Tiêu đề
Content type of the request body.
Nội dung
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.