API Keys
All API requests require authentication via a Bearer token. You can obtain your API key from the docstrange.nanonets.com dashboard (top-right menu after signing in).
Keep your API key secret. Do not commit it to version control or expose it in client-side code. Use environment variables or a secrets manager.
Include your API key in the Authorization header on every request:
Authorization: Bearer YOUR_API_KEY
curl -X POST "https://extraction-api.nanonets.com/api/v1/extract/sync" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "output_format=markdown"
Rate Limits
Rate limits depend on your plan:
| Plan | Limit |
|---|
| Free | 20 pages/min |
| Pay as you go | 300 pages/min |
| Enterprise | 100 pages/sec |
Additional constraints:
- Sync processing: Recommended for documents under 5 pages
- Async processing: Recommended for larger documents (>5 pages)
- Batch processing: Maximum 50 files per request
If you hit rate limits frequently, consider using async or batch endpoints to process documents more efficiently.
Auth Error Responses
| Status Code | Meaning | What to Do |
|---|
401 | Invalid or missing API key | Check that your Authorization header is correct |
403 | Access denied | Verify your key has access to the requested resource |
429 | Rate limit exceeded | Wait and retry, or upgrade your plan for higher limits |
Example error response:
{
"detail": "Invalid or expired API key"
}