0x217320b62173…217320b3
Lightning Labs Ships pi402 So AI Agents Pay for Inference in Bitcoin
Lightning Labs launched pi402 on November 12, 2026, letting AI coding agents pay per token in Bitcoin over Lightning with no accounts, keys or cards. Seller adoption remains unproven.

Outputs
Lightning Labs released pi402 on November 12, 2026, an open-source extension for AI agents to pay for inference in Bitcoin over Lightning.
Demo pricing is roughly $0.375 per million input tokens and $1.50 per million output tokens.
The L402 protocol pairs HTTP 402 responses with Lightning invoices; authentication uses macaroons.
Wavelength, built on Ark and live on mainnet since October 2026, handles payments without node management.
Lightning Labs launched agent tooling in February 2026 before pi402 completed the stack.
Lightning Labs released pi402 on November 12, 2026, an open-source extension that lets AI coding agents pay for their own inference in Bitcoin over the Lightning Network. The tool targets a narrow but growing friction point: software agents increasingly need to buy compute, yet nearly every compute vendor still assumes a human holds the wallet. Whether vendors will adopt the seller-side plumbing remains the untested part of the plan.
What does pi402 remove?
The extension strips out the usual commercial scaffolding. There is no account signup, no API key and no credit card. The agent sees a price, pays a Lightning invoice, and returns to its task. Once configured, no human intervenes in the purchase loop; the agent handles payment and access on its own.
That autonomy is the claim. Lightning Labs has not published adoption figures or named inference providers already running the stack, so the operational proof so far rests on the company's own demonstration.
How the payment loop works
The engine underneath pi402 is L402, a protocol Lightning Labs has developed for some time. It joins two pieces of plumbing that were never designed to meet. The first is the HTTP 402 "Payment Required" response. The second is a Lightning invoice, a request for a specific amount of Bitcoin payable over the Lightning Network.
When an agent hits a paid endpoint, the server answers with a 402 and an attached invoice. The agent pays, and settlement is instant. Authentication runs through macaroons, a type of credential token, producing pay-per-token billing: the agent pays for exactly the tokens it consumes, request by request, instead of a monthly plan or a prepaid balance.
In plain terms, the meter is the contract.
Who accepts the payments?
Payments need a counterparty. Lightning Labs points sellers to two of its own tools:
- Aperture, an L402 reverse proxy that sits in front of a service and enforces the "pay first, then get access" logic before requests reach the backend.
- Lightmeter, which meters usage and accepts payments alongside Aperture.
Together the two let a provider charge for access to an OpenAI-compatible inference endpoint. Neither buyers nor sellers must run a Lightning node or manage payment channels. The Wavelength wallet handles payments instead; it is built on Ark and moves funds between Ark and Lightning automatically.
Demo pricing runs at roughly $0.375 per million input tokens and $1.50 per million output tokens. That output rate works out to about $1,500 for a billion tokens — a useful yardstick when comparing against incumbent API tariffs, though demo prices are not commitments.
A year of building toward this
pi402 did not appear in isolation. It caps a sequence of Lightning Labs releases across 2026 that all point the same direction:
- February 2026: agent tooling launched, aimed at letting software interact with Lightning payments.
- October 2026: Wavelength went live on mainnet.
- November 2026: pi402 packaged the pieces into a concrete purchase — inference.
Each step filled a gap. The agent tools gave machines a way to transact. Wavelength removed the node-management burden. pi402 now bundles the stack into something a coding agent can spend against a real workload.
The trajectory is coherent. What it still lacks is a named third-party provider charging real volume through Aperture and Lightmeter, and until one appears, pi402 is best read as infrastructure ahead of demonstrated demand.
via Crypto Briefing (Source)
More from Elena Vasquez
Show full bio
Staff writer covering regulation, policy and their impact on crypto and web3 industry at Mempool Brief.
1,021 articles