Errors & Status Codes

Predictable shapes, sane retry semantics.

Error response shape

json
{
  "detail": "Human-readable error message",
  "code": "ERROR_CODE"
}

For payment-related errors (402) the detail field is an object with message, reason, action_label, and action_url fields so you can render an in-product upgrade prompt automatically.

json
{
  "detail": {
    "message": "You have an active plan, but you've run out of credits.",
    "reason": "insufficient_credits",
    "action_label": "Top up credits",
    "action_url": "https://YOUR_DOMAIN/top-up"
  }
}

Status code reference

CodeMeaningRetryAction
200Success—Process the response.
400Bad Request❌Check parameters.
401Unauthorized❌Verify your API key.
402Payment Required❌Top up credits or pick a plan.
404Not Found❌Video / transcript unavailable.
408Timeout✅Retry after 1–5s.
422Validation Error❌Invalid URL / ID.
429Rate Limited✅Respect Retry-After header.
500Server Error⚠️Retry once, then contact support.
503Unavailable✅Retry after 1–5s.

Charging rules

  • Successful (200) — 1 credit charged.
  • Cached HIT (200) — 1 credit charged. Speed is the benefit.
  • Free endpoints (200) — 0 credits, but require ≥1 active credit.
  • 4xx and 5xx errors — never charged.
  • 429 (rate limited) — never charged.