VidoCraft API

Get task status

Poll a task until it reaches a terminal status and read its results.

GET/api/v1/tasks/:id

Check the task status every 5 seconds. Stop polling when the status is completed, failed, or canceled.

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:c9vuwv34uj9w",
  "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" }
    ]
  }
}

Keep private result links confidential. If a link expires, query the task for a fresh one. A result rejected in a later review will no longer be available. Query the task for its current status; a review change does not trigger another terminal webhook.

status values

ValueMeaning
queuedAccepted, waiting for a worker slot.
generatingThe model is processing the task.
completedFinished — data.results contains the output URLs.
failedGeneration failed. Credits are usually refunded. Input-media or output moderation rejections retain the charge; check billing_status.
canceledCanceled before completion. Canceled while still queued, its credits are refunded; once generation has started they stay charged.

failed_reason

For a failed task, failed_reason provides a machine-readable reason, such as nsfw_prompt_blocked when the prompt fails moderation. This field is separate from error.code in a failed request response: requests rejected directly by content moderation use moderation_blocked. Check billing_status to determine whether credits have been refunded.

billing_status values

ValueMeaning
reservedCredits already debited while the task runs; this legacy status name does not mean a separate balance hold.
chargedTask succeeded, input media or generated output was rejected by content moderation, or it was canceled after generation started; credits remain charged.
refundedA refundable task failure, prompt moderation rejection, or cancellation while queued; credits returned.
sandboxTest-key task; no credits were ever involved.

While queued, the response includes queue_position.

On this page