Rate Limits
Understanding rate limits helps you build reliable applications that work within INK's usage guidelines.
Overview
Rate limits protect the API from abuse and ensure fair usage across all users. Limits are applied per API key and vary by plan.
Rate Limit Tiers
| Plan | Requests/Minute | Requests/Day | Tokens/Month | |------|-----------------|--------------|--------------| | Free | 10 | 100 | 10,000 | | Individual | 60 | 1,000 | 50,000 | | Business Pro | 300 | 10,000 | Unlimited | | Enterprise | Custom | Custom | Custom |
Response Headers
Rate limit information is included in response headers:
| Header | Description |
|--------|-------------|
| X-RateLimit-Limit | Maximum requests allowed |
| X-RateLimit-Remaining | Requests remaining |
| X-RateLimit-Reset | Unix timestamp when limit resets |
Handling Rate Limits
When you exceed rate limits, you'll receive a 429 Too Many Requests response:
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after 60 seconds.",
"retryAfter": 60
}
}
Best Practices
Implement Exponential Backoff
async function makeRequestWithRetry(fn, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn()
} catch (error) {
if (error.status === 429) {
const delay = Math.pow(2, i) * 1000
await new Promise(r => setTimeout(r, delay))
} else {
throw error
}
}
}
}
Cache Responses
Reduce API calls by caching responses when appropriate:
- Cache template lists
- Store generated content locally
- Use ETags for conditional requests
Monitor Usage
Track your usage through the dashboard to avoid unexpected limits:
- Set up usage alerts
- Review daily consumption patterns
- Plan for peak usage periods
Requesting Higher Limits
If you need higher rate limits:
- Review your current plan options
- Contact sales for Enterprise pricing
- Optimize your API usage patterns
Next Steps
- Learn about Authentication
- Explore the API Overview
- Contact Support for custom limits