Limits

Set budgets and rate limits in Costs & Limits → Limits so a busy key, runaway agent loop, or shared credential stops when it hits its allowance instead of running up your provider bill. Viewing limits requires llmLimit:read; creating, editing, or deleting limits requires llmLimit:create, llmLimit:update, or llmLimit:delete.

Costs & Limits → Limits listing active spend, token, and request limits

Create a Limit

  1. Go to Costs & Limits → Limits and click Create limit.
  2. Under Apply to, choose the scope (Organization, Team, Virtual key, User, Agent, LLM OAuth client, or Environment) and select the target entity.
  3. Under Select models, keep All models so every model shares one pool, or pick specific models to cap only those models.
  4. Enter a whole-number Limit value, choose the Limit kind (Spend, Tokens, or Requests), and pick the reset Interval.
  5. Optionally expand Labels to tag the rule for filtering, then click Create limit.

The Create limit dialog showing scope, model selection, limit value, limit kind, and interval

Scopes and Limit Kinds

Organization, Team, and Virtual key scopes support all three limit kinds, including per-minute rate limits. User, Agent, LLM OAuth client, and Environment scopes support Spend limits on hourly, multi-hour, weekly, monthly, and calendar intervals.

ScopeSpend ($)TokensRequests
Organization, Team, Virtual keyRolling (1h–1m) and calendar intervalsPer minute, plus all rolling and calendar intervalsPer minute, plus all rolling and calendar intervals
User, Agent, LLM OAuth client, EnvironmentRolling (1h–1m) and calendar intervals——

When more than one rule matches a call, every matching rule is checked:

  • Every matching scope must allow the request. A virtual key with remaining allowance is still blocked if its billing team or the organization has reached its cap.
  • Model-specific and all-models rules both apply. A call to claude-sonnet-4-6 checks both any rule targeting claude-sonnet-4-6 and any rule set to All models on the same scope.
  • Multi-model rules share one pool. Selecting multiple models on a single rule caps their combined spend, tokens, or requests together.

Reset Intervals

Each limit resets or recovers according to its Interval:

FamilyOptionsHow it resets
Per minutePer minute (Tokens and Requests on Organization, Team, or Virtual key)Allows bursts up to the limit value and recovers continuously over 60 seconds (for example, 60 requests per minute recovers 1 request per second).
RollingEvery hour, Every 12 hours, Every 24 hours, Every week, Every monthResets once the full interval has elapsed since the previous reset.
CalendarCalendar day, Calendar week (Sun), Calendar week (Mon), Calendar monthResets at 00:00 local server time at the start of the next day, Sunday, Monday, or month.

Default User Spend Limits

Instead of creating a separate rule for each person, go to Settings → LLM and set Default User Spend Limit with a dollar amount and reset interval. Every user gets their own individual spend allowance of that size.

  • Override for one user: create a User spend limit in Costs & Limits → Limits. That custom rule replaces the default user spend limit for the selected person.
  • Override for an environment: set a default user spend limit on an Environment to give users in that environment a different default cap.

How Usage Is Counted

  • Spend ($): counts metered API-key calls at the model's token prices. Calls on flat-rate subscriptions record $0 spend and do not consume spend limits (see Subscription vs Metered Cost).
  • Tokens: counts newly processed input and output tokens reported by the provider after each call finishes (including cache writes and subscription traffic; reused cached input does not consume token limits). Because token counts arrive when a response completes, requests already in flight can push usage slightly past a token limit before subsequent requests are blocked.
  • Requests: counts one request when the proxy admits a model call, including subscription traffic.

When a Request Is Blocked

When any matching rule is exhausted, the proxy rejects the call before forwarding it upstream:

Limit reachedHTTP statusError codeDetails
Spend402 Payment Requiredtoken_cost_limit_exceededReturned when any matching spend limit has reached 100%.
Tokens or Requests429 Too Many Requestsarchestra_quota_exceededIncludes a Retry-After header (in seconds) indicating when enough allowance recovers or resets.