As with the rate limiter, the budget is one counter gateway-wide and one per
application when targeted.
The budget is checked before the request goes upstream, using an estimate, and
the actual usage is charged after the response.
Dollars are only as true as the rates
A dollar budget prices tokens the same way Analytics does: your contract pricing where you set it, otherwise list price. Enter the contract before the budget, or a discounted contract stops too early.Downgrade, not reject
Downgrading keeps the application working at its ceiling —gpt-4o-mini instead
of gpt-4o — instead of returning errors. The target must be on the same
provider. Reject is for spend that must not happen at all.
Where to apply it
When the goal is cost, pair a budget with smart routing:
routing lowers the bill on every request, the budget puts a hard stop under it.