APIMODELSAPIMODELS
Documentación de la API

apimodels.app

Docs/Kling Omni-Video API
OV

Kling Omni-Video API

Multi-modal Visual Language (MVL) video generation -- combine natural language prompts with video, image, and subject references in a single unified endpoint.

Inicio rápido

1
Get your API key from the Console
2
Choose a model (kling-video-o1 or kling-v3-omni)
3
Send POST request to create task
4
Poll GET request for video result

Autenticación

Add Authorization header with Bearer token to all requests:

Authorization: Bearer YOUR_API_KEY

Available Models

ModelAPI NameFeaturesPrecio (tarifa oficial de Kling)
Kling Video O1kling-video-o13-10s, MVL Multi-modal, Per-Second (no audio)From $0.0881/s
Kling V3 Omnikling-v3-omni3-15s, MVL Multi-modal, Audio, Keep SoundFrom $0.0881/s

For plain text- or image-to-video, Kling V3 (per second), Kling V2.6 (per clip) and Kling Motion Control are documented on the Kling Video API page.

Precios detallados (tarifa oficial de Kling)

Kling Video O1

ModoVideo de referencia$/s
std-$0.0881
stdon$0.1320
pro-$0.1170
proon$0.1761

Kling V3 Omni

ModoAudioVideo de referencia$/s
std--$0.0881
stdon-$0.1170
std-on$0.1320
pro--$0.1170
proon-$0.1471
pro-on$0.1761

Endpoints

POST/api/v1/video/generations

Create a Kling Omni-Video generation task. Uses the unified omni-video endpoint (POST /kling/v1/videos/omni-video) under the hood.

GET/api/v1/video/generations?task_id=xxx

Query task status and get video URL

Request Parameters

Common Parameters

modelobligatoriostring
"kling-video-o1" or "kling-v3-omni"
promptstring
Text prompt (max 2500 chars). Describes the desired video content.
image_listarray
Array of { image_url, type }. (1) Image-to-video: type is "first_frame"/"end_frame". (2) Video editing (when video_list is also sent): image_list acts as a character/subject reference — swaps or inserts that face/character into the video (e.g. "replace the person in the video with this face"); type is ignored in this mode. To target a specific face you MUST pass its image here — mentioning @someone in the prompt alone does nothing.
video_listarray
Array of { video_url, refer_type, keep_original_sound }. refer_type: "feature" or "base". keep_original_sound: "yes" or "no".
element_listarray
Array of { element_id }. Subject references for consistent characters/objects.
modestring
"std" (standard) or "pro" (high quality). Default: "std"
durationstring
O1: "3" to "10". V3 Omni: "3" to "15". Default: "5"
soundstring
"on" or "off". Enable audio generation. Default: "off"
aspect_ratiostring
"16:9", "9:16", or "1:1"
callback_urlstring
Webhook URL for completion notification

Advanced Parameters

multi_shotboolean
Enable multi-shot generation. When true, shot_type is required.
shot_typestring
How shots are split; required when multi_shot is true. "customize" = you define each shot in multi_prompt; "intelligence" = the model splits the shots itself (no multi_prompt needed). Any other value returns 400.
multi_promptarray
Required when shot_type is "customize": an array (not a string) of 1 to 6 shots, each { index, prompt, duration }. index starts at 1 and increases by 1; prompt describes that shot; duration is that shot in seconds, ideally summing to the overall duration. Example: [{"index": 1, "prompt": "Macro: a finger taps a phone awake", "duration": "3"}, {"index": 2, "prompt": "Low angle: screen light on a face", "duration": "2"}]. A string, more than 6 shots or an index not starting at 1 returns 400 at creation and is not charged.
watermark_infoobject
{ enabled: true/false } - Generate watermarked version

Code Examples

curl -X POST https://api.apimodels.app/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-video-o1",
    "prompt": "A girl dancing on the beach at sunset, cinematic lighting",
    "mode": "std",
    "duration": "5",
    "aspect_ratio": "16:9"
  }'

Formato de respuesta

Respuesta de creación de tarea

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "clxxx...",
    "state": "pending",
    "model": "kling-video/kling-video-o1"
  }
}

