L402 API Programmatic Access
Integrate powerful AI tools into your applications using L402, a Lightning-native authentication and payment protocol.
What is L402?
L402 is a protocol that combines the Lightning Network's micropayment capabilities with Macaroons (flexible authorization tokens) to enable a new standard for paid API access. It allows services to charge per-use without requiring traditional user accounts, subscriptions, or credit card details.
- Pay-per-use: Only pay for what you consume.
- No Sign-ups: Access services without creating accounts or API keys upfront for many use-cases.
- Enhanced Privacy: Reduced data sharing compared to traditional authentication.
- Programmatic & Interoperable: Designed for machine-to-machine communication.
By integrating L402, Sats4AI offers a more private, efficient, and developer-friendly way to access AI functionalities.Learn more about L402
Get Started with Our L402 APIs
Select a service below to view detailed instructions on how to authenticate and make requests using the L402 protocol. Each guide provides `curl` examples and explains the request/response flow.
Image Generation
Generate images from text prompts. Learn how to make your initial request, pay the Lightning invoice, and retrieve your image.
Text Generation
Get AI-powered text completions or generate full narratives. Understand the L402 flow for conversational AI.
SMS Service
Send SMS messages programmatically. See how to authenticate and send messages using L402 micropayments.