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

# Rate Limits

> Understand Caspen rate limiting and throttle headers

## Overview

Caspen applies a single throttle: **60 requests per minute for each API key**. The throttle window starts when you make the first request and resets 60 seconds later, at which point the allowance refills to 60 calls.

## Current limit

| Limit type | Requests | Window     | Scope       |
| ---------- | -------- | ---------- | ----------- |
| Standard   | 60       | 60 seconds | Per API key |

## Reset behavior

When you send a request, the counter tracks how many calls you have made in the last 60 seconds. Once a call becomes older than 60 seconds, it no longer counts against the quota. There is no separate daily or monthly limit.

## Response headers

Every response includes throttling headers so you can monitor usage:

```http theme={null}
HTTP/1.1 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 1
```

| Header                  | Description                                                         |
| ----------------------- | ------------------------------------------------------------------- |
| `X-RateLimit-Limit`     | Maximum requests allowed in the rolling window (always 60).         |
| `X-RateLimit-Remaining` | Remaining requests before you hit the limit.                        |
| `Retry-After`           | Seconds to wait before retrying. Only present when you are limited. |
| `X-RateLimit-Reset`     | Unix timestamp for when the current window resets.                  |

## When you exceed the limit

If you send more than 60 requests within 60 seconds, Caspen returns `429 Too Many Requests` with a short error body and backoff headers.

```http theme={null}
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
Retry-After: 32
X-RateLimit-Reset: 1758868775
Content-Type: application/json

{"message":"Too Many Attempts."}
```

Wait for the number of seconds indicated in `Retry-After` or until the time reported in `X-RateLimit-Reset` before sending the next request.
