Naar hoofdinhoud gaan
GET
/
kling
/
v1
/
{action}
/
{action2}
/
{task_id}
Individual queries
curl --request GET \
  --url https://api.cometapi.com/kling/v1/{action}/{action2}/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "code": 0,
  "message": "SUCCEED",
  "request_id": "9ab376fc-9059-487f-9e2a-c9c89f1a344f",
  "data": {
    "task_id": "878106242831892487",
    "task_info": {},
    "created_at": 1777385361501,
    "updated_at": 1777385363321,
    "task_result": {},
    "task_status": "processing"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Gebruik deze endpointfamilie nadat u een Kling-taak hebt aangemaakt. Dit is de gebruikelijke pollingstap voor asynchrone Kling-mediataken.

Wat u eerst moet controleren

  • Taakstatus en voortgangsvelden
  • Output-metadata of asset-URL’s wanneer de taak is voltooid
  • Providerspecifieke foutmeldingen wanneer een taak voortijdig stopt

Pollingpatroon

1

Maak de taak aan via het bijbehorende endpoint

Begint met de Kling-aanmaakpagina voor uw workflow, zoals Text to Video of Image to Video.
2

Poll totdat de taak een eindstatus heeft bereikt

Blijf query’s uitvoeren met de geretourneerde task id totdat de status success of failure bereikt.
3

Ga verder naar de volgende workflowstap

Gebruik de voltooide output direct, of ga naar de volgende providerspecifieke actiepagina als uw workflow gekoppelde bewerkingen ondersteunt.
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, 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.

code
integer
vereist

Kling response code. 0 indicates the query was accepted.

message
string
vereist

Kling response message.

request_id
string
vereist

Identifier for this query request.

data
object
vereist