set_budget
Activate or create a prepaid spending budget with a hard cap so an AI agent can pay x402 APIs; a human funds it once via USDC on Base.
Instructions
Activate a prepaid budget (AsterPay /budget) so the agent can spend on paid x402 APIs with a hard cap. Three modes: (1) pass an existing budget token (bud_...) to activate it; (2) pass amount_usd + tx_hash + wallet after your HUMAN sent the USDC, to create a new budget; (3) pass nothing to get funding instructions. An agent cannot grant itself money — a human must make the one-time USDC transfer (1-500 USDC on Base). Credited 1:1, no platform fee. Funding wallet is sanctions-screened (Chainalysis). No API key needed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "set_budget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | Existing budget token (bud_...) | |
| wallet | No | Wallet the payment was sent from (0x...) | |
| tx_hash | No | Transaction hash of the USDC transfer (0x...) | |
| amount_usd | No | USDC amount the human sent (1-500) |