Skip to main content

Rate Limit Overview

API requests are rate limited to ensure fair usage and system stability.

Current Limits

Per API Key

Limit TypeValue
Requests per minute60
Requests per hour1000
Requests per day10000
Concurrent requests10
Limits may vary based on your plan. Contact support for higher limits.

Rate Limit Headers

Every API response includes rate limit information:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1642262400
HeaderDescription
X-RateLimit-LimitMaximum requests in current window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when limit resets

Handling Rate Limits

Check Headers

const response = await fetch(url, options);

const limit = response.headers.get('X-RateLimit-Limit');
const remaining = response.headers.get('X-RateLimit-Remaining');
const reset = response.headers.get('X-RateLimit-Reset');

console.log(`${remaining}/${limit} requests remaining`);
console.log(`Resets at ${new Date(reset * 1000)}`);

Implement Backoff

async function apiRequestWithBackoff(url, options) {
  const response = await fetch(url, options);
  
  if (response.status === 429) {
    const reset = response.headers.get('X-RateLimit-Reset');
    const waitTime = (reset * 1000) - Date.now();
    
    console.log(`Rate limited. Waiting ${waitTime}ms`);
    await sleep(waitTime);
    
    return apiRequestWithBackoff(url, options);
  }
  
  return response;
}

Optimize Requests

Best Practices:
  • Cache responses when possible
  • Batch requests where supported
  • Use webhooks instead of polling
  • Implement request queuing
  • Monitor usage regularly

Storage Quotas

Per User

ResourceLimit
Total storage100 GB (varies by plan)
Max file size500 MB
ProjectsUnlimited
Memories per projectUnlimited
API keys per project10

Burst Limits

Brief bursts above the per-minute limit are allowed, as long as you stay within the hourly limit.

Rate Limit Exceeded Response

{
  "success": false,
  "message": "Rate limit exceeded. Retry after 30 seconds.",
  "code": "RATE_LIMIT_EXCEEDED",
  "retry_after": 30
}

Requesting Higher Limits

Need higher limits? Contact support with:
  • Current usage patterns
  • Expected future usage
  • Use case description
  • Business justification

Monitoring Usage

Track your API usage:
  • Monitor rate limit headers
  • Log request counts
  • Set up alerts for approaching limits
  • Review usage trends regularly

Next Steps