Retrieve video
GET/v1/videos/{video_id}
Read a video task’s status and result. Poll every 3–5 seconds with one loop per task; on 429 wait as directed by Retry-After. If your client times out, keep querying the same task instead of creating a new one.
Headers
AuthorizationstringRequiredBearer <API_KEY>.
Path parameters
video_idstringRequiredThe
idreturned at creation (starts withtask_). Only tasks owned by the key’s user can be read.
Returns
HTTP 200 with the video task object, as returned at creation.
idstringRequiredTask ID beginning with
task_. Use it to query and download.task_idstringOptionalCompatibility copy of
id.objectstringOptionalAlways
video.modelstringOptionalThe requested model ID.
statusstringOptionalTask status. Use
status, notprogress, to decide completion.Supported values
queuedWaiting; keep pollingin_progressGenerating; keep pollingcompletedDone; readmetadata.urlfailedFailed; readerror.message. The charge is refunded by the serverunknownStatus not yet known; keep polling the same task and do not resubmit
progressintegerOptionalProgress 0–100, for display only.
created_atintegerOptionalCreation time in Unix seconds.
completed_atintegerOptionalCompletion time in Unix seconds; present once completed.
secondsstringOptionalTask duration in seconds, as a string.
metadataobjectOptionalTask parameters and result URL.
Show child fields (4)
resolutionstringOptionalResolution tier.
aspect_ratiostringOptionalAspect ratio.
urlstringOptionalVideo URL. Usable only when
statusiscompleted. Before that it may already show this site’s/v1/videos/{id}/contentURL, which returns 400 until the task finishes.Once completed it is either a public storage URL (do not send your API key) or this site’s
/v1/videos/{id}/contentURL (send the API key that created the task). Use the returned URL as-is.billed_secondsstringOptionalBilled seconds; returned for some per-second tasks after settlement.
errorobjectOptionalPresent only when
statusisfailed.Show child fields (2)
codestringOptionalAlways
video_generation_failed.messagestringOptionalFailure reason, such as unreadable media or a content policy rejection.
Errors
| HTTP | code | Cause and action |
|---|---|---|
| 404 | invalid_request_error | The task does not exist or belongs to another user. |
| 401 | — | The API key is invalid, expired or disabled. |
| 403 | — | The key does not allow this model, or the IP is restricted. |
| 429 | — | Polling too fast; wait per Retry-After. |
curl https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx \
-H "Authorization: Bearer $LINGLIGHT_API_KEY"const response = await fetch('https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx', {
headers: {
Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
},
})
console.log(response.status, await response.json())import os
import requests
response = requests.get(
"https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx",
headers={
"Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
},
timeout=60,
)
print(response.status_code, response.json()){
"id": "task_xxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxxxxx",
"object": "video",
"model": "seedance2.0",
"status": "completed",
"progress": 100,
"created_at": 1795660800,
"completed_at": 1795660950,
"seconds": "5",
"metadata": {
"aspect_ratio": "16:9",
"resolution": "720p",
"url": "https://media.example.com/videos/task_xxxxxxxxxxxxxxxx.mp4"
}
}curl https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx \
-H "Authorization: Bearer $LINGLIGHT_API_KEY"const response = await fetch('https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx', {
headers: {
Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
},
})
console.log(response.status, await response.json())import os
import requests
response = requests.get(
"https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx",
headers={
"Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
},
timeout=60,
)
print(response.status_code, response.json()){
"id": "task_xxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxxxxx",
"object": "video",
"model": "seedance2.0",
"status": "failed",
"progress": 100,
"created_at": 1795660800,
"seconds": "5",
"metadata": {
"aspect_ratio": "16:9",
"resolution": "720p",
"url": "https://ling-light.com/v1/videos/task_xxxxxxxxxxxxxxxx/content"
},
"error": {
"code": "video_generation_failed",
"message": "The reference media could not be read. Check that the link is valid and public."
}
}