Skip to main content

L402 API Access

Use AI tools by paying with Bitcoin. No signup. No API keys.

Pay with Bitcoin. Get AI Results.

Access 10 AI services using Lightning Network micropayments. No signup, no monthly subscription, no data collection. Just Sats.

No Signup

No accounts, no emails, no passwords

💰

Pay Per Use

No subscriptions. Only pay when you use it

🔒

Private

No personal data collected. Ever

Bitcoin Native

Lightning payments settle in seconds

How It Works

1

Send Your Request

Call any API endpoint with your data. You'll get back a Lightning invoice to pay.

2

Pay with Lightning

Pay the invoice with any Lightning wallet. Takes seconds, costs pennies.

3

Get Your Result

Re-send the same request with your proof of payment. Done.

Services & Pricing

All prices in Satoshis (1 Sat ~ $0.001 USD). Click any service for full instructions.

ServicePrice
Image Generation100-200 Sats/image
Text Generation5-15 Sats minimum
Video Generation50 Sats/unit
Video from Image100 Sats/sec
Music Generation200 Sats/song
Speech Transcription10 Sats/minute
Image Analysis21 Sats/image
3D Model Generation350 Sats/model
File Conversion100 Sats/file
OCR / Text Extraction10 Sats/page
SMS Servicevaries by country

Easiest Way: Use lnget

lnget is a free command-line tool that handles everything for you — request, payment, and authentication — in a single command.

Install it, then copy and paste any of these examples:

Generate an image:

lnget POST https://sats4ai.com/api/l402/image \
  --json '{"input":{"prompt":"A cat on the moon"},"model":"Best"}'

Generate text:

lnget POST https://sats4ai.com/api/l402/text-generation \
  --json '{"input":[{"role":"User","content":"Explain Bitcoin"}],"model":"Best"}'

Transcribe audio:

lnget POST https://sats4ai.com/api/l402/speech \
  --json '{"file":"<base64-audio>","type":"transcription","model":"Transcription"}'

lnget auto-pays the Lightning invoice and returns the result. No manual steps needed.

Manual Flow (Step by Step)

If you prefer to handle payments yourself (or want to understand how L402 works under the hood):

1

Send your request to the API endpoint

You'll get a 402 Payment Required response with a Lightning invoice and a macaroon (access token).

2

Pay the Lightning invoice

Use any Lightning wallet (Phoenix, Muun, Wallet of Satoshi, Alby, etc.). Save the preimage (proof of payment) your wallet gives you.

3

Re-send the exact same request with your payment proof

Add this header: Authorization: L402 <macaroon>:<preimage>

Click any service below for the exact copy-paste commands.

What is L402?

L402 is a standard that lets you pay for API access with Bitcoin instead of signing up for accounts and handing over personal data. It combines:

  • Lightning Network — instant Bitcoin payments (fractions of a penny)
  • Macaroons — tamper-proof access tokens (like a receipt)

The result: pay-per-use AI with full privacy. No accounts, no API keys, no credit cards, no monthly bills. You only pay for what you use, and we never know who you are.

Learn more about the L402 protocol

For Developers: All endpoints and pricing are available as machine-readable JSON at /.well-known/l402-services