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

# Rate Limits

> Per-org RPM bucket, optional per-key ceilings, opt-in burst, and a separate dollar spend cap.

The HASP AI API enforces rate limits at the org level, with an optional per-key ceiling on top. A separate dollar spend cap protects your bill and is unrelated to rate limiting — see [Spend cap](#spend-cap-budget) below.

## Per-org RPM bucket

The primary rate limit is a **per-org bucket**, shared by every API key in the org. It is sized by your **API tier**:

| Limiter                                                            | Developer | Growth  | Scale     | Enterprise          |
| ------------------------------------------------------------------ | --------- | ------- | --------- | ------------------- |
| Requests per minute (`ai:chat`, `ai:messages`, `chat/completions`) | 60 RPM    | 500 RPM | 2,000 RPM | 5,000 RPM (default) |
| Daily requests                                                     | 5,000     | 50,000  | 500,000   | 2,000,000 (default) |

All keys in the org draw from the same bucket — issuing more keys does not increase your RPM.

Enterprise limits are negotiated per contract; the figures above are the enforced default until a custom value is contracted for your org.

## Per-key ceilings (optional)

Admins on Growth, Scale, or Enterprise (or Business+ on the Platform ladder) can set a per-key RPM/TPM ceiling in **Developers → Keys → Rate caps**. A per-key ceiling can only tighten the bucket for that key — it cannot exceed the org bucket.

## Burst

Org admins can opt into burst mode. When enabled, requests above the tier RPM pass through at standard rate (no premium markup, normal credit/op billing) up to a defensive **5× tier RPM** ceiling, which still throttles. Burst is off by default.

## Response headers

Every response includes:

```
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 47
```

On a throttled (429) response, two more headers are added:

```
Retry-After: 12
X-RateLimit-Reset: 1746374520
```

`Retry-After` is in seconds; `X-RateLimit-Reset` is a Unix timestamp (seconds).

## 429 response

When a limit is hit, the response is:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "RATE_LIMITED",
    "type": "rate_limited",
    "message": "Too many requests. See Retry-After header.",
    "retryable": true
  }
}
```

## Spend cap (budget)

A dollar spend cap is a separate limit from RPM — it protects against overspending across a billing cycle, not against burst traffic. When the cap is reached, requests return `402 AI_CREDITS_EXHAUSTED`:

```json theme={null}
{
  "error": {
    "code": "AI_CREDITS_EXHAUSTED",
    "type": "payment_required",
    "details": {
      "cycle_reset_at": "2026-06-01T00:00:00Z"
    }
  }
}
```

Spend caps are configured in **Settings → Billing → Spend Cap**, or via the API — see [Budget](/ai-api/control/budget).

## API tier entry point

The API ladder starts at the **Developer** tier — there is no Starter or free API tier. New accounts get a **30-day / 50,000 credit** free evaluation that covers both the Platform and AI API. After evaluation, a Developer or higher plan is required for continued AI API access.
