Infernous
Permissionless AI Compute. Paid in Sats.
Created on 12th September 2026
•
Infernous
Permissionless AI Compute. Paid in Sats.
The problem Infernous solves
AI inference is becoming a useful building block for both people and autonomous software, but access to compute is still largely controlled by centralized platforms.
Most AI APIs require accounts, API keys, subscriptions, platform-specific billing, or dependence on a centralized provider.
At the same time, there are developers, organizations, and individuals with machines capable of running open-weight models. Their compute can provide useful inference, but turning that compute into a simple, permissionless service that machines can pay for is still difficult.
Infernos addresses both sides of this problem.
A compute provider can run an open-weight model and expose it through an Infernos gateway. A caller can request inference, receive a Lightning payment challenge, pay for the requested service in sats, and present cryptographic payment proof to unlock the inference capability.
This creates a direct economic relationship:
Provider supplies compute → Caller pays sats → Payment unlocks inference → Provider earns from the compute provided.
There is no requirement for a centralized account system, subscription, or platform-issued API key.
Infernos is designed to make this flow work across different Lightning environments, from local development and regtest to public test environments and eventually mainnet.
Challenges I ran into
Building Infernos required solving several challenges at the intersection of AI inference, Lightning payments, and authorization.
1. Lightning wallet setup and the real payment flow
One of the biggest practical challenges was getting a usable Lightning wallet environment running for development and testing. We experimented with browser-based Lightning wallets, Nostr Wallet Connect, and desktop wallet tooling. This exposed real-world friction around wallet availability, funding, permissions, connection configuration, and platform dependencies.
Instead of making the application depend on a single wallet implementation, we designed Infernos around a LightningBackend abstraction. This allowed us to keep the core payment protocol independent from the underlying Lightning implementation while using a local mock backend during development.
For the browser caller experience, we integrated a WebLN-compatible wallet flow so a user can receive an L402 challenge and authorize the Lightning payment from the browser.
This separation also gives Infernos a path toward different Lightning environments and implementations without changing the inference layer.
2. Making L402 payment proof actually verifiable
Our first cross-process implementation exposed an important problem: simply returning a successful payment response was not enough.
The server verifies that the preimage supplied by the caller hashes to the payment hash contained in the invoice and that the corresponding invoice has actually been settled. Our initial mock implementation generated payment information that could not be independently verified across processes.
We fixed this by making the mock Lightning backend maintain real invoice state, generate a cryptographically related preimage/payment hash pair, and expose a development payment endpoint. The CLI caller could then pay the invoice and receive the actual preimage required by the L402 verifier.
This allowed us to test the complete flow across separate processes:
HTTP 402 → Lightning invoice → payment → preimage → L402 verification → authorized inference
3. Designing payment as authorization, not just billing
Another challenge was deciding how payment should interact with access control.
We did not want Lightning to simply act as a payment counter placed in front of an ordinary AI API. Infernos therefore treats the L402 credential as an authorization mechanism. A valid payment proof is combined with scoped macaroon caveats such as the session, model, budget, expiration, and inference capability.
This led to the authorization model:
Payment → Proof → Capability → Bounded Action
The server verifies the credential before allowing the inference request to proceed.
4. Session budgets and concurrent requests
Supporting multi-step AI workloads introduced another problem: a caller should not be able to spend beyond the amount they authorized.
We implemented session budgets with atomic accounting so multiple requests cannot race past the configured spending limit. Each authorized inference debits the session budget and the remaining balance is returned to the caller.
This makes the payment layer useful for agents and automated workloads rather than only one-off human requests.
5. Streaming AI inference through the payment layer
We also needed to preserve the normal AI developer experience after payment authorization.
Infernos acts as a thin gateway in front of an OpenAI-compatible inference endpoint such as Ollama. Once the L402 credential is verified, the gateway forwards the request and supports streaming responses back to the caller.
The payment and authorization layer therefore remains mostly invisible to the inference application itself.
6. Debugging without compromising the privacy model
Because privacy is one of the project's design goals, we had to be careful about what the gateway logs while developing and debugging the system.
We explicitly audited the request path to avoid logging prompts or L402 credentials and ensured that authorization information is not forwarded to the inference backend unnecessarily.
The result is a design where no account is required, no API key has to be issued by a central platform, and prompts are not intentionally persisted by the gateway by default.
Tracks Applied (1)
Machine Money
Bitshala
