# Rate Limits

> Understand ScaleMax RPM limits, concurrency, Retry-After behavior, reserved balance checks, and safe retry handling.

Rate limits on ScaleMax are applied **per API key**. Your API key may include request or token limits. If you need higher limits, contact [ScaleMax support](https://docs.scalemax.pro/docs/support).

## What gets limited

- **Requests per minute (RPM).** Total number of requests, streaming or not.

## Headers

Every response carries rate-limit info:

| Header | Meaning |
| --- | --- |
| `X-RateLimit-Limit-Requests` | Configured RPM cap. |
| `X-RateLimit-Remaining-Requests` | Remaining requests in the current window. |
| `X-RateLimit-Reset-Requests` | Seconds until the current request window resets, written with an `s` suffix (for example, `27s`). |
| `X-RateLimit-Remaining-Tokens` | Remaining prepaid token allowance (token-mode keys only). This is a balance, not a per-minute window. |

The same remaining allowance is readable outside a request through the [Usage Checker](https://docs.scalemax.pro/docs/usage-checker).

## When you hit a limit

The API returns `429` with one of two codes (see [Error Codes](https://docs.scalemax.pro/docs/error-codes)):

- `rate_limit_exceeded` — requests-per-minute limit. Retry after the window resets.

## Recommended client behavior

1. Read the rate-limit headers on every response.
2. When `Remaining` drops below 10%, slow down proactively — don't wait for a 429.
3. Retry 429s with exponential backoff + jitter. Honor `Retry-After` if present.
4. If you need consistent high throughput, contact [ScaleMax support](https://docs.scalemax.pro/docs/support) for a higher quota. Bulk workloads can be split across multiple keys.

## Burst behavior

Short bursts above the per-minute average are tolerated up to a configurable cap, then the gateway starts shedding load with 429s. Plan for your steady-state rate, not your peak.
