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

# Rate Limits

> API rate limiting

## Headers

Limits depend on your plan. Every response tells you where you stand:

```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

> [card] [Authentication](/docs/api-reference/authentication.md)
>
> API authentication

> [card] [Errors](/docs/api-reference/errors.md)
>
> Error handling


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.