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

# Rate limits

> Request rate, concurrency, key IP allowlists and payload limits enforced by the gateway.

## Request rate and concurrency

Every live call (`POST /v1/chat/completions`, `/v1/responses` and `/v1/embeddings`, and the console playground) counts against two limits:

| Limit | Default | Scope |
| - | - | - |
| Calls per minute | 120 | The whole workspace: every member and every key share it |
| Concurrent calls | 5 | The whole workspace: calls that have started and not yet finished |

The minute is a fixed calendar minute. The platform operator can set different limits for your workspace. Within them, an administrator can set a lower limit for one person, and you can set a lower limit for one key under **API Keys → Settings**. A person's or a key's limit never exceeds the workspace's. The limits that apply to you are shown on the **API Keys** page.

Both refusals happen before anything is reserved or sent to the model provider, so nothing is charged and the call can be retried:

```json theme={null}
{ "error": { "code": "rate_limited" }, "request_id": "2f6c1d0e9a" }
```

| Status | Code | Retry |
| - | - | - |
| `429` | `rate_limited` | `Retry-After` gives the seconds until the current minute ends. |
| `429` | `concurrency_limited` | `Retry-After: 1`. Retry once one of your calls has finished. |
| `429` | `upstream_rate_limited` | The model provider refused the call for your account's rate limit before processing it. The reservation was released in full and nothing was charged. `Retry-After: 1`. |

> [!WARNING]
>
> Chat completions are not idempotent. Only the three `429` codes above are confirmed refusals. A `5xx`, timeout or incomplete stream does not prove zero cost: check the error code and disable automatic SDK retries. See [Errors](https://omnirelay.ai/docs/general/errors.md).

## Key IP allowlist

A key can be limited to the source addresses it may be used from: under **API Keys → Settings**, list up to 20 IPv4 or IPv6 addresses or CIDR ranges, one per line. A call from any other address returns `403 ip_not_allowed` and is not charged. An empty list allows any source. The allowlist applies to API calls (`/v1`), not to the console playground.

Each call's source address is recorded with the call and kept for 90 days; it appears in the request list and CSV export when that list is enabled for your account.

## Payload size

| Limit | Current rule |
| - | - |
| Request body (`/v1/chat/completions`, `/v1/responses`, `/v1/embeddings`) | At most 4 MiB (4,194,304 bytes of UTF-8); larger bodies return `413 payload_too_large`. |
| Messages or Responses input items | 1–2,000; invalid counts return `400 invalid_parameter`. |
| Each text value (message content, text part, tool result, tool-call arguments in history) | At most 1,048,576 characters; longer values return `400 invalid_parameter`. |
| Embeddings | At most 128 inputs of 65,536 characters each, within 262,144 bytes, and the model's own input limit. |
| Output tokens | Read the selected model’s `limits.output_tokens` and `limits.default_output_tokens`. |

These limits are sized for agent histories with many tool turns. The model's context window is still the real limit: a request whose input does not fit returns `400 context_length_exceeded`. A larger request also reserves a larger maximum charge before dispatch (it is settled at actual usage), so the wallet must cover that hold. For long generations, use `stream: true`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.