Spend Cap
Stop an AI agent from spending past a daily USD budget on model calls. Spend Cap checks each call before the provider is charged, in the SDK and on the Gateway.
A billing agent calls a model all day. Spend Cap gives it a daily budget. Before each model call, Traccia estimates what the call will cost. If that would put the agent over budget, the call is stopped before the provider sees it.
What Happens
| This model call | With Block on |
|---|---|
| The estimate fits inside every cap you set | The call runs. |
| The estimate is over a cap, and you named a cheaper model | The call continues on the cheaper model. |
| The estimate is over a cap, and there is no cheaper model | The call is denied. The provider is never called. |
Observe records the match and lets the call through. Warn does the same and marks what would have happened. Only Block stops the call.
Set It Up
- In the app, open Policies and click Create Policy.
- Choose Spend Cap.
- Enter the Daily Budget in USD. Add a Per-Run Cap or Per-Call Cap if you want one.
- Optionally name a Cheaper Model. The call moves to it instead of stopping.
- Set the mode to Block, then click Activate Policy.
In code, wrap your agent with govern(). For apps that cannot use the SDK, point your model client at the Gateway instead. The remaining budget shows on the agent's Cost and Attribution module.
Good To Know
- Spend Cap is always in USD. Model cost is priced in USD from the model's list price, so there is no currency choice here.
- Spend Cap limits what the model call costs. To limit money an agent moves through a tool, use Refund Guard or Purchase Guard.
- Cost Spike Alert is different. It alerts after the spend has already happened.
If Traccia Cannot Be Reached
Next Steps
© 2026 Traccia.