Error Codes
When an error occurs, RenderScreenshot returns an appropriate HTTP status code and a JSON error response.
Error Response Format
{ "error": { "code": "invalid_url", "message": "The provided URL is not valid", "details": {} } }
HTTP Status Codes
400 Bad Request
Invalid request parameters.
| Code | Description |
|---|---|
invalid_url |
The URL is malformed or missing |
invalid_parameter |
A parameter has an invalid value |
missing_parameter |
A required parameter is missing |
invalid_paper_format |
Invalid PDF paper format (valid: a0-a6, letter, legal, tabloid) |
invalid_pdf_scale |
PDF scale must be between 0.1 and 2.0 |
invalid_page_ranges |
Invalid page ranges format (use "1-5, 8, 10-12") |
invalid_pdf_dimension |
Invalid PDF width/height (use CSS units: "8.5in", "210mm") |
invalid_pdf_margin |
Invalid PDF margin (use CSS units: "1cm", "0.5in", "20px") |
401 Unauthorized
Authentication failed.
| Code | Description |
|---|---|
missing_api_key |
No API key provided |
invalid_api_key |
API key is invalid or revoked |
expired_signature |
Signed URL has expired |
invalid_signature |
Signature verification failed |
403 Forbidden
Access denied.
| Code | Description |
|---|---|
blocked_url |
The target URL is blocked |
quota_exceeded |
Monthly screenshot quota exceeded |
404 Not Found
Resource not found.
| Code | Description |
|---|---|
page_not_found |
Target URL returned 404 |
408 Request Timeout
The request took too long.
| Code | Description |
|---|---|
render_timeout |
Screenshot rendering timed out |
429 Too Many Requests
Rate limit exceeded.
| Code | Description |
|---|---|
rate_limit_exceeded |
Too many requests per minute |
500 Internal Server Error
Server-side error.
| Code | Description |
|---|---|
render_failed |
Screenshot rendering failed |
internal_error |
Unexpected server error |
Example Error Response
curl https://api.renderscreenshot.com/v1/screenshot \ -H "Authorization: Bearer invalid_key"
Response (401):
{ "error": { "code": "invalid_api_key", "message": "The provided API key is invalid" } }
See Also
- Troubleshooting - Common issues and solutions
- Rate Limits - Rate limit details and handling 429 errors
- Content Validation - Understanding
content_check_failederrors - SDKs - Structured error handling in all official SDKs