An AI agent can now read a price, pay a Lightning invoice and carry on working without anyone typing in a card number. Whether that beats the stablecoin rails Visa and Mastercard are backing is the bet Lightning Labs is making.

Lightning Labs released pi402 on Thursday, November 12, an open-source extension for the Pi coding agent that lets it buy AI inference with bitcoin over the Lightning Network. Olaoluwa Osuntokun, the company's CTO, announced it on the Lightning Labs blog under the title "Announcing pi402: Your Agent Can Now Pay for Inference with Bitcoin." The pitch is that there are no accounts to create, no API keys to manage and no card numbers to enter.

The mechanics are simple enough to explain in a breath. When the agent calls a paid inference endpoint, the server answers with an HTTP 402 "Payment Required" response carrying a Lightning invoice. The agent pays, gets a credential token called a macaroon, and the request goes through. That's the L402 protocol Lightning Labs has been pushing as a payment rail for AI agents.

Crypto Briefing, which covered the launch, lists the pieces around it. Sellers who want to take payment run Aperture, Lightning Labs' L402 reverse proxy, which enforces pay-first-then-access before a request reaches the backend. A companion tool called Lightmeter works with Aperture to meter usage on OpenAI-compatible inference endpoints. On the buyer side, Wavelength, a wallet built on the Ark protocol, moves funds between Ark and Lightning, so neither side has to run a node or manage channels.

Billing is per token, not per subscription. The demo price reported by Crypto Briefing and PANews is about $0.375 per million input tokens and $1.50 per million output tokens, paid in satoshis. Treat those as demo figures: they show how the metering works, not what a production provider will charge.

Mysten Labs paired the Alibaba Cloud deal with a separate Google Cloud tool, Verifiable Agent Arbiter, to audit what AI agents actually do with their spending permissions once they're turned loose. - AI agents paying for cloud services per call - stablecoin budget system for Alibaba Cloud API usage

Wavelength is the part worth watching. Lightning's old problem was that using it meant channels, liquidity and a node, which no software agent wants to babysit. Lightning Labs says Wavelength went live on mainnet in October, so pi402 arrives with the wallet already in place. Earlier open-source tooling, including the lnget command-line client, covered the buying side of L402 in February.

Bitcoin against x402

The timing invites a comparison, and Lightning Labs clearly wants it. The x402 standard, which also revives the HTTP 402 code, now sits under a Linux Foundation body, the x402 Foundation, that was announced in April and became operational in July with 40 members. Payments Dive and other outlets reported Visa and Mastercard among them, alongside Google and Microsoft. x402 is mostly used with stablecoins, and its backers are card networks and cloud giants.

Both protocols are open and both use the same web status code. The difference is the money underneath. A stablecoin payment is a dollar-denominated claim on an issuer such as Circle or Tether, and it settles on whichever chain the seller picks. A Lightning payment settles in bitcoin, with no issuer who can freeze it. For an agent buying a few thousand tokens at a time, that matters less than who already has the plumbing. Frankly, the card networks have the merchants, and stablecoins have the developer mindshare. Bitcoin has neither, so Lightning Labs is selling a cleaner design and not a bigger network.

There's a second angle for anyone holding BTC through a rough patch. Most of the arguments for bitcoin in 2026 have been about price. pi402 is an argument about use: a machine that needs to pay a stranger for compute, at 3am, with no human to approve it. If that sounds niche, it is. Nothing in the announcement says how many agents or inference sellers are on L402 today, and Lightning Labs has not published usage figures.

That's the honest state of play. pi402 works with one agent harness, and the pricing is a demo. The open question is whether any inference provider besides Lightning Labs' own setup starts charging in satoshis. If you build agents, the test is cheap: point Pi at an L402 endpoint and see whether the invoice settles before your patience does.

Also read: Tron, Tether and Chainalysis launch Digital Crime Task Force to freeze USDT β€’ Telegram's GRAM token climbs to $1.18 while the wider crypto market slides β€’ MSCI drops Strategy from its USA index, with passive funds due to sell by November 30

This article is posted in Crypto News, check it out for more related stories.

Join the discussion