Status code overview
| Range | Meaning |
|---|---|
| 2xx | The request succeeded |
| 4xx | The request failed due to a client error |
| 5xx | The request failed due to a server error |
Error response format
All error responses return a JSON body with anerror object containing code and message fields:
details field with additional context:
Error codes
| Status | Code | Description |
|---|---|---|
| 401 | missing_api_key | No API key provided. Pass it via the X-API-Key header or api_key query parameter. |
| 401 | invalid_api_key | The provided API key is invalid or has been revoked. |
| 401 | unauthorized | Authentication required. Provide a valid API key. |
| 402 | usage_limit_exceeded | Monthly screenshot limit reached. Upgrade your subscription at the dashboard. |
| 403 | forbidden | You do not have permission to access this resource. |
| 404 | not_found | The requested resource (e.g., screenshot ID) was not found. |
| 422 | invalid_options | Validation failed. Check the details field for specific parameter errors. |
| 422 | invalid_url | The provided URL is not valid. Ensure it includes a protocol (e.g., https://). |
| 422 | selector_not_found | The specified CSS selector was not found on the page. Only returned when error_on_selector_not_found is true. |
| 429 | rate_limit_exceeded | Too many requests per minute. See rate limits. |
| 500 | render_failed | Screenshot rendering failed. The target page may have caused an error. |
| 500 | internal_error | An unexpected server error occurred. Retry the request. If it persists, contact support. |
| 502 | host_error | Could not reach the target URL. The site may be down or blocking requests. |
| 503 | service_unavailable | The screenshot service is starting up. Retry in a few seconds. |
| 504 | navigation_timeout | Page navigation timed out. Try increasing the navigation_timeout or timeout options. |
Handling errors
Python
JavaScript
Retry strategy
For transient errors (429, 5xx), implement exponential backoff:

