Obtener una tarea de Kling
Consulta una tarea de generación de video de Kling mediante task_id y devuelve su estado, progreso y metadatos de resultado para sondeo.
Qué comprobar primero
task.task_status; las tareas de Motion Control usansubmitted,processing,succeed, ofailedtask.task_result.videos[0].urlcuando una tarea de video se completa correctamentetask.task_status_msgu otros campos de detalle devueltos cuando una tarea finaliza antes de tiempocode,message, yrequest_idcuando la respuesta usa el sobre estándar sobre
Patrón de sondeo
Crea la tarea desde el endpoint correspondiente
Sondea hasta que la tarea alcance un estado terminal
succeed y failed.Continúa con el siguiente paso del flujo de trabajo
Pares de rutas habituales
Autorizaciones
Bearer token authentication. Use your CometAPI key.
Parámetros de ruta
Resource type. One of: images, videos, audio.
Sub-action matching the resource type. For images: generations, kolors-virtual-try-on. For videos: text2video, image2video, motion-control, lip-sync, effects, multi-image2video, multi-elements. For audio: text-to-audio, video-to-audio.
Task ID
Respuesta
Current Kling task state.
- Option 1
- Option 2
A query can return the task object directly or inside the standard response envelope. Normalize both shapes before reading task fields.
Kling task ID.
Current task state. Compatible Motion Control tasks use submitted, processing, succeed, or failed.
Failure or status detail when returned.
Additional task metadata. The object can be empty.
Absent on an initial submitted task, commonly empty while processing or after failure, and populated when a task succeeds.
Watermark information when returned by a compatible workflow.
Task creation timestamp in milliseconds.
Last task update timestamp in milliseconds.
Final unit deduction value, when returned.
Final balance deduction values, when returned.