Skip to Content
Launching the open-source gateway

Limits

Cap requests, tokens, and spend per plan, API key, and customer.

Limits are checked before any provider is called. A request over a limit is refused at once, so no provider, retry, or fallback runs and nothing is charged.

LimitScopeSet it inOver it
Plan rate limitOrganizationYour plan429
Key rate limitsAPI keyAPI keys429
Key spend and usage limitsAPI keyAPI keys429
Customer budgetOne customerLimits tab, or the customer402
Customer rate limitOne customerLimits tab429

Plan rate limits

The Limits tab of the Gateway page  shows your plan’s limits, and the customer limits below.

The Limits tab: API rate limits for the Free, Team and Enterprise plans, and customer limits with a monthly budget of 25 and a rate limit of 60
PlanLimit
Free412 requests per minute, 100k per day
Team4.2k requests per minute, 1M per day
EnterpriseCustom

API key limits

Open API keys and click the key. Each limit shows its usage, what’s left, and when it resets.

LimitDetail
Rate limitsRequests per minute and tokens per minute for this key.
Lifetime limitA cost cap that never resets, counted from what the key has already spent.
Recurring limitsCost, requests, or tokens per minute, hour, day, week, or month. Stack rows for a daily and a monthly cap.
Alert atA warning threshold below Block at. The request goes through, and Respan sends an email or Slack alert.

Cost and tokens are counted when a call ends, so the call that crosses a cap completes and the ones after it are refused.

Customer limits

Customer limits apply to requests tagged with a customer (see Users & identifiers). Set the defaults for every customer on the Limits tab:

SettingDetail
Customer monthly budgetSpend per customer per month, in USD. Over it, the customer’s requests are refused until the next period.
Customer rate limit (requests/min)Chat requests per minute per customer.

To give one customer a different budget, open them under Observability › Users & identifiers and edit Period budget.

Over a limit

EventWhat happens
Alert at reachedThe request goes through. Respan sends an alert and a limit_policy_soft_triggered webhook, once per threshold per period.
Block at reached429 until the window resets, and a limit_policy_hard_triggered webhook.
Customer budget reached402 until the next period, and a customer_budget_limit_reached webhook.

The Rate limited chart on the Gateway page’s Overview counts every 429, from your limits or a provider’s.