Error codes
Learn about the HTTP status codes and error responses returned by the API.
The API uses conventional HTTP status codes: 2xx means the request succeeded, 4xx means the problem is with the request, and 5xx means something failed on Pixel's side (rare). Whether and how to retry depends on the code; the table below covers each one.
Error response format
Error responses use the ApiError schema, a JSON object with these fields:
code: the machine-readable error code. The table below lists every value.message: a human-readable explanation of what went wrong.details: optional; present when the error can point at what in the request was wrong. Itsissueslist one entry per problem, each with a dottedpath(empty for the request as a whole) and, where the validator gives them, amessageand itscode. SeeApiErrorDetails.retryAfter: optional; the number of seconds to wait before retrying. Set forrate_limitedandservice_unavailable.
{ "code": "invalid_request", "message": "applicationId must be a valid UUID.", "details": { "issues": [ { "path": "applicationId", "message": "Invalid uuid", "code": "invalid_format" } ] }}Error codes
| Error code | HTTP status | Meaning |
|---|---|---|
invalid_request | 400 | The request is malformed: a missing or invalid parameter, or a body that is not the expected multipart/form-data. details.issues names the offending fields when available. Fix the request before retrying. |
unsupported_format | 400 | The uploaded file is not a type the application's pipeline accepts. Each application's pipeline accepts one kind of file: a JPEG, PNG or HEIC/HEIF image, or a PDF. The error's message lists the types this application accepts, and names the file when a request carries several. |
unauthorized | 401 | The API key is missing or invalid. Send it as Authorization: Bearer <api_key>; see Authentication. |
forbidden | 403 | The API key is valid, but API access is not enabled for its organization. Rotating the key does not help; contact us to enable it. See Authentication. |
not_found | 404 | The requested resource does not exist or is not visible to your application, for example a jobId from another application. |
file_too_large | 413 | The file exceeds its upload limit: 25 MB for an image, 2 MB for a PDF. When a request carries several files, the error names the first one over its limit. |
unprocessable | 422 | The file is a valid upload but cannot be analysed. Submitting the same file again returns the same error. |
rate_limited | 429 | Too many requests. Wait retryAfter seconds before retrying; see rate limits for the limits and retry guidance. |
internal_error | 500 | Something failed on Pixel's side. These are rare; retry a submission only with its original Idempotency-Key, so the retry returns the existing job instead of creating a duplicate. Contact us if it persists. |
service_unavailable | 503 | The service is temporarily overloaded. Wait retryAfter seconds and retry with backoff. |