Skip to main content
POST
Usa questo endpoint per il flusso Kling Omni compatibile con O1 esposto da CometAPI, inclusa la generazione da testo a video e la generazione con riferimento all’immagine del primo frame.
Per il riferimento completo dei parametri del provider, consulta la documentazione Kling Omni Video.

Scegli la modalità di input

  • Da testo a video: invia prompt, mode, aspect_ratio e duration
  • Riferimento all’immagine del primo frame: aggiungi elementi image_list con image_url e type: first_frame, quindi fai riferimento all’immagine in prompt come <<<image_1>>>
  • Output con watermark: aggiungi watermark_info.enabled: true quando ti serve un URL video con watermark nella risposta della query
  • Model ID: ometti model_name per usare il valore predefinito della route, oppure invia un model ID Omni Video testato come kling-video-o1 o kling-v3-omni

Durata e aspect ratio

Kling Omni non espone un campo 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

1

Crea il task Omni

Invia la richiesta e salva il task_id restituito.
2

Interroga il task Omni

Continua con Recuperare un video Kling Omni finché il task non termina.
3

Salva il video completato

Sposta l’URL MP4 restituito nel tuo storage se hai bisogno di un accesso durevole.

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer token authentication. Use your CometAPI key.

Intestazioni

Content-Type
string

Content type of the request body.

Corpo

application/json
prompt
string
obbligatorio

Text prompt describing the desired video. Maximum length is 2,500 characters. When you send image_list, reference the image with <<<image_1>>>.

model_name
string

Optional model ID for this Kling Omni video request. Omit this field to use the route default.

image_list
object[]

Optional first-frame image reference for image-referenced Omni generation.

sound
enum<string>
predefinito:off

Whether to generate audio with the video. Use on or off.

Opzioni disponibili:
on,
off
mode
enum<string>

Generation mode. Use std for standard generation or pro when the selected model supports the higher-quality mode.

Opzioni disponibili:
std,
pro
aspect_ratio
enum<string>

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.

Opzioni disponibili:
16:9,
9:16,
1:1
duration
enum<string>
predefinito:5

Requested output length for text-to-video and first-frame image-reference workflows. Use 5 or 10 as a string.

Opzioni disponibili:
5,
10
watermark_info
object

Watermark options. When enabled is true, the task can return watermarked result URLs in addition to original result URLs.

callback_url
string<uri>

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

Risposta

200 - application/json

Success

code
integer
obbligatorio

Response code. 0 means the task request was accepted.

message
string
obbligatorio

Response message.

data
object
obbligatorio
request_id
string

Request identifier returned by CometAPI when present.