Veil402

Private payment and inference rails for AI agents — a VPN for AI inference and payments.

Veil402

Created At

ETHGlobal Mumbai

Project Description

Veil402 is a private layer for agentic payments and inference. It lets people and AI agents call models and pay per request, without trusting the provider with their data, handing over their identity, or exposing their spending on chain.

AI inference is missing three things. Verifiable inference: you can't know the right model ran, the bill is accurate, or your data stayed private, so you have only the provider's word. Private identity: paying means an account, an API key, KYC and a billing history. Private payments: on-chain x402 removes accounts, but a public chain exposes every payment, revealing an agent's strategy to anyone watching.

Veil402 solves all three behind one API key created and managed entirely on your device. A local daemon serves an OpenAI-compatible endpoint, so tools like Aider, OpenHands and Langflow work with no SDK, wallet or signup.

0G Private Compute provides verifiable inference. Models run inside TEEs, and each response is signed and checked against the provider's on-chain key. Prompts are HPKE-sealed to our AWS Nitro enclave, which meters usage itself, so neither the provider nor our host can read them.

A shielded pool provides private payments. Funds deposited on Hedera become private notes, and every spend is a zero-knowledge proof, so nothing links a deposit to a spend and no payment graph builds up.

Session-based escrow for x402 works like Lightning-style channels. An agent locks one note as a spending ceiling, makes many calls off chain with no gas per request, and settles once at the end, with the unused balance returned privately. Each session uses fresh keys, so sessions can't be linked.

How it's Made

Veil402 — private payment and inference rails for AI agents Think of it as a VPN for AI inference and payments. You get one OpenAI-compatible API key, created and managed entirely on your own device. No account at a provider, no API key generated on someone else’s site, no card, no identity.

The three things missing today

Verifiable inference. When you call a provider you cannot check that the model actually ran, that the model you paid for is the one that answered, that the token count on the bill is real, or that your data stayed confidential. A provider’s word isn’t enough.

Private payment. Paying for inference usually means exposing your identity — through an account, an API key tied to it, a payment method, and a billing history.

Payment privacy. On-chain 402 payments give you accessibility, but they expose the buyer, the seller, the amount, and the whole transaction history, permanently.

The three technologies we bring together

0G private compute — verifiable inference. Inference runs on 0G’s TEE providers, so the seller never reads your prompt and you get attestation that the work happened. We don’t replace that; we depend on it.

Shielded pool — private payments. Funds enter the pool as ERC-20 and become notes: commitments whose owner, value and asset are hidden inside a Poseidon hash. Spending a note requires a zero-knowledge proof that you know the preimage, without revealing it on chain. No deposit→spend link, no payment graph, no counterparty history.

Session-based escrow for x402 — Lightning-like channels for a session. An envelope is a locked note that funds one inference session. It reserves value from the pool, meters usage call by call off chain, and settles the remainder back when the session ends. Funds move only when work is proven, and the chain sees the open and the settle rather than every call.

How it works, end to end

Shield the funds. You deposit once. What lands on chain is a commitment — a leaf in a depth-20 Merkle tree. Owner, value and asset are inside the hash. Create an agent mandate. An OpenAI-compatible API key with its own spending budget and policies, and its own ledger. The key is bound to a budget, not to an identity. Prompt from any OpenAI-compatible tool. We run against Langflow, Aider and OpenHands with two fields changed — base URL and key. Prompts and answers are HPKE-sealed, so the relay sees ciphertext only. An AWS Nitro enclave runs the session and signs what it billed, so the seller is not the one doing the counting. Pay another agent privately. Agent B returns a price and a payment address (veil402:pay:v1:…). Agent A pays it as a single shielded transact, broadcast through a relay so no buyer address appears on chain. Agent B discovers the incoming note and can spend it. An observer watching the pool sees two commitments and two nullifiers and learns neither the sender, nor the recipient, nor the amount — while each agent’s console shows exactly what it is owed or has spent. Control and settlement without disclosure.

background image mobile

Join the mailing list

Get the latest news and updates