pi402 Lets Pi Coding Agents Pay for Inference Over Bitcoin’s Lightning Network

For a Pi coding agent that needs more inference, pi402 offers a payment flow: the agent sees a price, pays a Lightning Network invoice and resumes work. In a report published November 13, 2026, ChainCatcher, citing Crypto Briefing, said Lightning Labs had released the open-source extension on November 12. The reported flow requires no account registration, API key or credit card.

pi402 builds on L402, which pairs an HTTP 402 “Payment Required” response with a Lightning invoice. The agent can then pay for the inference it consumes, with billing measured by token usage. In the demonstration, the price was approximately $0.375 per million input tokens and $1.50 per million output tokens.

On the seller side, Aperture and Lightmeter can be used to accept payments. The report says neither buyers nor sellers need to run a Lightning node; an Ark-based Wavelength wallet handles payments.

Further reading