Skip to main content

HTTP Status Codes

CodeMeaningDescription
200OKSynchronous extraction completed successfully
202AcceptedAsync/batch job queued for processing
400Bad RequestInvalid input — missing required fields, unsupported format
401UnauthorizedInvalid or missing API key
403ForbiddenAccess denied to the requested resource
404Not FoundRecord ID does not exist or does not belong to you
422Validation ErrorRequest body failed validation (see detail for specifics)
429Rate LimitedToo many requests — wait and retry
500Internal Server ErrorUnexpected error — contact support if persistent

Error Response Format

All error responses follow this structure:
{
  "detail": "Human-readable error message"
}
For validation errors (422), the response includes field-level details:
{
  "detail": [
    {
      "loc": ["body", "output_format"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}

Rate Limit Errors

When you exceed your rate limit, the API returns a 429 status code:
{
  "detail": "Daily rate limit exceeded. Please try again tomorrow or contact support for higher limits."
}
To handle rate limits gracefully, implement exponential backoff: wait 1 second, then 2, then 4, etc. For sustained high-volume use, consider upgrading to a higher-tier plan.

Rate Limits by Plan

PlanLimit
Free20 pages/min
Pay as you go300 pages/min
Enterprise100 pages/sec

Common Errors and Solutions

Cause: The Authorization header is missing, malformed, or contains an expired key.Solution:
  1. Verify the header format is exactly Authorization: Bearer YOUR_API_KEY
  2. Check that there are no extra spaces or newlines in the key
  3. Regenerate your API key from docstrange.nanonets.com if needed
Cause: The request did not include any of file, file_url, or file_base64.Solution: Provide exactly one input method:
-F "file=@document.pdf"        # file upload
-F "file_url=https://..."      # URL
-F "file_base64=SGVsbG8..."    # base64
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.
Cause: The output_format field is missing from the request.Solution: Always include the output_format parameter:
-F "output_format=markdown"
Valid values: markdown, html, json, csv (or comma-separated combinations).
Cause: Large documents may take longer to process, or the job may have failed silently.Solution:
  1. Wait at least 5 minutes for large documents (100+ pages)
  2. Poll the results endpoint periodically
  3. If the job stays in processing for over 15 minutes, contact support with the record_id
If you receive persistent 500 errors, please reach out to info@nanonets.com with the request details and any record_id values.