Rate Limits

Understand and handle API rate limits

Fair usage

Rate limits keep the platform fair and stable for everyone. Every plan includes generous limits, and clients should handle 429s with automatic retries.

Plan limits

PlanPriceRequests/moTokens/moSeats
Free
$0100200K1
Starter
$15/mo1,0001.5M1
Pro
$49/mo8,00012M1
Team
$149/mo40,00060M5
Enterprise
CustomCustomCustomUnlimited
Free plan — no credit card required

Start immediately with 100 requests and 200K tokens per month. All 60+ models are available on every paid plan. Free/Starter/Pro are individual plans; Team/Enterprise are separate workspace plans for teams, not an upgrade path from Pro.

Rate limit headers

Every API response includes rate limit information:

HTTP
HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1701964800

Handling rate limits

Exponential Backoff Implementation
async function makeRequestWithRetry(url, options, maxRetries = 5) {
  let retries = 0;

  while (retries < maxRetries) {
    try {
      const response = await fetch(url, options);

      if (response.status === 429) {
        // Rate limit exceeded
        const waitTime = Math.min(
          Math.pow(2, retries) * 1000, // Exponential backoff
          60000 // Max 60 seconds
        );

        console.log(`Rate limited. Waiting ${waitTime}ms...`);
        await new Promise(resolve => setTimeout(resolve, waitTime));
        retries++;
        continue;
      }

      return response;
    } catch (error) {
      if (retries === maxRetries - 1) throw error;
      retries++;
    }
  }

  throw new Error('Max retries exceeded');
}

// Usage
const response = await makeRequestWithRetry(
  `${BASE_URL}/v1/chat/completions`,
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      model: 'gemini-2.5-flash',
      messages: [{ role: 'user', content: 'Hello!' }]
    })
  }
);
Best practices

Implement exponential backoff for retries · monitor rate limit headers proactively · cache responses when possible · batch requests where you can · contact support for higher limits