DOCS
Give your agent an expense account
Yeetful is spend-controlled x402 for AI agents: an allowlist of hosts plus per-call and per-day USDC budgets, enforced locally before any payment is signed — with a receipt for every decision, settlements and refusals alike. No API keys to the services you call; pay per call in USDC on Base.
The five-line version
import { yeetful } from 'yeetful/agent'
const pay = yeetful({
wallet, // a viem WalletClient (works with CDP wallets too)
grant: { allow: ['tripadvisor.x402.paysponge.com'], perCallUsd: 0.05, perDayUsd: 2 },
})
const res = await pay('https://tripadvisor.x402.paysponge.com/api/v1/location/search?searchQuery=tokyo')pay() is a drop-in fetch: free endpoints pass through (allowlist-checked, receipted at $0), 402 challenges are paid automatically — protocol v1 and v2 alike — and anything off-policy throws a typed GrantError before a single byte of payment is signed.
QuickstartInstall the yeetful SDK, define a spend grant, and make your first pay-per-call x402 request in USDC on Base — about twenty lines of TypeScript.The expense accountHow yeetful spend grants work: host allowlists, per-call/per-day/lifetime USD caps, typed GrantError denials, and a receipt for every decision.Dashboard ledger syncMint a yf_ API key, set YEETFUL_GRANT_ID, and every settlement and denial your agent makes lands in your yeetful.com dashboard audit feed.x402 v1 + v2The x402 402-challenge flow, and the v1/v2 wire differences (amount fields, CAIP-2 networks, payment headers) the yeetful client absorbs automatically.Add with Claude CodePaste one prompt into Claude Code and it wires the yeetful SDK into your Coinbase Developer Platform agent, then walks you through keys and grant setup.
Elsewhere
- yeetful on npm — MIT, TypeScript, client + server helpers included
- Yeetful/example-agent — the smallest runnable integration (free demo mode by default)
- Network activity — every settled call on the network, anonymized and on-chain verifiable