Respuesta de éxito

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "clxxx...",
    "state": "completed",
    "model": "kling-video/kling-video-o1",
    "resultUrls": ["https://...video.mp4"],
    "createTime": 1705123450000,
    "completeTime": 1705123500000
  }
}

Respuesta de error

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "clxxx...",
    "state": "failed",
    "model": "kling-video/kling-video-o1",
    "failMsg": "Content policy violation"
  }
}

Callback de webhook (callback_url)

Incluye callback_url en la solicitud de creación. Cuando la tarea alcanza el estado terminal completed o failed, nuestro servidor envía un único HTTP POST a esa URL con Content-Type: application/json (sin encabezado de firma). La entrega se reintenta hasta 3 veces (retroceso exponencial 1s/2s/4s, 10s por intento); si aún no tiene éxito, un trabajo en segundo plano sigue reintentando durante hasta 30 minutos hasta que tu endpoint devuelva 2xx.

Estructura del payload

POST {your callback_url}
Content-Type: application/json

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "clxxx...",
    "model": "kling-video/kling-video-o1",
    "state": "completed" | "failed",
    "param": "<JSON string>",            // request params, JSON.parse once
    "resultJson": "<JSON string> | null", // result object, JSON.parse once
    "failCode": null | "CONTENT_MODERATION | INVALID_INPUT | INSUFFICIENT_BALANCE | UPSTREAM_BUSY | UPSTREAM_FAILED | TIMEOUT | INTERNAL_ERROR | OTHER",
    "failMsg": null | "string",
    "retryable": true | false,           // present when state=failed: safe to retry/fallback
    "costTime": 12345,                    // duration in ms
    "completeTime": 1705123500000,        // ms epoch
    "createTime": 1705123450000           // ms epoch
  }
}

Note: data.param and data.resultJson are both JSON strings — call JSON.parse once on each.

Video task: shape after JSON.parse(data.resultJson)

{
  "resultUrls":    ["https://r2.apimodels.app/videos/xxx.mp4"],
  "videoDuration": 5                   // optional, seconds
}

resultUrls is always present (length 1 in success, [] on failure). Other fields are optional. When state=failed, resultJson is typically null or {"resultUrls":[]}.

Ejemplo de receptor en Node.js

app.post('/webhook/kling-omni', express.json(), (req, res) => {
  const { taskId, state, resultJson, failMsg } = req.body.data
  if (state === 'completed') {
    const r = JSON.parse(resultJson)
    console.log('video ready', taskId, r.resultUrls[0], r.videoDuration)
  } else {
    console.warn('video failed', taskId, failMsg)
  }
  res.status(200).end()                 // must be 2xx, otherwise we retry
})

Notas

  • -Una tarea deja de reintentar solo tras una respuesta 2xx; una vez entregada, nunca se vuelve a enviar.
  • -Los callbacks no están firmados actualmente. Incrusta un token aleatorio en la ruta de tu callback_url y verifícalo al recibirlo.
  • -Omni video jobs typically take 30s to several minutes — strongly prefer callback_url over polling.
  • -Usa un endpoint HTTPS público que responda en menos de 10 segundos (tiempo de espera por intento).

Estados de la tarea

pendingTask queued, waiting to process
processingVideo is being generated
completedVideo generation successful
failedVideo generation failed

Códigos de error

400Bad Request - Missing or invalid parameters
401Unauthorized - Invalid API key
402Payment Required - Insufficient credits
404Not Found - Task ID not found
500Error interno del servidor

Notas importantes

  • *Video files are stored for 30 days, download promptly
  • *Omni-Video uses a single unified endpoint -- no need to choose between text-to-video and image-to-video
  • *At least one of prompt, image_list, or video_list must be provided
  • *Video face/character swap: the reference face must be passed as an image URL in image_list (alongside video_list) — an @mention in the prompt attaches no reference image
  • *O1 supports 3-10s duration, V3 Omni supports 3-15s duration, both priced per second
  • *Audio generation is available for both models (set sound: "on")
  • *Use video_list with refer_type: "base" for video editing/re-creation
  • *Poll every 5-10 seconds to check status

Preguntas frecuentes

What is Kling Omni Video?

A multimodal Kling video model that takes combined text / image / reference inputs to generate video, on POST /api/v1/video/generations with one key.