Lightning Labs Lets AI Agents Pay in Bitcoin
The open-source pi402 extension lets coding agents pay for inference over the Lightning Network without accounts, API keys or credit cards.
Updated on Nov. 12, 2026 in Artificial Intelligence

Lightning Labs released pi402, an open-source extension for the Pi coding agent that lets AI agents pay for inference in Bitcoin over the Lightning Network. The tool requires no account signup, no API key and no credit card.
Why it matters
The release gives autonomous software agents a way to pay for paid online services without human-managed billing accounts. It builds on agent payment tooling Lightning Labs launched in February 2026 and the Wavelength wallet that went live on mainnet in October 2026.
pi402 uses the L402 protocol, which pairs the HTTP 402 Payment Required response with a Lightning invoice and authenticates through macaroon credential tokens. The source does not report throughput, latency or settlement-failure rates for payments made this way.
The players
Lightning Labs
Lightning Labs is a company building infrastructure for the Bitcoin Lightning Network, including developer tools and wallets.
The details
When an agent requests a paid endpoint, the server responds with a 402 status and an attached Lightning invoice; the agent pays it and the payment settles instantly. Aperture, an L402 reverse proxy, handles pay-first access logic in front of a service, while Lightmeter meters usage and accepts payments alongside it.
Timeline
February 2026: Lightning Labs launched agent tooling for Lightning payments.
October 2026: The Wavelength wallet, built on Ark, went live on mainnet.
November 12, 2026: pi402 was unveiled.
The Tech Race
pi402 extends the L402 protocol, which turns the long-dormant HTTP 402 status code into a working micropayment standard, into autonomous AI agents. It positions Lightning-based payments as an alternative to the account-and-API-key billing that most AI services use today.
Developers running AI coding agents could pay for model inference per request without opening accounts or handling API keys or credit cards. Whether this approach reaches mainstream tools depends on adoption, which the source does not measure.
The takeaway
Paying per request with Lightning removes the account setup that usually stands between an AI agent and a paid service. Developers experimenting with agent workflows may want to watch whether this model spreads beyond early open-source tools.
Further reading
For more on how autonomous software is changing digital services, see Artificial Intelligence.







