Skip to main content
PUT
Creates or updates the agent’s budget. Applies from the next paid call. Every field is tri-state: an absent key keeps the stored value, null clears it, and a value sets it. A partial update, such as raising only daily, leaves the other caps unchanged. alert_at and pause_at always have a value, so null resets them to the default (0.8 / 1.0).

Authentication

X-Agent-ID plus a signed x-agent-proof with scope: "write" (required). See Spend Budgets.
You rarely call this directly. Pass budgets to the SDK client and it syncs once, before the first paid call. This works for a new wallet that has never made a call (the endpoint registers it). If the sync fails, the SDK refuses the paid call (BudgetSyncError) instead of running without a budget.

Body

number | null
Max USDC per UTC day. Must be > 0, or null to clear.
number | null
Max USDC per call. Must be > 0, or null to clear.
number | null
default:"0.8"
Fraction of daily in (0, 1] that fires a budget_warning notification. null resets to 0.8.
number | null
default:"1.0"
Fraction of daily in (0, 1] at which paid calls are rejected with 403 budget_exceeded. null resets to 1.0.
string | null
Email for budget alerts, alongside in-app notifications. null to clear.
Strings with only a numeric prefix ("5oops") are rejected with 400 invalid_budget.

Errors