Draft: these docs describe OctaVideo as it will be at launch; some features may not be live yet.
OctaVideoDocs

Errors

The error envelope, every error code the API returns, and which errors are safe to retry.

Every error has the same JSON shape and a stable machine code. Branch on code and the HTTP status, never on message: messages are written for people and can change.

The error envelope

400 Bad Request
{
  "error": {
    "code": "validation_failed",
    "message": "validation failed",
    "request_id": "9f2c4e7a1b3d5f6e8a0c2e4f6a8b0d1c",
    "details": {
      "fields": [
        { "field": "video_id", "message": "must be a UUID" },
        { "field": "ttl_seconds", "message": "must be at most 86400" }
      ]
    }
  }
}
FieldMeaning
codeStable machine code, listed below.
messageA short description for logs and people.
request_idThe ID of this request, also in the X-Request-ID response header. Quote it when you contact support.
details.fieldsOnly on validation_failed: every invalid field with the reason.

Server errors (500) always say internal server error: their details stay in OctaVideo's logs, found by the request_id.

Error codes

StatuscodeWhat happenedWhat to do
400validation_failedOne or more fields are invalid.Fix the fields listed in details.fields.
400bad_requestThe body could not be read: malformed JSON, an unknown field, more than one JSON value, an empty body, or a missing multipart body.Fix the request. The API rejects unknown fields on purpose, so a typo never passes silently.
401unauthorizedThe AccessKey header is missing, or the key is wrong or was regenerated.Check the key on your server. See Authentication.
403forbiddenThe key is valid but not allowed to do this.Check that the resource belongs to this key's library.
404not_foundThe video, collection or route does not exist in this library.Check the ID and the library of your key.
405method_not_allowedThe route exists with another HTTP method.Check the method in the API reference.
409video_not_readyYou asked for a playback OTP before the video finished processing.Wait until encoding_status is ready. See Processing status.
409conflictThe request conflicts with the current state.Read the message, then fetch the resource again.
413payload_too_largeThe body is over the limit.See limits.
429rate_limitedToo many requests.Wait for the seconds in the Retry-After header, then retry.
500internal_errorSomething failed on OctaVideo's side.Retry with backoff. If it persists, send the request_id to support.

Playback errors

The player checks every OTP when it starts. Your viewers may see these refusals; they never reach your server.

codeMeaning
domain_not_allowedThe page that embeds the player is not on the library's allowed domains.
country_blockedThe viewer's country is blocked by the library's country rules.
unauthorizedThe OTP is unknown, already used or expired. Request a new one for each page view.

Retrying

  • Retry 429 after Retry-After, and 500 with exponential backoff (for example 1 s, 2 s, 4 s, up to 5 attempts).
  • Don't retry other 4xx errors unchanged: they fail the same way until you fix the request.
  • Uploads: an upload that fails halfway must start again from the beginning.

Request IDs

Every response carries an X-Request-ID header. You can send your own (printable ASCII, up to 128 characters) to match OctaVideo's logs with yours; otherwise OctaVideo generates one. Log it next to every failed call.

On this page