AI Gateway now supports team and project spend budgets
AI Gateway spend budgets can now be scoped to teams or projects in addition to API keys. Set dollar limits on any scope, and the gateway enforces them by metering spend and rejecting requests once a limit is reached, with options for email alerts and default budget inheritance.
AI Gateway spend budgets can now be scoped to a team or a project, in addition to individual API keys. Set a dollar limit on a scope, and the gateway meters spend against it and stops further requests once the limit is reached, until the budget resets or you raise it.
A budget attaches to one of three scopes. A request can fall under multiple budgets and has to pass all of them: if any one is over its limit, the request is rejected, even when the others have room left.
BYOK spend is not counted against budgets by default.
Set and track budgets from the . The Overview breaks spend down across every scope against its limit, so you can see what is near or over before it starts rejecting requests.AI Gateway Budgets tab
Turn on email spend alerts to notify your team's usage notification recipients when usage crosses 50%, 75%, or 100% of a limit within a refresh period. Alerts are off by default and informational: they never block requests, only the budget limit does.
Set a default budget for projects or API keys, and every one without an explicit budget inherits it automatically. An explicit budget always overrides the default.
Set, inspect, and remove team and project budgets from the CLI. The refresh period is , , (default), or for a cumulative cap.dailyweeklymonthlynone
For more information, read the .budgets documentation
Scopes
Manage budgets in the dashboard
Manage budgets from the CLI
Scope | Caps spend for |
|---|---|
Team | Every request your team runs through the gateway |
Project | All requests attributed to a single project |
API key | A single API key |
Source: original entry ↗