Rate Limit Tiers
Your plan determines the number of requests your key can make per minute. Burst allowance lets you briefly exceed the per-minute limit to absorb short traffic spikes.Rate Limit Response Headers
Every API response includes the following headers so you can monitor your consumption in real time and throttle proactively:Handling a 429 Response
When you exceed your rate limit, Chevre returns a429 Too Many Requests response. The response includes a Retry-After header indicating how many seconds to wait before retrying, and the body provides the same value in the retry_after field.
Best Practices
Follow these practices to build integrations that stay well within limits and recover gracefully when they don’t:- Monitor
X-RateLimit-Remainingproactively. When the remaining count drops below a threshold that matters for your workload, introduce a small delay before the next request rather than waiting for a 429. - Implement exponential backoff on 429 responses. Don’t retry immediately — wait for the
Retry-Afterduration, and increase the wait time with each successive failure. - Cache responses where possible. If multiple parts of your application need the same data, fetch it once and share the cached result rather than making redundant API calls.
- Use bulk endpoints when available. Several Chevre endpoints accept arrays of resources in a single request. Batching operations reduces the total number of requests you make.
Exponential Backoff Example
The following example retries a failed request with exponential backoff, reading theRetry-After header to respect the server-specified wait time before applying the multiplier:
exponential-backoff.js
Enterprise customers can request a custom rate limit increase to accommodate high-volume workloads. Reach out to support@chevre.io with your use case and expected request volume.