Overview
To ensure fair usage and system stability, the API enforces rate limits. We implement a leaky bucket algorithm to limit the number of requests per second. The current rate limits are configured as follows:- Rate: 30 requests per second (You can make up to 30 requests per second on average)
- Burst: 60 requests (You have a burst capacity of 60 requests that can be used when needed)
- Period: 1 second (The rate limit window resets every 1 second)
Handling Rate Limits
If you encounter rate limit errors, implement exponential backoff in your client applications. This means:- When you receive a rate limit error, wait before retrying
- Gradually increase the wait time between retries
- Continue until the request succeeds or a maximum retry limit is reached
Example Rate Limit Response
When rate limited, the API will return an error response indicating the limit has been exceeded. The response includes detailed information about the rate limit status in theextensions field:
extensions.rateLimit object provides:
- requestRate: The current request rate (requests per time window)
- remaining: Number of requests remaining in the current window
- retryAfterMs: Milliseconds to wait before retrying the request
- resetAfterMs: Milliseconds until the rate limit window resets
Best Practices
- Cache requests: Cache frequently accessed requests to minimize the number of API requests
- Monitor usage: Track your API usage using the
extensions.rateLimitfield in API responses to stay within limits

