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

# Rate Limits

> How requests are throttled per API key.

Each API key gets its own sliding-window rate limit of **120 requests per
minute**. The window is keyed on the API key ID — one key's traffic doesn't
eat into another's.

## Headers

Every response (including 429s) includes standard rate-limit headers:

```http theme={null}
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1713715260
```

`X-RateLimit-Reset` is a Unix epoch second telling you when the current window
closes.

## When you hit the limit

```json theme={null}
{
  "success": false,
  "code": "RATE_LIMITED",
  "error": "Too many requests. Please try again after 2026-04-21T15:27:40.000Z"
}
```

Back off and retry — ideally with jitter. A short `Retry-After`-friendly
implementation:

```javascript theme={null}
async function call(url, key) {
  for (let attempt = 0; attempt < 5; attempt++) {
    const res = await fetch(url, {
      headers: { Authorization: `Bearer ${key}` },
    });
    if (res.status !== 429) return res;
    const reset = Number(res.headers.get("X-RateLimit-Reset"));
    const waitMs = Math.max(1000, reset * 1000 - Date.now());
    await new Promise((r) => setTimeout(r, waitMs));
  }
  throw new Error("rate limit exhausted");
}
```

## Need more throughput?

Split traffic across multiple keys (each with its own 120/min budget), or
[reach out](https://autoprintfarm.com) and tell us what you're building.
