Skip to main content
POST
Usa este endpoint para el flujo de trabajo de Kling Omni compatible con O1 expuesto por CometAPI, incluyendo generación de texto a video y generación con referencia de imagen del primer fotograma.
Para la referencia completa de parámetros del proveedor, consulta la documentación de Kling Omni Video.

Elige el modo de entrada

  • Texto a video: envía prompt, mode, aspect_ratio y duration
  • Referencia de imagen del primer fotograma: agrega elementos image_list con image_url y type: first_frame, luego haz referencia a la imagen en prompt como <<<image_1>>>
  • Salida con marca de agua: agrega watermark_info.enabled: true cuando necesites una URL de video con marca de agua en la respuesta de consulta
  • Model ID: omite model_name para usar el valor predeterminado de la ruta, o envía un model ID de Omni Video probado como kling-video-o1 o kling-v3-omni

Duración y relación de aspecto

Kling Omni no expone un campo size exacto. Trata aspect_ratio como una solicitud de forma del fotograma; una solicitud de texto a video 16:9 puede renderizarse como full-HD 1920x1080.

Flujo de la tarea

1

Crear la tarea Omni

Envía la solicitud y guarda el task_id devuelto.
2

Consultar la tarea Omni

Continúa con Obtener un video Kling Omni hasta que la tarea finalice.
3

Persistir el video finalizado

Mueve la URL MP4 devuelta a tu propio almacenamiento si necesitas acceso duradero.

Autorizaciones

Authorization
string
header
requerido

Bearer token authentication. Use your CometAPI key.

Encabezados

Content-Type
string

Content type of the request body.

Cuerpo

application/json
prompt
string
requerido

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>
predeterminado:off

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

Opciones disponibles:
on,
off
mode
enum<string>

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

Opciones disponibles:
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.

Opciones disponibles:
16:9,
9:16,
1:1
duration
enum<string>
predeterminado:5

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

Opciones disponibles:
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.

Respuesta

200 - application/json

Success

code
integer
requerido

Response code. 0 means the task request was accepted.

message
string
requerido

Response message.

data
object
requerido
request_id
string

Request identifier returned by CometAPI when present.