Rate Limiting
The Verts API implements rate limiting to ensure fair usage and protect the service from abuse.
Rate Limits
Standard Limits
| Endpoint Type | Requests per Minute | Burst |
|---|---|---|
| Authentication | 10 | 5 |
| API Operations | 100 | 20 |
| File Uploads | 30 | 10 |
Rate Limit Headers
Every API response includes rate limit information in the headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000
X-RateLimit-Limit- Maximum requests per minuteX-RateLimit-Remaining- Requests remaining in current windowX-RateLimit-Reset- Unix timestamp when the limit resets
Handling Rate Limits
When you exceed the rate limit, the API returns a 429 Too Many Requests response:
{
"type": "https://api.verts.dev/errors/rate-limit-exceeded",
"title": "Rate Limit Exceeded",
"status": 429,
"detail": "Too many requests. Please wait before retrying.",
"retry_after": 30
}
Retry Strategy
- Check the
Retry-Afterheader - Wait the specified number of seconds before retrying - Implement exponential backoff - If no
Retry-Afterheader, start with 1 second and double each retry - Set a maximum retry limit - Don't retry indefinitely
Example Implementation
async function makeRequest(url: string, options: RequestInit): Promise<Response> {
const maxRetries = 3;
let retryCount = 0;
while (retryCount < maxRetries) {
const response = await fetch(url, options);
if (response.status !== 429) {
return response;
}
const retryAfter = response.headers.get('Retry-After');
const delay = retryAfter ? parseInt(retryAfter) * 1000 : Math.pow(2, retryCount) * 1000;
await new Promise(resolve => setTimeout(resolve, delay));
retryCount++;
}
throw new Error('Max retries exceeded');
}
Best Practices
Optimize Your Requests
- Cache responses - Don't request the same data repeatedly
- Use batch operations - Some endpoints support batch processing
- Request only what you need - Use pagination and filtering
Monitor Your Usage
- Track rate limit headers - Monitor your remaining requests
- Set up alerts - Get notified when approaching limits
- Log rate limit errors - Debug issues quickly
Plan for Scale
If you need higher rate limits for your use case, contact support to discuss enterprise options.
Related Endpoints
- Account - Check your account status
- Health Check - Verify API availability