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

Pagination and limits

How list endpoints page their results, and the size, time and rate limits of the API.

List endpoints return one page at a time, and every request has size and time limits. Design your integration around them from the start.

Response shape

A successful response wraps its payload in data. A list adds meta:

GET /videos?page=2&per_page=25
{
  "data": [
    { "id": "6f1c2b9e-4a7d-4f3e-9b8a-2d5c7e1f0a34", "title": "Lesson 26", "encoding_status": "ready" }
  ],
  "meta": { "page": 2, "per_page": 25, "total": 137 }
}

Pagination

Query parameterDefaultAllowed
page11 or more
per_page251 to 100

meta.total counts every item across all pages, so the last page is ceil(total / per_page). A page past the end returns an empty data list.

list-all-videos.mjs
const base = 'https://api.octavideo.tech/api/v1';
const headers = { AccessKey: process.env.OCTAVIDEO_KEY };

const videos = [];
for (let page = 1; ; page++) {
  const res = await fetch(`${base}/videos?page=${page}&per_page=100`, { headers });
  if (!res.ok) throw new Error(`OctaVideo ${res.status}`);
  const { data, meta } = await res.json();
  videos.push(...data);
  if (page * meta.per_page >= meta.total) break;
}

Limits

LimitValueError when exceeded
JSON request body1 MiB413 payload_too_large
Upload file10 GiB413 payload_too_large
Request time30 seconds504 Gateway Timeout (no JSON body)
Upload time2 hoursthe connection closes
Items per page100400 validation_failed
Chapters per video200400 validation_failed
Videos added to a collection per request100400 validation_failed
OTP lifetime (ttl_seconds)1 second to 24 hours, 5 minutes by default400 validation_failed

Rate limits

When you send too many requests, the API answers 429 rate_limited with a Retry-After header in seconds. Wait that long, then retry. Playback authorization in the player is limited per library and viewer IP, which protects your videos from scripted abuse.

During the private beta the exact rate limits can change. Build your client to honour Retry-After rather than a fixed number.

Strict JSON

The API rejects JSON bodies with unknown fields, trailing data or more than one value, with 400 bad_request. Send only the documented fields, and set Content-Type: application/json.

On this page