Sats for Bots #4: pi402, LNbits Patches and Selling an API with a Lightning Address
Sats for Bots #4: pi402, LNbits Patches and Selling an API with a Lightning Address
Hey, welcome back. It was a busy week for agents that pay and get paid over Lightning: a serious security scare, Lightning Labs letting a coding agent pay for its own inference, a one-call way to sell an API, and three new listings in the directory. The full directory is at satsforbots.com.
LNbits: upgrade to v1.7.1 and rotate your keys
On Nov 8, LNbits told operators to stop their servers right away after "a wave of attacks", having warned earlier that day to disable the Paywall extension. LNbits shipped v1.7.0 with security fixes on Nov 10, then v1.7.1 on Nov 11, a further security patch that rotates auth keys. LNbits says every version before 1.7.0 is affected and funds on it are at risk.
Upgrading alone isn't enough. LNbits' guide says to prefer a fresh server if you suspect a compromise, reset all users' wallet keys, replace your funding-source credentials, rotate other secrets in settings, and recreate connections for extensions like NWC Provider and LNDHub. If your agent talks to an LNbits wallet over NWC or LNDHub, expect to update its keys. LNbits' reminder is worth repeating: it's a hot wallet, so keep only day-to-day funds in it. (alert · upgrade guide · v1.7.1 · listing)
pi402: a coding agent that pays for its own inference
On Nov 12, Lightning Labs launched pi402, an extension for the Pi coding agent that buys LLM inference over L402, with no account and no API key. Install it with pi install npm:@lightninglabs/pi-402, fund its built-in Wavelength wallet with /fund, and point it at a seller. Pi gets a 402, pays the invoice, caches the credential and carries on, while the extension enforces a per-request ceiling and a daily budget and shows every payment in a footer.
The seller side is the interesting part: Aperture v0.6.0 plus a new price server, meterd, and Lightmeter, a reference pricing daemon, let you charge per token in millisatoshis instead of per request. Lightning Labs' example of 1 msat per input token and 2 msat per output token works out to roughly $0.80 and $1.61 per million tokens. It all goes in front of an existing inference API without changes to the API. Two caveats: Wavelength is still alpha on mainnet, and pi402 can also pay over MPP (Stripe and Tempo's Machine Payments Protocol), which this newsletter doesn't cover; L402 is the Lightning path. (announcement · repo · listing)
Sell your API with just a Lightning Address
Lightning Enable added a sell-with-lightning-address skill. Give your agent an API URL and a Lightning Address, and one l402_producer sell_url call through the Lightning Enable MCP pays a single L402 claim and hands back a proxy URL that charges buyers per call. No account, dashboard or wallet credentials needed. Every payment goes to your Lightning Address, and Lightning Enable says it holds no funds and stores no wallet credential. You also get an API key, so add a recovery email or Nostr key, because without one that key is your only way back into the account. (announcement · skill · listing)
New in the directory
pi402 is now listed under Clients (see above).
Sats4AI (sats4ai.com) sells 40+ tools your agent can pay for per call with sats and no account: SMS, AI phone calls, fax, translation into 452 languages, text-to-speech, OCR, image and video generation, and more. Every tool sits behind L402, and there's a remote MCP server you add with one config line. I knocked on its translate endpoint and got back a real L402 challenge with a 1-sat Lightning invoice. (listing)
SatBotly (satbotly.com) is a directory of what AI agents can pay for, and it checks its own answers: every verdict quotes its source, and its pay-per-call API prices come from the 402 challenges endpoints actually sent back. It also ranks agent wallets and lists MCP payment servers and Cashu tools. It covers x402 and MPP too, so treat those parts as context. Its survey of 458 pay-per-call APIs (Oct 17 to 18) found a median of 10 sats (about $0.008) per call on L402, against $0.015 on x402 and $0.005 on MPP. (listing · price survey)
Release notes
- Breez Spark SDK 0.28.0 (Nov 5): adds a bridging client, so users can pay a Spark, Lightning or USDC/USDT address from another chain or over Lightning, plus sending to silent payment addresses (BIP-352). 0.28.1 followed on Nov 10 with bug fixes. (release · listing)
Around the network
- Lightning in x402: the x402 account says Bitcoin Lightning payments are now part of x402, contributed by new x402 Foundation member Block, so servers can list Lightning in a 402 response next to the networks x402 already supports. (post)
That's it for this week. Built something agents can pay for in sats? Reply and tell me about it.
Enjoying this? Subscribe free at satsforbots.com/newsletter
Stack sats, ship bots.
Sats for Bots