# Rate limits and usage

Budget requests across keys and the whole account.

Limits apply per key and per account. Creating more keys does not bypass the account limit. The console's usage view shows effective request limits and usage by key and model.

The gateway defaults to 300 requests per minute per key (5 per second on average) and 600 per minute per account, counted in one-minute windows. These are operator-configurable defaults, not a production entitlement. Check your console for the values assigned to your account.

## Headers

Every `/v1/decide` response that reached the limiter carries:

| Header | Meaning |
| --- | --- |
| `X-RateLimit-Limit` | Requests allowed in the current window by the tightest limit (key or account) |
| `X-RateLimit-Remaining` | Requests left in that window |
| `X-RateLimit-Reset` | Seconds until that window resets |

## When limited

A `429` response adds `Retry-After` (whole seconds) and `retry-after-ms` (milliseconds). Wait at least that delay before retrying. The SDKs prefer `retry-after-ms`, otherwise accept seconds or an HTTP date, and wait the full delay up to 60 seconds. For a longer delay they do not retry; they raise a rate-limit error that carries the requested delay.

A request that can never succeed (malformed, invalid or oversized) gets its real error, never `429`, and does not count against the limit.

Keep concurrency bounded and share a queue across workers using the same key. Backoff alone cannot make an oversized workload fit a fixed limit. Ask Secnd for a limit review before a planned traffic increase.

## Measure usage

Successful decisions return input-token usage and `output_tokens: 0`. Dashboard usage groups requests and input tokens by key and resolved model. The configured per-million input-token price supports an estimated usage cost; there is no billing-provider integration in this beta contract.

Request retries can add requests and token usage. Keep billing, request logs, and the downstream business action separate: a retried decision must not issue the same refund twice.
