Een Kling-taak ophalen
Vraag een Kling-videogeneratietaak op via task_id en retourneer de status, voortgang en resultaatmetadata voor polling.
Wat je eerst moet controleren
task.task_status; Motion Control-taken gebruikensubmitted,processing,succeed, offailedtask.task_result.videos[0].urlwanneer een videotaak slaagttask.task_status_msgof andere geretourneerde detailvelden wanneer een taak voortijdig stoptcode,message, enrequest_idwanneer het antwoord de standaard envelop gebruikt
Pollingpatroon
Maak de taak via de overeenkomende endpoint
Poll totdat de taak een eindstatus heeft
succeed en failed.Ga door naar de volgende workflowstap
Veelvoorkomende padparen
Autorisaties
Bearer token authentication. Use your CometAPI key.
Padparameters
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
Respons
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.