Skip to main content
Every Streampixel REST endpoint shares the same authentication model, error format, and rate-limit philosophy. This page is the single reference for what to expect when a request fails — and how to handle it correctly in production clients.

Rate limits

Streampixel applies per-user rate limits to write-heavy build pipeline endpoints to protect the build manager and downstream streaming infrastructure.
“Unlimited” still means you must behave well. Aggressive polling, parallel fan-out, or repeated retries against any endpoint can be throttled or blocked at the edge. If you need high-frequency reads, contact support so we can scale your account appropriately.
When you exceed a limit, the API returns 429 Too Many Requests with a JSON body explaining when you can retry.
429 Too Many Requests
The wait time is reported in seconds and counts down as the 2-minute window elapses, so a retry immediately after the call reports ~120s and a retry near the end reports a small number.

Standard error response

Every error response includes a human-readable message:
Newer endpoints additionally return a stable, machine-readable code alongside the message — safe to switch on, because it doesn’t change when the wording does:
Always read message. Where a code is present you may branch on it, but not every endpoint sets one yet — so treat code as optional and never assume its absence means success. There is no errors[] array or nested envelope.
Successful responses (2xx) vary by endpoint and are documented on each endpoint’s page. The error shape above is uniform across the entire API.

HTTP status codes

Common causes

  • Required field omitted from the JSON body (e.g., fileUrl, projectId).
  • Wrong field type (number passed where a string was expected).
  • Empty string where a non-empty value is required.
  • Invalid fileUrl shape (must be a public direct download link).

Retry strategy

The rule of thumb:
  • Retry on 429 and 5xx.
  • Do not retry on any other 4xx — the request is wrong; retrying won’t fix it.
  • Use exponential backoff with jitter so a fleet of clients doesn’t synchronize on the same retry tick.

Pseudocode: backoff retry loop

Node.js
Python
Cap your maximum delay (e.g., 60 seconds) and your maximum attempts (e.g., 5). Unbounded retries make incidents worse, not better.

Best practices

  • Always read message from the response body — never rely on the status code alone for human-friendly errors.
  • Log the full request and response (with apiKey redacted) when you hit an unexpected error. The body almost always pinpoints the issue.
  • Honor 429 — if you see one, slow down. Repeatedly hammering a rate-limited endpoint will get the entire user account temporarily blocked.
  • Treat 5xx as transient unless they persist beyond 2–3 retries spread over ~30 seconds. After that, alert and investigate.
  • Never retry idempotently destructive calls without confirming success first — for upload-file specifically, if the first call timed out, check the project’s build list before retrying.

Next steps

API authentication

How apiKey and userId work and where to obtain them.

Webhooks

Replace polling with push-based event delivery.