> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boostgpt.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate Limits

> API rate limiting

## Limits by Plan

| Plan        | Requests/Minute |
| ----------- | --------------- |
| **Free**    | 20              |
| **Starter** | 60              |
| **Pro**     | 200             |
| **Scale**   | Custom          |

## Headers

Rate limit info is returned in response headers:

```bash theme={null}
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1704470400
```

## Handling Rate Limits

### Check Headers

```javascript theme={null}
const response = await fetch('https://api.boostgpt.co/v1/bots', {
  headers: { 'Authorization': `Bearer ${apiKey}` }
});

const remaining = response.headers.get('X-RateLimit-Remaining');
console.log(`Requests remaining: ${remaining}`);
```

### Exponential Backoff

```javascript theme={null}
async function makeRequestWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, options);

    if (response.status === 429) {
      const wait = Math.pow(2, i) * 1000;
      await new Promise(resolve => setTimeout(resolve, wait));
      continue;
    }

    return response;
  }
  throw new Error('Max retries exceeded');
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="lock" href="/api-reference/authentication">
    API authentication
  </Card>

  <Card title="Errors" icon="circle-alert" href="/api-reference/errors">
    Error handling
  </Card>
</CardGroup>
