Skip to main content
GET
Gebruik deze endpointfamilie nadat je een Kling-taak hebt gemaakt. Dit is de gebruikelijke pollingstap voor asynchrone Kling-mediataken.
Een query kan het taakobject rechtstreeks retourneren of in de standaard data envelop. Normaliseer elk antwoord met task = payload.data ?? payload voordat je taakvelden leest.

Wat je eerst moet controleren

  • task.task_status; Motion Control-taken gebruiken submitted, processing, succeed, of failed
  • task.task_result.videos[0].url wanneer een videotaak slaagt
  • task.task_status_msg of andere geretourneerde detailvelden wanneer een taak voortijdig stopt
  • code, message, en request_id wanneer het antwoord de standaard envelop gebruikt

Pollingpatroon

1

Maak de taak via de overeenkomende endpoint

Begin met de Kling-creatiepagina voor je workflow, zoals Tekst naar video, Afbeelding naar video, of Motion Control.
2

Poll totdat de taak een eindstatus heeft

Normaliseer de antwoordstructuur en blijf vervolgens query’s uitvoeren met de geretourneerde taak-id totdat deze een eindstatus bereikt. Voor Motion Control zijn de eindstatussen succeed en failed.
3

Ga door naar de volgende workflowstap

Gebruik de voltooide uitvoer rechtstreeks, of ga naar de volgende toepasselijke actiepagina als je workflow gekoppelde bewerkingen ondersteunt.

Veelvoorkomende padparen

Zie voor de volledige parameterreferentie de officiële Kling-documentatie.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Padparameters

action
string
vereist

Resource type. One of: images, videos, audio.

action2
string
vereist

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
string
vereist

Task ID

Respons

200 - application/json

Current Kling task state.

A query can return the task object directly or inside the standard response envelope. Normalize both shapes before reading task fields.

task_id
string
vereist

Kling task ID.

task_status
string
vereist

Current task state. Compatible Motion Control tasks use submitted, processing, succeed, or failed.

task_status_msg
string

Failure or status detail when returned.

task_info
object

Additional task metadata. The object can be empty.

task_result
object

Absent on an initial submitted task, commonly empty while processing or after failure, and populated when a task succeeds.

watermark_info
object

Watermark information when returned by a compatible workflow.

created_at
integer<int64>

Task creation timestamp in milliseconds.

updated_at
integer<int64>

Last task update timestamp in milliseconds.

final_unit_deduction
string

Final unit deduction value, when returned.

final_balance_deduction
object

Final balance deduction values, when returned.

Laatst gewijzigd op 31 juli 2026