Criar um vídeo Kling Omni
Use o CometAPI POST /kling/v1/videos/omni-video para criar tarefas de vídeo Kling O1 e acompanhar o status com a rota de consulta Omni.
Escolha o modo de entrada
- Texto para vídeo: envie
prompt,mode,aspect_ratioeduration - Referência de imagem do primeiro frame: adicione itens
image_listcomimage_urletype: first_frame, depois referencie a imagem empromptcomo<<<image_1>>> - Saída com marca d’água: adicione
watermark_info.enabled: truequando precisar de uma URL de vídeo com marca d’água na resposta da consulta - Model ID: omita
model_namepara usar o padrão da rota, ou envie um model ID Omni Video testado, comokling-video-o1oukling-v3-omni
Duração e proporção
size exato. Trate aspect_ratio como uma solicitação de formato do quadro; uma solicitação de texto para vídeo 16:9 pode ser renderizada como full-HD 1920x1080.
Fluxo da tarefa
Criar a tarefa Omni
task_id retornado.Consultar a tarefa Omni
Persistir o vídeo concluído
Autorizações
Bearer token authentication. Use your CometAPI key.
Cabeçalhos
Content type of the request body.
Corpo
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.