I wanted to use AI APIs and pay with sats. No signup, no API key, no credit card. So I built it.
You send a normal OpenAI API request to my proxy. You get back a 402 with a Lightning invoice. Pay it, get a preimage, redeem your response.
PHOENIX_WALLET_PASSWORD=your-phoenix-password
# Step 1: Request -> 402 + invoice
INVOICE=$(curl -sS -X POST https://alittlebitofmoney.com/openai/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hello bitcoin world"}]}' | jq -r '.invoice')
# Step 2: Pay (replace with your wallet integration)
PREIMAGE=$(curl -sS -X POST http://localhost:9741/payinvoice -u ":$PHOENIX_WALLET_PASSWORD" --data-urlencode "invoice=$INVOICE" | jq -r '.paymentPreimage')
# Step 3: Redeem
curl -sS "https://alittlebitofmoney.com/redeem?preimage=$PREIMAGE" | jq -r '.choices[0].message.content'
Hello! How can I assist you in the Bitcoin world today?That's the whole flow. The preimage is your receipt. No accounts, no tokens, no sessions. Every request is stateless and independent.
It supports 11 OpenAI endpoints: chat completions, image generation, image editing, text-to-speech, transcription, translation, embeddings, moderations, video generation, and the new Responses API. Pricing starts at 21 sats for gpt-4o-mini. Full catalog with live pricing at https://alittlebitofmoney.com/catalog
The site prices your request upfront, holds it in memory, and only calls OpenAI after you prove payment with the preimage. Unpaid requests expire after 10 minutes and are deleted. Nothing is stored long-term.
If you want to automate it, plug in any wallet that can return a preimage — phoenixd, LND, CLN, LNbits, Alby, Strike. The docs page has copy-paste code for each: https://alittlebitofmoney.com/doc
Happy to answer questions. Code is at https://github.com/tianzhicdev/alittlebitofmoney