HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
200 | OK | Synchronous extraction completed successfully |
202 | Accepted | Async/batch job queued for processing |
400 | Bad Request | Invalid input — missing required fields, unsupported format |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | Access denied to the requested resource |
404 | Not Found | Record ID does not exist or does not belong to you |
422 | Validation Error | Request body failed validation (see detail for specifics) |
429 | Rate Limited | Too many requests — wait and retry |
500 | Internal Server Error | Unexpected error — contact support if persistent |
Error Response Format
All error responses follow this structure:Rate Limit Errors
When you exceed your rate limit, the API returns a429 status code:
Rate Limits by Plan
| Plan | Limit |
|---|---|
| Free | 20 pages/min |
| Pay as you go | 300 pages/min |
| Enterprise | 100 pages/sec |
Common Errors and Solutions
401: Invalid or expired API key
401: Invalid or expired API key
Cause: The
Authorization header is missing, malformed, or contains an expired key.Solution:- Verify the header format is exactly
Authorization: Bearer YOUR_API_KEY - Check that there are no extra spaces or newlines in the key
- Regenerate your API key from docstrange.nanonets.com if needed
400: No file provided
400: No file provided
Cause: The request did not include any of
file, file_url, or file_base64.Solution: Provide exactly one input method:400: Unsupported file format
400: Unsupported file format
Cause: The uploaded file type is not supported.Solution: Use one of the supported formats: PDF, Word (.docx), Excel (.xlsx, .xls), PowerPoint (.pptx), PNG, JPG, JPEG, TIFF, WebP, GIF.
422: output_format is required
422: output_format is required
Cause: The Valid values:
output_format field is missing from the request.Solution: Always include the output_format parameter:markdown, html, json, csv (or comma-separated combinations).Async job stuck in 'processing'
Async job stuck in 'processing'
Cause: Large documents may take longer to process, or the job may have failed silently.Solution:
- Wait at least 5 minutes for large documents (100+ pages)
- Poll the results endpoint periodically
- If the job stays in
processingfor over 15 minutes, contact support with therecord_id