Advanced

Errors & rate limits

Every error uses one predictable envelope — a stable code, a human message, and whether retrying helps.

Error envelope

error response
{
  "error": {
    "code": "insufficient_credits",        // stable, machine-readable
    "message": "Not enough credits for this request. ...",
    "retryable": false,                     // whether retrying can help
    "request_id": "req_1f2e3d4c5b6a7988",  // quote this to support
    "details": { "required_credits": 18, "remaining_credits": 4 },
    "links": { "buy_credits": "https://app.vivideo.ai/subscription" }
  }
}

Codes

HTTPCodeCause & next step
400invalid_request · unknown_modelFix the request; details list what’s allowed and which model ids exist.
401missing_api_key · invalid_api_key · api_key_revokedSend a valid key.
402insufficient_creditsBuy credits — see links.buy_credits.
403upgrade_required · free_limit_reachedUpgrade the account — see links.upgrade.
404not_foundNo such resource for this account.
409duplicate_request · idempotency_in_flightReuse the in-flight request or retry shortly.
413payload_too_largeKeep JSON bodies under 256 KB.
429rate_limitedWait retry_after_seconds, then retry.
5xxupstream_error · internal_errorRetryable — use exponential backoff.
Branch on error.code, not the HTTP status or message text — codes are stable, messages may be reworded. Log request_id for every failure.

Rate limits

ScopeLimit
All requests, per key120 / minute
All requests, per account (all keys)240 / minute
Video creation (premium)6 / min · 60 / hour · 200 / day
Video creation (free)2 / min · 10 / day
Avatar create · brand-from-url · speech · uploads5 / min · 100 / day
Webhook registration10 / minute

Exceeding a limit returns 429 rate_limited with a Retry-After header and retry_after_seconds in the body. Limits are per account, so adding keys doesn't raise them. Status checks are cheap — poll at the suggested interval, not in a tight loop.

Idempotency

Send an Idempotency-Key header on POST /v1/videos so a network retry replays the original response instead of creating and charging a second video. Keys are scoped per account and remembered for 24 hours.


Machine-readable: interactive reference · openapi.yaml · llms-api.txt. Base URL https://api.vivideo.ai.