We launched the L402 Gateway. You can now take any existing REST API, point our gateway at it, set a price in satoshis, and get a public URL that wraps your endpoint in an L402 paywall. Every request pays you in sats via Lightning. You keep 90%. We handle the invoicing, the payment verification, and the proxy. You change nothing about your API.

This is live now at lightningfaucet.com/build/gateway.

The Problem

If you have built an API and want to charge for it, your options are not great. You can integrate Stripe, set up billing pages, manage API keys, handle subscription tiers, deal with failed payments, and build a customer dashboard. That is weeks of work before anyone pays you a cent.

Or you can implement L402 yourself. Run a Lightning node, mint Macaroons, handle the 402 challenge-response flow, verify preimages, manage payment state. It is elegant once it is running, but the setup cost keeps most developers from bothering.

The Gateway eliminates both paths. You register your API with us. We give you a URL. That URL is your monetized endpoint. Done.

How It Works

The flow is three steps.

Step one: register. Log into your operator account, go to the registration form at lightningfaucet.com/build/gateway/register, and fill in your API details. Name, description, upstream URL, HTTP method, price per request in sats, and optionally any auth headers your API needs. Hit "Test Connection" to verify we can reach your endpoint. Then submit.

Step two: share. You get back a gateway action name like l402_gateway_your_api_name. Agents and developers call it by POSTing to lightningfaucet.com/api/ with {"action": "l402_gateway_your_api_name"} in the JSON body -- the same pattern as every other L402 endpoint on the platform. Share the action name in your docs, add it to the L402 registry. Anyone who calls it gets the standard L402 flow: 402 response with a Lightning invoice, pay, get data.

Step three: get paid. Every time someone pays the invoice and accesses your API through the gateway, you earn sats. The platform takes 10% and credits the rest to your operator balance. Withdraw anytime to any Lightning wallet.

Your upstream API never changes. It still receives the same requests it always did. The gateway sits in front of it, handles all the L402 mechanics, and forwards authenticated requests to your endpoint. If your API requires auth headers, you pass them as a JSON object during registration (e.g., {"Authorization": "Bearer sk-abc123"}). We encrypt credentials with AES-256-GCM at rest and include them when proxying to your upstream. Your API can be completely private -- the gateway handles authentication on your behalf.\n\nBefore activating an endpoint, the gateway probes your upstream URL and requires a 2xx or 402 response. You can test this yourself with the Test Connection button on the registration form. Private and localhost IPs are blocked for upstream URLs as an SSRF protection measure.

What You Can Register

Any REST API that returns data over HTTP. Weather APIs, price feeds, translation services, AI inference endpoints, data lookups, content generators, anything with a URL that accepts requests and returns responses.

The gateway supports GET, POST, PUT, and DELETE methods. You set the HTTP method during registration. Most APIs will be GET or POST.

There are no restrictions on what your API does, as long as it is legal and responds to HTTP requests. The gateway does not inspect or modify the response payload. It proxies the request, proxies the response, and handles the payment layer in between.

Pricing

You set the price. Any amount from 1 to 100,000 sats per request. The platform takes 10%. You earn 90%.

That is the entire pricing model. No monthly fees. No setup costs. No minimum volume requirements. If nobody calls your API, you pay nothing. If a million agents call your API, you earn 90% of a million times your price.

The 10% covers Lightning invoice creation, payment verification, Macaroon management, request proxying, and the infrastructure that keeps the gateway running. It is the same rate whether your API costs 1 sat or 10,000 sats per request.

The Developer Dashboard

Once you have registered APIs, the dashboard at lightningfaucet.com/build/gateway/dashboard shows you everything. Each endpoint gets a card with its name, status, gateway URL, request count, and total revenue.

You can pause an endpoint if you need to take your API offline for maintenance. Paused endpoints return a standard error instead of proxying requests. Resume when you are ready. You can also delete endpoints you no longer want to offer.

The dashboard auto-refreshes every 30 seconds so you can watch requests come in. Stats update in real time as agents and developers use your gateway endpoints.

The Public Catalog

Every active gateway endpoint appears in the public catalog at lightningfaucet.com/build/gateway/catalog. This is a browsable grid where developers and AI agents can discover APIs available through the gateway.

The catalog shows each endpoint's name, description, price, and category. It does not show your upstream URL or auth headers. Those stay private. Developers see only the gateway URL, which is all they need to make requests.

Categories include Demo, Finance, Data, AI, and Other. You choose your category during registration. The catalog supports filtering by category so developers can find relevant APIs quickly. The catalog API is public and requires no authentication -- agents can discover endpoints programmatically by calling the gateway_catalog action.

Why This Matters for AI Agents

AI agents are already the primary consumers of L402 APIs. They use the MCP server or CLI tool to pay for API calls automatically as part of their workflows. The gateway makes it trivially easy for any developer to add their API to the ecosystem of services that agents can discover and pay for.

Before the gateway, offering an L402 API meant running your own Lightning infrastructure. Now it means filling out a form. The barrier to entry for API monetization just dropped to near zero.

This creates a flywheel. More APIs in the gateway means more useful services for agents. More useful services means more agents with funded wallets. More funded agents means more revenue for API developers. More revenue attracts more developers to list their APIs.

We are betting that the number of APIs behind L402 paywalls is about to grow dramatically, and the gateway is how we make that happen.

Getting Started

If you have an API you want to monetize, start here:

1. Create an operator account at lightningfaucet.com/ai-agents if you do not have one
2. Go to lightningfaucet.com/build/gateway/register
3. Fill in your API details and set your price
4. Share your gateway URL

If you are a developer or agent looking for APIs to use, browse the catalog at lightningfaucet.com/build/gateway/catalog. Every endpoint in the catalog works with the standard L402 flow and is accessible to any agent with a funded Lightning wallet.

The gateway is live. Register your first API and start earning sats per request.