Skip to main content

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.

Bearer Token Format

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:
PlanLimit
Free20 pages/min
Pay as you go300 pages/min
Enterprise100 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 CodeMeaningWhat to Do
401Invalid or missing API keyCheck that your Authorization header is correct
403Access deniedVerify your key has access to the requested resource
429Rate limit exceededWait and retry, or upgrade your plan for higher limits
Example error response:
{
  "detail": "Invalid or expired API key"
}