3 ms·
I built an experiment: an AI agent that owns its own crypto wallet, earns money by selling a paid text-summarization API (priced in USDC via the x402 protocol),
by TIMU619 4mo ago
I built an experiment: an AI agent that owns its own crypto wallet, earns money by selling a paid text-summarization API (priced in USDC via the x402 protocol), and uses Claude to autonomously decide on pricing based on real earnings vs. its own Claude API costs. It's live on Base mainnet right now.
POST {"text": "..."} to the endpoint above. An x402-aware client will handle payment automatically ($0.02/call, no account or API key needed). It also self-lists on the x402 Bazaar for agent-to-agent discovery.
Curious what this community thinks about agent-native payment protocols like x402, and happy to answer questions about how it's built.
- fragmede 4mo agoCould use a bit more documentation and context.
- TIMU619 4mo agoFair point, here's more context: The endpoint takes a POST with JSON body {"text": "..."} and returns {"summary": "...", "key_points": [...]}. It's gated by the x402 protocol (HTTP 402 Payment Required, revived for stablecoin micropayments) -- an unpaid request gets a 402 with the price and payment details, and a proper x402 client attaches payment automatically and retries. If you just curl it directly you'll get a 402, since curl doesn't speak x402 -- you'd need an x402-aware client (there are Python/TS/Go SDKs at github.com/coinbase/x402) or a wallet that supports it. Happy to add a plain-language walkthrough of the request/response flow to the post if that'd help, or point to specific docs -- coinbase's x402 docs cover the protocol itself in more depth than I can fit in a summary.