{"slug": "lightning-labs-launches-pi402-so-ai-agents-can-buy-inference-with-bitcoin", "title": "Lightning Labs launches pi402 so AI agents can buy inference with Bitcoin", "summary": "Lightning Labs released pi402 on November 12, 2026, an open-source extension that lets AI coding agents for the Pi coding agent pay for their own inference in Bitcoin over the Lightning Network, with no accounts, API keys, or credit cards. The tool runs on the L402 protocol, pairing an HTTP 402 \"Payment Required\" response with a Lightning invoice and macaroon authentication, so an agent pays per token request by request; Lightning Labs points sellers to its Aperture reverse proxy and Lightmeter metering tool, with payments handled by the Wavelength wallet built on Ark. Demo pricing is approximately $0.375 per million input tokens and $1.50 per million output tokens, following Lightning Labs' February 2026 agent tooling launch and Wavelength's October mainnet release.", "body_md": "# Lightning Labs launches pi402 so AI agents can buy inference with Bitcoin\n\nBitcoin logo (public domain), by Grayliptrot via Wikimedia Commons (Public domain)\n\nThe open-source Pi extension lets coding agents pay per token over Lightning, with no accounts, API keys, or cards involved\n\nLightning Labs has released pi402, an open-source extension that lets AI coding agents pay for their own inference in [Bitcoin](https://cryptobriefing.com/markets/bitcoin/) over the Lightning Network.\n\nThere is no account signup, no API key, and no credit card. The agent sees a price, pays the invoice, and gets back to work.\n\nThe tool was unveiled on November 12, 2026, and is built for the Pi coding agent. It targets a specific and growing problem. Software agents increasingly need to buy compute, but nearly every compute vendor still assumes a human is holding the wallet.\n\n## How pi402 actually works\n\nThe engine underneath pi402 is L402, a protocol Lightning Labs has been developing for some time. It pairs two pieces of plumbing that were not originally designed to meet.\n\nThe first is the HTTP 402 “Payment Required” response. The second is a Lightning invoice, which is a request for a specific amount of Bitcoin payable over the Lightning Network.\n\nWhen an agent hits a paid endpoint, the server answers with a 402 and an invoice attached. The agent pays it, and the payment settles instantly.\n\nAuthentication runs through macaroons, a type of credential token. The result is pay-per-token billing. Instead of a monthly plan or a prepaid credit balance, the agent pays for exactly the tokens it consumes, request by request.\n\n### The crypto and markets news you actually need—every morning.\n\nDaily. Free. Join 34,000+ readers across crypto, finance, and policy.\n\nOnce the setup is configured, no human needs to step in. The agent handles the purchase loop on its own.\n\n## The seller side and the wallet question\n\nPayments need someone on the other end to accept them. For that, Lightning Labs is pointing sellers to two of its own tools.\n\nAperture is an L402 reverse proxy. It sits in front of a service and handles the “pay first, then get access” logic before requests reach the backend.\n\nLightmeter works alongside Aperture to meter usage and accept payments. Together they let a provider charge for access to an [OpenAI](https://cryptobriefing.com/markets/openai/)-compatible inference endpoint.\n\nNeither buyers nor sellers need to run a Lightning node or manage payment channels. Instead, the Wavelength wallet takes care of payments. Wavelength is built on Ark and automatically moves funds between Ark and Lightning.\n\nAs for cost, the demo pricing is approximately $0.375 per million input tokens and $1.50 per million output tokens.\n\n## A year of building toward this\n\npi402 did not appear out of nowhere. It caps a run of releases from Lightning Labs across 2026 that all lean in the same direction.\n\nIn February, the company launched agent tooling aimed at letting software interact with Lightning payments. In October, Wavelength went live on mainnet.\n\nEach step filled a gap. The agent tools gave machines a way to transact, Wavelength removed the node-management burden, and pi402 now packages it all into something a coding agent can use for a concrete purchase: inference.\n\n**Disclosure:** This article was edited by Vivian Nguyen. For more information on how we create and review content, see our [Editorial Policy](https://cryptobriefing.com/editorial-policy/).", "url": "https://wpnews.pro/news/lightning-labs-launches-pi402-so-ai-agents-can-buy-inference-with-bitcoin", "canonical_source": "https://cryptobriefing.com/lightning-labs-pi402-ai-agents-bitcoin-inference/", "published_at": "2026-11-12 22:51:26+00:00", "updated_at": "2026-11-12 23:20:09.305603+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "ai-tools", "artificial-intelligence"], "entities": ["Lightning Labs", "pi402", "Pi", "L402", "Lightning Network", "Aperture", "Lightmeter", "Wavelength"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/lightning-labs-launches-pi402-so-ai-agents-can-buy-inference-with-bitcoin", "markdown": "https://wpnews.pro/news/lightning-labs-launches-pi402-so-ai-agents-can-buy-inference-with-bitcoin.md", "text": "https://wpnews.pro/news/lightning-labs-launches-pi402-so-ai-agents-can-buy-inference-with-bitcoin.txt", "jsonld": "https://wpnews.pro/news/lightning-labs-launches-pi402-so-ai-agents-can-buy-inference-with-bitcoin.jsonld"}}