Lightning Labs just released a little open-source tool called pi402 for Pi coding agents: agents can pay their own inference fees in bitcoin over the Lightning Network, with no account registration, API keys, or card linking. They see the price, pay an invoice, and get back to work.

Under the hood is the L402 protocol, which combines HTTP 402 “Payment Required” with Lightning invoices. It charges by the tokens used, with demo pricing at about $0.375 per million input tokens and $1.50 per million output tokens. Sellers collect payments with Aperture and Lightmeter, while wallets use Wavelength—neither side has to run its own Lightning node. You could say agents spending money on their own just got one step closer to everyday use—but it’s still early, and we’ll have to see how well it works in practice.