Resources / Rate limits
Rate limits
DocMind absorbs bursts with a queue and dispatches work under a strict upstream ceiling, so you rarely have to throttle yourself.
The queue model
Extraction runs against an upstream engine with a hard ceiling of 50 requests/second. Rather than push that limit onto you, POST /v1/extract simply enqueues a job and returns 202. A background worker drains the queue under the ceiling using a distributed token bucket, so you can submit large bursts without being throttled on submission.
Submit freely, read patientlySend extractions as fast as you like — they’ll be accepted and processed in order. Use webhooks (or poll with backoff) to collect results as they complete.
Fair-share across organizations
Capacity under the ceiling is fair-shared so no single tenant can starve others:
- A global token bucket enforces the upstream 50 req/s ceiling.
- A per-organization bucket guarantees your share of throughput regardless of platform load.
- Workers wait for both buckets before each call, smoothing spikes automatically.
Handling 429s
Management endpoints (templates, keys, billing) may return 429 with the rate_limited code under heavy use. Retry with exponential backoff and jitter.
429 Too Many Requests
HTTP/1.1 429 Too Many Requests
{
"error": {
"code": "rate_limited",
"message": "rate limit exceeded"
}
}