Lightning Labs released pi402 on November 12, an open-source extension that empowers AI coding agents to pay for their own inference—the computing work underlying each model response—directly in Bitcoin over the Lightning Network. Built specifically for the Pi coding agent, the tool requires no account registration, API keys, or credit cards, and bills on a per-token basis using millisatoshi-level pricing.
The tool is constructed on the L402 protocol, which pairs the HTTP 402 'Payment Required' response with a Lightning Network invoice, ensuring access is granted only after payment settles. In a demo, pricing was reported at roughly $0.375 per million input tokens and $1.50 per million output tokens, with billing metered in millisatoshis per token—one millisatoshi being one-thousandth of a satoshi.
The payment flow is designed for autonomous software. An agent requests access to a paid service, receives a Lightning invoice, pays it, and once the transaction settles—typically within seconds—receives the credentials needed to continue its task. The extension includes spending controls, such as per-request limits and daily budgets, so humans can cap what an agent may spend. On the seller side, providers can accept payments through the Aperture and Lightmeter tools, while neither buyer nor seller needs to run a Lightning node, as payments are handled by the Ark-based Wavelength wallet.
Olaoluwa Osuntokun, a key figure at Lightning Labs, framed the importance of this launch succinctly: 'Inference is the fuel every agent runs on.' The Aperture v0.6.0 release notes reveal that the system supports prepaid bundles drawn down according to actual usage, meaning a single Lightning payment can support multiple model requests rather than initiating a new payment for every generated token. The Lightmeter repository converts a provider's dollar-denominated model prices into millisatoshis per token and can add a seller margin.
The launch positions software agents as a distinct class of Bitcoin payer. If AI applications increasingly purchase data, computing power, and digital services on their own, they could transact with a Bitcoin wallet rather than a bank account. Micropayments are central to the design: card systems impose fixed processing fees that make very small charges uneconomical, while Lightning can settle payments denominated in tiny fractions of BTC.
However, the articles caution that increased Lightning activity would not automatically raise BTC's price. Longer-term market effects depend on adoption, how much Bitcoin sits in payment wallets, and whether demand grows alongside purchased services. Adoption hurdles include the need for more AI service providers to accept Lightning payments, and developer challenges surrounding wallet security, liquidity management, and Bitcoin volatility. Bitcoin traded at $69,237 as of November 13, down 4.6% over 24 hours and 8.8% over the week, with a market cap of $1.39 trillion.