Set the account budget
set_account_budgetSet the account budget
Sets or replaces the account's budget: daily, weekly, monthly and lifetime limits at our price (at least one), the alert share and the mode. hard_stop refuses the key's requests with a 402 once a limit is reached (the request that crosses it can go a little over: the check runs before a request, its cost lands after, and the Model API keeps the key's state for about a minute); alert_only never blocks and sends one email per limit and window when the spend crosses alertPct. A limit left out or null is no limit. Requests follow within about a minute.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"limits": "<limits>"
},
"name": "set_account_budget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | hard_stop refuses requests with a 402 at a limit; alert_only never blocks (it needs alertPct above 0). | hard_stop |
| limits | Yes | Limits in USD at our price, to the cent. At least one; null or left out is no limit. | |
| alertPct | No | Email once per limit and window when the spend crosses this share of a limit. 0 turns the alert off. | |
| idempotencyKey | No | Optional. A unique string so that repeating this call never creates twice. |