Poll a Seedance video task by id on CometAPI with GET /v1/videos/. Works for Seedance 1.0 Pro, 1.5 Pro, and 2.0 tasks. Returns the current status, progress, and the signed video_url after the task reaches SUCCESS.
curl https://api.cometapi.com/v1/videos/<TASK_ID> \
-H "Authorization: Bearer <COMETAPI_KEY>"{
"id": "task_abc123",
"model": "doubao-seedance-2-0-fast",
"object": "video",
"status": "IN_PROGRESS",
"progress": 45,
"created_at": 1776567610,
"completed_at": null
}id in the path is the value returned by the create call, regardless of which Seedance model produced the task.
SUBMITTED and IN_PROGRESS are non-terminal; SUCCESS, FAILED, and ERROR are terminal and the task will not move again.
| Status | Meaning | Terminal |
|---|---|---|
SUBMITTED | Accepted and queued for rendering. | no |
IN_PROGRESS | Rendering in progress. | no |
SUCCESS | Finished. video_url is present in the response. | yes |
FAILED | The provider rejected the task. | yes |
ERROR | An internal error prevented completion. | yes |
import time
import requests
TASK_ID = "<TASK_ID>"
headers = {"Authorization": "Bearer <COMETAPI_KEY>"}
TERMINAL = {"SUCCESS", "FAILED", "ERROR"}
while True:
response = requests.get(
f"https://api.cometapi.com/v1/videos/{TASK_ID}",
headers=headers,
timeout=15,
)
response.raise_for_status()
data = response.json()
if data["status"] in TERMINAL:
print(data.get("video_url"))
break
time.sleep(10)
status — drives the stop condition for your polling loop.progress — integer 0 to 100 that you can surface in a UI.video_url — signed download URL, present only on SUCCESS. The signature is time-limited; download or re-host the file before the signature expires.completed_at — Unix timestamp filled in once the task reaches a terminal status.model — echoes the Seedance model id used when the task was created.400 with message: "task_not_exist" means the id is unknown. Confirm that you captured the id from a successful POST /v1/videos response and that you use it verbatim.401 means the bearer token is missing or invalid. Check that the request header is Authorization: Bearer <COMETAPI_KEY>.Bearer token authentication. Use your CometAPI key.
Task id returned by POST /v1/videos.
Current task state.
Task id.
Object type, always video.
Model id that generated the task.
Task status. SUBMITTED and IN_PROGRESS are non-terminal. SUCCESS, FAILED, and ERROR are terminal.
SUBMITTED, IN_PROGRESS, SUCCESS, FAILED, ERROR Completion percentage.
0 <= x <= 100Task creation time as a Unix timestamp in seconds.
Signed download URL for the finished video. Present only when status is SUCCESS. The signature is time-limited, so download or re-upload the file to your own storage soon after you receive it.
Task completion time as a Unix timestamp in seconds. null while the task is non-terminal.
curl https://api.cometapi.com/v1/videos/<TASK_ID> \
-H "Authorization: Bearer <COMETAPI_KEY>"{
"id": "task_abc123",
"model": "doubao-seedance-2-0-fast",
"object": "video",
"status": "IN_PROGRESS",
"progress": 45,
"created_at": 1776567610,
"completed_at": null
}