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 structured context, for example the offending fields on some validation errors.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_string"
}
]
}
}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 an accepted image type. Send JPEG, PNG, or HEIC/HEIF. |
unauthorized | 401 | The API key is missing or invalid. Send it as Authorization: Bearer <api_key>; 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 the 25 MB upload 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. |