budget
Manage execution budgets to control API costs, preventing unexpected charges by setting limits and monitoring usage.
Instructions
Check or set your execution budget. Without action param, returns current status. Use action='set' with budget_usd to create/update. Budget is enforced pre-execution — you get 402 (not a surprise bill) when over limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action: 'get' to check budget, 'set' to create/update | |
| budget_usd | No | Budget amount in USD (required for set) | |
| period | No | Budget period: daily, weekly, monthly, total (default: monthly) | |
| hard_limit | No | If true, reject executions over budget (default: true) |