Limits
Every number here is enforced in code. If you hit one, the error tells you which.
Request size
| Limit | Value | Error when exceeded |
|---|---|---|
| Request body | 4 MB | 413 request_too_large |
The cap covers the whole JSON body, so a long conversation history counts toward it, not just the newest message. If you are approaching it, trim older turns or summarise them rather than sending the full transcript each time.
Timeouts
| Limit | Value | Error when exceeded |
|---|---|---|
| Provider response | 180 seconds | 504 upstream_timeout |
This is how long Peris.ai Router waits for the provider before giving up. Streaming responses are not affected once the first token arrives; the clock applies to starting the response.
Sign-in and account limits
These protect accounts from guessing attacks. They apply to the console, not to
/v1.
| Action | Limit | What happens |
|---|---|---|
| Failed sign-ins | 10 per 15 minutes, per email and per IP | "Too many failed attempts. Try again in 15 minutes." |
| Sign-ups | 5 per hour, per IP | "Too many signups from this address. Try again later." (HTTP 429) |
| Invitation accepts | 10 per hour, per IP | HTTP 429 |
| First-run platform setup | 5 per hour, per IP | HTTP 429 |
Unknown emails take the same time to reject as wrong passwords, so the response time does not reveal whether an account exists.
API request rate
Three rate limits apply to /v1, all counted over a sliding one minute:
| Limit | Default | Set by | Error |
|---|---|---|---|
| Per key | 60 requests per minute, from the key's guardrail | Your workspace admin, in Guardrails | 429 rate_limited |
| Per account | None, unless ASIX sets one | ASIX, on your organization | 429 rate_limited |
| Unknown keys, per IP | 30 per 10 minutes | Peris.ai Router | 429 rate_limited |
A key with no guardrail gets the 60 per minute default. A guardrail can raise, lower or remove the key limit. The account limit, when ASIX sets one, is one ceiling over every key of your organization together, so fifty keys do not get fifty times the traffic. The unknown-key limit only counts requests whose key does not exist at all; a disabled, expired or rotated key never counts toward it.
Every /v1/chat/completions response carries the limit that is closest to
running out:
| Header | Meaning |
|---|---|
x-ratelimit-limit |
Requests allowed per minute |
x-ratelimit-remaining |
Requests left in the current minute |
x-ratelimit-reset |
Unix time when a slot frees up |
x-ratelimit-scope |
key or org: which limit the numbers describe |
Retry-After |
On a 429 only: seconds to wait |
A refused request is not billed. A request its key limit refuses does not count against the account limit.
Money bounds usage as well: every request is checked against three budgets before it runs.
| Check | Error | Meaning |
|---|---|---|
| Organization balance | 402 insufficient_credits |
Prepaid balance is at zero |
| Workspace limit | 402 workspace_budget_reached |
Workspace spent its allowance for the period |
| Key limit | 402 key_budget_reached |
This key spent its allowance for the period |
Budgets are checked before the request is sent, not after. A key whose remaining budget is smaller than the cost of a single request is refused outright rather than part way through, so a limit of 1 IDR blocks everything.
Periods reset at 00:00 Jakarta time (WIB, UTC+7) on the day, week or month boundary you chose, not at UTC midnight.
If a request is rate limited you will get 429 rate_limited; back off and
retry, honouring Retry-After.
Unusual traffic
Every minute Peris.ai Router compares each key's last hour with its own average hour over the previous seven days. A key running three times above its usual rate (and with a real baseline of at least ten requests an hour) is marked Unusual traffic ×N on the Keys page and on the key itself. Nothing is blocked: a launch looks the same as a leak, and only you can tell which. If you did not expect the traffic, rotate the key (Keys, the key, Rotate key) or disable it. The mark clears itself on the next calm hour.
Key rotation
Rotate key issues a replacement with the same name, limit, guardrails and
expiry, and shows its secret once. The old key keeps working for the grace window
you pick (Immediately, 1 hour, 24 hours or 7 days), then answers
401 key_rotated. Pick Immediately when the key leaked.
Guardrail limits
A key's guardrails can impose their own caps, set by your organization rather than by Peris.ai Router:
| Guardrail | Effect |
|---|---|
| Allowed models | A model outside the list gives 403 model_not_allowed |
| Blocked providers | If every provider for a model is blocked, 403 provider_blocked |
| Max tokens per request | A larger max_tokens is silently clamped down, not rejected |
| perisairouter/auto cost tier | perisairouter/auto picks only from the cheaper (Low) or dearer (High) half of its candidates; overrides the request's own cost_tier |
| Rate limit | Requests per minute per key, default 60; more gives 429 rate_limited |
The clamp is worth knowing: ask for 4000 tokens against a 512 guardrail and you
get exactly 512 back with finish_reason: length. The request succeeds.
Data retention
| Data | Kept |
|---|---|
| Usage records | Indefinitely, so historic spend stays auditable |
| Request bodies | 7 days, and only when a key's guardrails enable logging |
Request bodies are purged nightly at 03:00 WIB. Deleting a key does not delete its usage history: the record stays so past spend remains attributable.
See Errors for the full list of error types and what to do about each one.