Hard spend cap for autonomous AI agents — one call, before the LLM request.
Stop runaway billing before it starts. Set a $5/day cap per agent, get approved or denied in one MCP call.
Pay with USDC on Base mainnet. Credits added immediately after on-chain verification.
# 1. Provision an account
curl -X POST https://budget-governor.billowing-glade-3692.workers.dev/v1/account
# → { "api_key": "bg_...", "account_id": "..." }
# 2. Top up credits — open in your browser
# 3. Set an envelope for your agent
curl -X PUT \
-H "Authorization: Bearer bg_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"agent_id":"my-agent","limit_usd":5,"window":"daily"}' \
https://budget-governor.billowing-glade-3692.workers.dev/v1/budget/envelope
# 4. Call before each LLM request
curl -X POST \
-H "Authorization: Bearer bg_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"agent_id":"my-agent","model":"claude-sonnet-4-6","estimated_tokens":2000}' \
https://budget-governor.billowing-glade-3692.workers.dev/v1/budget/clear
claude-opus-4-7 $15.00 / $75.00 per M tokens (in / out) claude-sonnet-4-6 $3.00 / $15.00 claude-haiku-4-5 $0.80 / $4.00 gpt-4o $2.50 / $10.00 gpt-4o-mini $0.15 / $0.60 gemini-1-5-pro $1.25 / $3.50 (unknown model) $15.00 / $15.00 conservative default
budget_clear deducts estimated output cost. Unused tokens are not charged.