l402-kit is an open-source toolkit designed to enable Bitcoin Lightning payments for any API using the L402 protocol. It allows API providers to monetize endpoints by requiring payment via the Lightning Network, implementing a pay-per-call model without intermediaries, account creation, or traditional payment processors. The tool is aimed at both API developers seeking to sell access to their APIs and AI agents or automated clients that need to purchase API access autonomously.
The toolkit can be integrated with just three lines of code as middleware, returning a Lightning invoice and macaroon when a client hits a protected endpoint. Upon payment, access is granted instantly, typically settling in less than a second. l402-kit is compatible with TypeScript, Python, Go, and Rust, and can be installed via npm for JavaScript environments. It is described as AI-native, supporting use cases where machines pay machines, such as LLM wrappers, image generation, OCR APIs, and serverless compute. The system works natively with frameworks like LangChain and AutoGPT agents, allowing AI agents to pay for API calls without human intervention, subscriptions, or API keys.
3% to the project), or a self-hosted mode with 0% fee using their own Lightning node via providers like Blink, LNbits, or BTCPay. The managed mode requires only a Lightning Address and no node or wallet setup. The tool supports any Lightning Address, including those from Blink, Alby, Strike, and Wallet of Satoshi. Switching between managed and self-hosted modes requires only a single line of code change.
l402-kit is released under the MIT License. It is positioned as a solution for globally accessible, instant, accountless, and usage-based API monetization using Bitcoin Lightning payments, with no countries blocked and no chargeback risk. The toolkit is suitable for data APIs, content paywalls, and compute billing, offering a lightweight alternative to traditional payment processors.
l402-kit is an Infrastructure & Backend product. It enables developers to add Bitcoin Lightning-based pay-per-call monetization to APIs with minimal code and no intermediaries. l402-kit is an open-source project aimed at developers. The project is open source (MIT). The product ships for the web and the command line.
ShinyDapps builds and maintains l402-kit, and the product first shipped in 2026. The project is developed in the open on GitHub with 463 commits in the last 90 days. Across PulseGate's embedding index, l402-kit has few near neighbours, marking it as relatively distinct. Among its 5 catalogued features are lightning payments, API monetization, and Multi-language SDKs. The interface is available in 11 languages, including Arabic, German, and English. It exposes integrations via an MCP server and a public API.
Latest indexed changes and source events
l402kit.com discovered by the PulseGate indexer
Other apps tracked under the same category.