Skip to main content
A budget is a spend cap on a scope, over a period, with a mode that decides what happens when it’s crossed.

Fields

Modes

  • enforce — the next request that would exceed the limit is blocked with 402 before any provider call happens. This is the actual governance guarantee: no upstream call means no charge, regardless of what the provider would have billed.
  • alert — fires alerts at 80% and 100% of the limit but never blocks. Useful while you’re still calibrating a limit.
  • monitor — tracks spend against the limit with no alerting and no blocking. A baseline you can look at without any behavioral effect.

What a block looks like

The block is also written as a requests row with status: blocked and blockReason: budget_exceeded — it shows up in the live feed and in reports exactly like a served request would, just with no provider cost attached.

Scope stacking

A single request can fall under more than one budget at once — a virtual-key budget, a team budget, and an org budget can all apply to the same call simultaneously. Every applicable budget is checked; any one of them blocking is enough to block the request. There’s no precedence to reason about — the tightest applicable cap wins.

Where next

Guardrails

Deny or gate requests on criteria other than spend.

Routing

Reroute to a cheaper model instead of failing outright.