Rate Limits
The NetraOCR API applies per-route rate limits to keep the platform fast and fair for everyone. Limits are tuned per endpoint — sensitive and expensive operations (uploads, auth) are limited more tightly than simple reads.
When you're limited
Exceeding a route's limit returns:
HTTP/1.1 429 Too Many Requests
{ "detail": "Rate limit exceeded" }
Handling 429
Back off and retry with exponential backoff and jitter:
import time, random, requests
def call_with_backoff(fn, max_retries=5):
for attempt in range(max_retries):
resp = fn()
if resp.status_code != 429:
return resp
sleep = min(2 ** attempt, 30) + random.random()
time.sleep(sleep)
return resp # still limited after retries
Best practices
- Spread out bulk work. For many documents, prefer
/ocr/bulk-uploadover firing many single uploads in a tight loop. - Cache reads. Don't poll job status more often than you need — every 2–5s with backoff is plenty.
- Use one key per workload so you can reason about throughput and revoke independently.
- Coalesce retries. On
429or5xx, retry the same request rather than re-submitting new uploads, to avoid duplicate jobs and charges.
Need higher limits?
If your integration needs more throughput than the default limits allow, reach out through the console to discuss your use case.
See Errors for the full status-code reference.