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

# Rate limits

> RPM / TPM limits, concurrency ceilings and handling 429

OpenPAI applies multi-dimensional rate limits per user / token / model at the gateway, ensuring stability and fair use.

## Limit dimensions

| Dimension                 | Meaning                                                          |
| ------------------------- | ---------------------------------------------------------------- |
| RPM (Requests Per Minute) | Maximum requests per minute                                      |
| TPM (Tokens Per Minute)   | Maximum tokens per minute (prompt + completion)                  |
| Concurrency               | The maximum number of outstanding requests at one time           |
| Daily quota (optional)    | Maximum daily spend (optionally enabled for enterprise accounts) |

## Default limits

Different **user groups** have different ceilings; a common configuration:

| Group        | RPM        | TPM        | Concurrency |
| ------------ | ---------- | ---------- | ----------- |
| `default`    | 200        | 200,000    | 16          |
| `vip`        | 1,000      | 1,000,000  | 64          |
| `svip`       | 5,000      | 5,000,000  | 256         |
| `enterprise` | Negotiated | Negotiated | Negotiated  |

The live limits shown in Console → **account home** are authoritative.

## Response headers

Every API response carries:

| Header                           | Meaning                        |
| -------------------------------- | ------------------------------ |
| `X-RateLimit-Limit-Requests`     | Current RPM ceiling            |
| `X-RateLimit-Remaining-Requests` | Requests remaining this minute |
| `X-RateLimit-Reset-Requests`     | Seconds until reset            |
| `X-RateLimit-Limit-Tokens`       | Current TPM ceiling            |
| `X-RateLimit-Remaining-Tokens`   | Tokens remaining this minute   |
| `X-RateLimit-Reset-Tokens`       | Seconds until reset            |

The client can use these for intelligent throttling.

## Hitting the limit

When you exceed the ceiling, you get `429 rate_limit_exceeded`:

```json theme={null}
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit reached. Please retry after 12 seconds."
  }
}
```

The `Retry-After: 12` header gives the suggested retry time.

## Recommended handling

<CardGroup cols={2}>
  <Card title="Exponential backoff" icon="rotate-right">
    1s → 2s → 4s → 8s → 16s, capped at 30s.
  </Card>

  <Card title="Client-side throttling" icon="gauge-high">
    Maintain a leaky / token bucket locally to control QPS proactively.
  </Card>

  <Card title="Batching" icon="layer-group">
    Merge short messages into one request to reduce RPM pressure.
  </Card>

  <Card title="Prompt caching" icon="database">
    Route repeated prefixes through the cache to lower actual TPM usage.
  </Card>
</CardGroup>

## Raising the limits

If your workload genuinely needs more, you can increase limits by:

* **Topping up to VIP / SVIP**: automatically gets more generous quotas.
* **Enterprise custom quota**: apply for dedicated RPM / TPM / concurrency via the business channel.
* **Dedicated channels**: bind an isolated upstream account to specific models for capacity isolation.

Submit the request in the console.
