Skip to content

Rate Limits

Rate limits are configured per API key by your administrator. There are two independent limits:

  • Per-minute limit — the number of requests allowed in any rolling 60-second window
  • Per-day limit — the total number of requests allowed in a calendar day

Both limits are enforced independently. Exceeding either one will result in a 429 response.

Every API response includes headers showing your current usage:

HeaderDescription
X-RateLimit-LimitYour per-minute request limit
X-RateLimit-RemainingRequests remaining this minute
X-RateLimit-Daily-LimitYour per-day request limit
X-RateLimit-Daily-RemainingRequests remaining today

Example:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
X-RateLimit-Daily-Limit: 10000
X-RateLimit-Daily-Remaining: 8763

When a limit is exceeded, you receive a 429 Too Many Requests response:

{
"error": "Too many requests. Please wait and try again."
}

Or for daily limits:

{
"error": "Daily request limit reached. Please try again tomorrow."
}

The response always includes a Retry-After header:

Retry-After: 30

This is the number of seconds to wait before retrying.

Check headers proactively — Don’t wait for a 429. Monitor X-RateLimit-Remaining and slow down before hitting the limit.

Implement retry logic — For 429 responses, wait for the Retry-After duration before retrying.

Batch when possible — If your workflow allows it, space out requests rather than sending them all at once.

Example: proactive rate limit check

async function callAPI(inputs) {
const response = await fetch(`${BASE_URL}/api/${PRODUCT_SLUG}`, {
method: 'POST',
headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ inputs }),
})
const remaining = parseInt(response.headers.get('X-RateLimit-Remaining') || '0')
if (remaining < 5) {
console.warn(`Rate limit low: only ${remaining} requests remaining this minute`)
}
if (response.status === 429) {
const retryAfter = parseInt(response.headers.get('Retry-After') || '60')
console.log(`Rate limited. Waiting ${retryAfter} seconds...`)
await new Promise(resolve => setTimeout(resolve, retryAfter * 1000))
return callAPI(inputs) // retry once
}
return response.json()
}

Rate limits are set per key by your administrator. If your current limits are too restrictive for your use case, contact your administrator to have them increased.