Lightning Labs has launched pi402, an open-source extension that lets coding agents automatically purchase inference in Bitcoin over the Lightning Network. The agent receives an invoice, pays it without signing up for an account, obtaining an API key, or using a credit card, and then gains access to the service. The protocol combines the HTTP 402 “Payment Required” response, Lightning invoices, and macaroon-based authentication to enable pay-per-token billing. For providers, Aperture and Lightmeter handle payment controls and usage metering, while the Wavelength wallet manages funds between Ark and Lightning. Demo pricing is approximately $0.375 per million input tokens and $1.50 per million output tokens.
Source: Read the original article


