Rate Limits
To ensure fair usage and maintain the performance and reliability of our API, we have implemented a rate-limiting mechanism. This section provides an overview of the rate limits in place and how they affect API requests.
Rate Limit Policy
Our API rate limiter is designed to limit the number of requests that a client can make to our API within a specified time window. This is achieved through the following policy:
- Time Window: API-key requests are counted over the preceding 60 seconds. Each request admitted by the limiter stops counting exactly 60 seconds later; calendar-minute boundaries do not reset the allowance.
- Request Limit: Each organization is allowed up to 550 requests per minute by default. Your organization may have a custom allowance.
- Header Information: We use the IETF standard for rate limit headers. These headers provide information about the current rate limit status, such as the remaining requests and reset time.
- All API keys belonging to the same organization share one allowance. Creating or switching API keys does not reset it. This organization allowance applies to API-key requests; bearer-token requests retain their existing limits.
- Rejected requests do not consume allowance or extend the wait. Changing the organization’s limit preserves its recent usage.
- If Redis is unavailable, each backend instance temporarily enforces the rolling allowance using its own recent requests. The combined allowance across instances can be higher during an outage. Recent local usage is merged back into the shared history when Redis recovers.
Rate Limit Headers
When you make requests to our API, you will receive the following headers, indicating your current rate limit status:
- RateLimit-Policy: Describes the rate limit policy, including the quota and time window.
- Example:
"default";q=550;w=60(550 requests per 60 seconds)
- Example:
- RateLimit: Provides the remaining allowance and time until capacity is restored.
- Example:
"default";r=549;t=59(549 requests remaining, 59 seconds until the next request ages out). When blocked,tis the wait until enough requests age out to admit another call.
- Example:
Handling Rate Limit Responses
If you exceed the allowed number of requests within the time window, the API will respond with a 429 Too Many Requests status code. When this occurs, you should:
- Wait before retrying: After a 429, check the
tparameter in theRateLimitheader to determine how long to wait until another request can be admitted. - Implement Backoff Strategy: Implement a backoff strategy in your application to gracefully handle rate limit responses and retry requests after the reset time.
For copy/paste examples in Python and TypeScript, see Respecting Rate Limits.