Rate Limits
The Crane Ledger REST API applies rate limits to ensure fair usage and system stability. This page describes the limits, how they are communicated in responses, and how to handle rate limit errors.
Limits by Key Type
| Key Type | Requests per minute | Notes |
|---|---|---|
Live keys (cl_live_) | 1000 | Production traffic |
Test keys (cl_test_) | 100 | Development and testing |
Limits are applied per API key. Additional organization-level or global limits may apply.
Rate Limit Headers
Responses include headers that describe the current rate limit state:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Example:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1640995200
Use these headers to throttle your client or show usage in a dashboard. When X-RateLimit-Remaining is low, slow down or wait until X-RateLimit-Reset before sending more requests.
Rate Limit Exceeded (429)
When you exceed the rate limit, the API returns 429 Too Many Requests with a JSON body:
{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "API rate limit exceeded. Try again later.",
"retry_after": 60,
"status": 429
}
}
The retry_after value is the suggested number of seconds to wait before retrying. The response may also include a Retry-After HTTP header with the same or similar value.
Retry Strategies
Exponential Backoff
When you receive a 429, wait and retry with increasing delay:
Best Practices
- Honor
retry_after– Use the value in the error body orRetry-Afterheader before retrying. - Use exponential backoff – For repeated 429s, increase wait time (e.g. 1s, 2s, 4s) instead of fixed intervals.
- Throttle proactively – Track
X-RateLimit-Remainingand slow down before hitting the limit. - Batch when possible – Reduce request count by using bulk or list endpoints instead of many single-resource calls.
- Use multiple keys only when appropriate – Creating many keys to bypass limits is not allowed; use a single key per environment and throttle client-side.
Credits vs Rate Limits
Crane Ledger uses both rate limits (requests per minute) and a credit system (cost per operation). You can be under the rate limit but still get a 402 Payment Required or credit-related error if your organization has insufficient credits. Monitor both:
- Rate limits – Use
X-RateLimit-*headers and 429 responses. - Credits – Use the Dashboard or billing endpoint to track balance.
Burst traffic
If you need to send a short burst of many requests, spread them over time or use background jobs so you stay within the per-minute limit and avoid 429s.
Need help?
Create a free account to access our support portal. Once signed in, use the Support tab in your dashboard to submit a support ticket — our team typically responds within 24 hours.
- ✨ For LLMs/AI assistants: Read our structured API reference