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.Documentation Index
Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt
Use this file to discover all available pages before exploring further.
Rate limits
Streampixel applies per-user rate limits to write-heavy build pipeline endpoints to protect the build manager and downstream streaming infrastructure.| Endpoint | Limit | Scope |
|---|---|---|
POST /projects/upload-file | 1 request per 2 minutes | Per userId |
POST /projects/distribute-file | 1 request per 2 minutes | Per userId |
| All other endpoints | Unlimited (subject to fair use) | Per userId |
429 Too Many Requests with a JSON body explaining when you can retry.
429 Too Many Requests
Standard error response
Every error response — regardless of status code — uses the same JSON shape:code, errors[], or nested envelope. Always parse message from the JSON body and surface it to operators or logs.
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
| Status | Meaning | Typical example |
|---|---|---|
200 OK | Request succeeded with a response body. | GET /projects returns the list. |
201 Created | Resource was created. | New build accepted by the pipeline. |
204 No Content | Request succeeded; no body returned. | Internal admin actions. |
400 Bad Request | Malformed request — usually a missing or invalid field. | "Missing required field: fileUrl" |
401 Unauthorized | apiKey is missing or invalid. | "Unauthorized: Invalid API Key" |
403 Forbidden | The authenticated user does not own the target resource. | "Forbidden: project does not belong to this user" |
404 Not Found | The resource does not exist. | "Project not found" |
415 Unsupported Media Type | Content-Type is missing or not application/json. | "Content-Type must be application/json" |
429 Too Many Requests | You exceeded a rate limit window. | "Rate limit exceeded. Try again in 2 minutes." |
500 Internal Server Error | Streampixel had an unexpected failure. | "Internal server error" |
Common causes
- 400 Bad Request
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
- 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
fileUrlshape (must be a public direct download link).
Retry strategy
The rule of thumb:- Retry on
429and5xx. - 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
Best practices
- Always read
messagefrom the response body — never rely on the status code alone for human-friendly errors. - Log the full request and response (with
apiKeyredacted) 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
5xxas 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-filespecifically, 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.