Creare un video Kling Omni
Usa CometAPI POST /kling/v1/videos/omni-video per creare task video Kling O1 e monitorarne lo stato con la route di query Omni.
Scegli la modalità di input
- Da testo a video: invia
prompt,mode,aspect_ratioeduration - Riferimento all’immagine del primo frame: aggiungi elementi
image_listconimage_urletype: first_frame, quindi fai riferimento all’immagine inpromptcome<<<image_1>>> - Output con watermark: aggiungi
watermark_info.enabled: truequando ti serve un URL video con watermark nella risposta della query - Model ID: ometti
model_nameper usare il valore predefinito della route, oppure invia un model ID Omni Video testato comekling-video-o1okling-v3-omni
Durata e aspect ratio
size esatto. Considera aspect_ratio come una richiesta della forma del frame; una richiesta da testo a video 16:9 può essere renderizzata come full-HD 1920x1080.
Flusso del task
Crea il task Omni
task_id restituito.Interroga il task Omni
Salva il video completato
Autorizzazioni
Bearer token authentication. Use your CometAPI key.
Intestazioni
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.