Rate Limits
AstroAPI enforces rate limits to ensure fair usage and platform stability.
Default Limits
Rate limits are determined by your subscription plan:
| Subscription | Requests/minute | Requests/month |
|---|---|---|
| Basic | 60 | 150,000 |
| Gold | 120 | 300,000 |
| Premium | 300 | 750,000 |
| Deluxe | 600 | 1,000,000 |
Your specific rate limits depend on your active subscription. Check the dashboard for your current limits.
Rate Limit Headers
All responses include rate limit information:
http
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 55
X-RateLimit-Reset: 1699999999Handling Rate Limits
When you exceed the rate limit, the API returns a 429 Too Many Requests response:
json
{
"errors": [{
"status": "429",
"title": "Too Many Requests",
"detail": "Rate limit exceeded. Please retry after 60 seconds."
}]
}Retry Strategy
Implement exponential backoff when receiving 429 responses:
typescript
async function fetchWithRetry(url: string, options: RequestInit, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
const response = await fetch(url, options);
if (response.status !== 429) {
return response;
}
const retryAfter = response.headers.get('Retry-After') || '60';
await new Promise(resolve =>
setTimeout(resolve, parseInt(retryAfter) * 1000)
);
}
throw new Error('Max retries exceeded');
}Endpoint-Specific Limits
Some endpoints have additional limits:
| Endpoint | Additional Limit |
|---|---|
/api/chart/* | 100 renders/hour |
/api/calc/batch | 10 batch requests/minute |
Increasing Limits
Contact support to discuss custom rate limits for your application.