Rate Limits
DOS AI enforces rate limits to ensure fair usage and platform stability for all users.
Default Limits
Requests per minute
60
Window type
Sliding window (60 seconds)
The rate limiter uses a sliding window algorithm. This means the limit is calculated over a rolling 60-second period, not fixed calendar minutes.
Rate Limit Headers
Every API response includes headers that report your current rate limit status:
X-RateLimit-Limit
Maximum requests allowed in the current window
X-RateLimit-Remaining
Requests remaining in the current window
Example Response Headers
HTTP/1.1 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
Content-Type: application/jsonUse these headers to proactively manage your request rate and avoid hitting the limit.
What Happens When You Hit the Limit
When you exceed the rate limit, the API returns a 429 Too Many Requests response:
The request is not processed and no credits are charged.
Handling 429 Errors
Exponential Backoff
The recommended strategy is exponential backoff with jitter. This progressively increases wait time between retries and adds randomness to prevent thundering herd problems.
Python Example
Node.js Example
Proactive Rate Management
Use the rate limit headers to throttle requests before hitting the limit:
Tips for Staying Within Limits
Batch your work -- Pace requests evenly rather than sending them all at once.
Use streaming -- Streaming responses (
stream: true) count as a single request regardless of response length.Cache responses -- Avoid making the same API call repeatedly.
Monitor usage -- Check
X-RateLimit-Remainingheaders and slow down as you approach the limit.Use fewer, larger requests -- One comprehensive prompt is better than multiple small ones.
Enterprise Custom Limits
For organizations with high-volume needs, we offer custom limits:
Higher request-per-minute caps based on your workload
Burst allowances for predictable traffic spikes
Dedicated capacity with guaranteed throughput
Contact support@dos.ai to discuss custom rate limits for your organization.
Last updated