VidoCraft API

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

ValueMeaning
queuedAccepted, waiting for a worker slot.
generatingThe model is processing the task.
completedFinished — data.results contains the output URLs.
failedGeneration failed; reserved credits were refunded — except when failed_reason is nsfw_output_blocked (see below).
canceledCanceled before completion. Canceled while still queued, its credits are refunded; once generation has started they stay charged.

billing_status values

ValueMeaning
reservedCredits reserved while the task runs.
chargedTask 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.
refundedTask failed, or was canceled while still queued; credits returned.
sandboxTest-key task; no credits were ever involved.

While queued, the response includes queue_position.

On this page