Query & Download (Kling Unified Format)
After submitting a task, poll the query endpoint with the id from the submit response. Once the task succeeds, the response already carries the direct video link — querying and fetching are one call; no extra download endpoint needed.
Endpoint
GET /kling-video/v1/videos/{task_id}
task_id is the id from the submit response (see Submit Task · Response Body).
Request Example
Poll until SUCCESS / FAILURE, then download result_url:
Response Body
Task status advances automatically in the platform backend — customer polling is not required for progress; it is only how you obtain result_url.
State machine:
Response Example
Downloading the Result
result_url is a direct link: open it in a browser to preview / save; HTTP GET download, <video> playback, or frontend fetch all work.
The link expires — download and store your videos promptly after generation, and do not treat it as a permanent distribution link.
Failures and Errors
- Failed task:
data.statusisFAILUREanddata.fail_reasoncarries a readable reason (e.g. non-compliant material); failed tasks are never billed; - Task not found (HTTP 404):
- For the submit-side error envelope and
error_codetable, see Submit Task · Error Handling.
