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

# Rate Limit

> Learn how AutoSend rate limits work, including sending thresholds and API limits

API keys are subject to the following rate limits:

<Info>**2 requests per second** per API key. This is a default limit and can be increased upon request.</Info>

When you exceed the rate limit, you'll receive a `429 Too Many Requests` response with a `retryAfter` field indicating how many seconds to wait.

### Rate Limit Headers

Each API response includes rate limit information:

```
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 115
X-RateLimit-Reset: 1696075200
```

### Handling Rate Limits

To prevent overwhelming the API, you should implement exponential backoff when receiving `429` errors:

```javascript theme={null}
async function sendEmailWithRetry(data, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      const response = await sendEmail(data);
      return response;
    } catch (error) {
      if (error.status === 429 && i < maxRetries - 1) {
        const waitTime = Math.pow(2, i) * 1000; // Exponential backoff
        await new Promise((resolve) => setTimeout(resolve, waitTime));
      } else {
        throw error;
      }
    }
  }
}
```
