Skip to main content
Use this page when a call fails. It lists every error code the public API and the video CDN return.

Read the status, then the code

  1. Read the HTTP status to know the kind of failure.
  2. Read the code to know the exact cause. Branch on code, not on the text.
  3. Use the Retry column to decide what to do next.

Error body

Most errors use the problem format (application/problem+json, RFC 9457):
Some responses do not use this format. These are the exceptions:
  • CDN errors also send the code in the X-Segmnt-Error header. The title is a short label, and detail repeats it.
  • Unknown API route: a path that does not exist returns 404 with the body {"error":"not_found"}. There is no code field. Match on the status.
  • CSRF refusal: a browser request from a site that is not allowed returns 403 with the body {"error":"csrf_rejected"}. There is no code field.
  • Embed page errors: the embed page (/e/) returns an HTML page, not a JSON body. It uses the same status and code values as the table below.

Examples

These examples show the format of each response. The values are examples. 1. Missing sign-in on an API call (401):
With an API key instead of a session, the text is Missing or wrong API key. The code is the same. 2. A protected video with no token (403, CDN):
3. A wrong HTTP method (405):

Error codes

This table lists every public error code once. Codes that come from the video CDN are marked CDN. If a response has a status or code that is not in this table, do not guess. Retry 5xx with backoff, and 429 after Retry-After. Stop on any other 4xx status, and report the full response to us.

Rate limits

Rate limits protect the API. Limits are counted per minute. rate_limited sends a Retry-After header. Its value is a number of seconds. Wait that long, then retry. The /health route and CORS preflight requests are never counted. Your server is one client IP. If many of your users share one server, they can reach the limit together. Batch requests, or spread calls over time.

Errors that need extra care

storage_unavailable (503)

Video storage is down for a short time. The response uses the problem format. It does not include a Retry-After header.
  • On create: no upload started. Call create again.
  • On complete: the upload is not lost. Call complete again with the same parts.
Retry with backoff: wait longer after each try. If it still fails after several tries, stop and try again later.

video_not_ready (409) and video_unavailable (403, CDN)

These mean the video is not ready to play. Do not loop on the request. Wait for a video.ready webhook, then request a token. See Webhooks.

Playback tokens

A token_expired or ip_mismatch error needs a new token, not a retry with the same token. Create tokens on your server each time you show a video. See Create playback tokens on your server.

Retry rule of thumb

  • Retry 429 after Retry-After. Retry 5xx with backoff. The one 429 without a header is too_many_open_uploads: wait until one upload ends.
  • Do not retry 400, 401, 403, 404, 405 or 409 as they are. Fix the request, get a new credential or token, or wait for the state to change. The one exception is a key-prefix conflict (409): retry it once.
  • Do not retry in a loop a 503 with a not_configured, *_not_configured, billing_paused or billing_unavailable code. Nothing changes until we change the setup.

Where to go next