# Lightning Labs launches pi402 for bitcoin-paid AI inference

*Launch · 16 Nov 2026*

Lightning Labs announced **pi402** on November 12, an open-source toolkit that lets the Pi coding agent buy AI inference with bitcoin over the Lightning Network. The company says the setup requires no inference account, API key or card details: an agent pays for the tokens it uses, while sellers can charge request by request.

The system builds on **L402**. When an agent calls a paid endpoint, the server returns an HTTP 402 response with a Lightning invoice and an incomplete macaroon credential. Paying the invoice reveals the preimage needed to complete that credential, combining payment and authorization in one step. The pi402 extension also supports a ceiling for each request and a daily budget.

For inference providers, Lightning Labs released **Aperture v0.6.0**, whose new metering APIs can account for input and output tokens. Its **Lightmeter** reference implementation converts dollar-denominated model prices into millisatoshis and can add a seller’s margin. Aperture sits in front of an existing inference API without requiring changes to that API.

On the buyer side, pi402 embeds the Ark-based **Wavelength** wallet into Pi. Users can fund it with a Lightning invoice or an on-chain deposit; the extension displays the balance and payments as the agent works. Wavelength also handles Lightning liquidity for sellers, so neither side has to operate its own node or manage channels.

The launch adds a bitcoin-based option to the growing market for machine-to-machine AI payments. Its pay-as-you-go design is particularly relevant to crypto-paid LLM services because it replaces prepaid balances and identity-linked API credentials with payment-authorized access to individual requests.

## Sources

- [Announcing pi402: Your Agent Can Now Pay for Inference with Bitcoin](https://lightning.engineering/posts/2026-11-12-pi-402/)
- [Lightning Labs launches pi402 so AI agents can buy inference with Bitcoin](https://cryptobriefing.com/lightning-labs-pi402-ai-agents-bitcoin-inference/)
- [Lightning Labs launches pi402 so AI agents can pay for inference in bitcoin](https://startupfortune.com/lightning-labs-launches-pi402-so-ai-agents-can-pay-for-inference-in-bitcoin/)

---

- **Canonical URL:** https://cryptollmss.com/en/news/lightning-labs-pi402-bitcoin-ai-inference/
- **As of:** 16 Nov 2026
- **Data licence:** CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Please cite: Source: cryptollmss.com (cryptovss), as of 16 Nov 2026, https://cryptollmss.com/en/news/lightning-labs-pi402-bitcoin-ai-inference/
