Get task status
Poll a task until it reaches a terminal status and read its results.
GET/api/v1/tasks/:id
Poll at most once per second per task. Terminal states are completed, failed and canceled — stop polling once you see one.
When the task completes, data.results holds the output URLs (signed, time-limited — download promptly) and data.media adds per-file type, thumbnail and duration.
curl https://vidocraft.com/api/v1/tasks/3f2ak9mr7xqp4tnz8blc6ywh \
-H "Authorization: Bearer sk_test_xxxxxxxx"{
"id": "3f2ak9mr7xqp4tnz8blc6ywh",
"status": "completed",
"created_at": 1781234567,
"model": "text-to-image:rikcgfbufzdm",
"credits": 1,
"billing_status": "charged",
"failed_reason": null,
"data": {
"results": ["https://cdn.example.com/…/output.png"],
"media": [
{ "url": "https://cdn.example.com/…/output.png", "type": "image" }
]
}
}status values
| Value | Meaning |
|---|---|
queued | Accepted, waiting for a worker slot. |
generating | The model is processing the task. |
completed | Finished — data.results contains the output URLs. |
failed | Generation failed; reserved credits were refunded — except when failed_reason is nsfw_output_blocked (see below). |
canceled | Canceled before completion. Canceled while still queued, its credits are refunded; once generation has started they stay charged. |
billing_status values
| Value | Meaning |
|---|---|
reserved | Credits reserved while the task runs. |
charged | Task succeeded, its result was withheld by content moderation (failed_reason: nsfw_output_blocked), or it was canceled after generation had started; the reservation was settled. |
refunded | Task failed, or was canceled while still queued; credits returned. |
sandbox | Test-key task; no credits were ever involved. |
While queued, the response includes queue_position.