Inference, priced per call.
An OpenAI-compatible gateway that charges per completion in USDG. The shortest way to see a real x402 payment settle end to end.
An OpenAI-compatible gateway that charges per completion in USDG. Same request body as any Chat Completions endpoint, one difference: the first call comes back 402 with a price instead of 401 with a key error.
It is also the shortest way to watch a real payment settle. Fund a wallet, make one call, and read the transaction hash off the response header.
npx -y aeron-wallet address # fund with USDG
npx -y aeron-wallet pay https://inference.aeron.sh/v1/chat/completions \
'{"model":"deepseek/deepseek-chat","messages":[{"role":"user","content":"hi"}]}'Endpoints
| Endpoint | Paid | |
|---|---|---|
GET /v1/models | free | The catalog with prices. Over 400 models. |
POST /v1/chat/completions | paid | OpenAI-compatible, streaming supported. |
GET /ledger/stats | free | Public ledger: calls, revenue, distinct payers, recent rows. |
GET /healthz | free | Liveness and facilitator mode. |
Prices
One flat price per call, not per token — the exact scheme needs a fixed amount before the work happens, and nobody can know the token count in advance. The flat price is derived from the model’s per-token cost at a typical call (2,000 prompt, 1,000 completion tokens), plus margin, doubled for variance, floored at $0.001 and rounded up to a tenth of a cent.
The catalog refreshes from upstream on a cron, so GET /v1/models is the only price list worth trusting. A sample of what it returns today:
curl -s https://inference.aeron.sh/v1/models | jq '.data[] | {id, flat: .pricing.flat_call_usd}'
{"id":"deepseek/deepseek-v4-flash","flat":0.001}
{"id":"openai/gpt-5-mini","flat":0.006}
{"id":"anthropic/claude-haiku-4.5","flat":0.015}
{"id":"google/gemini-3.1-pro-preview","flat":0.034}Long calls can cost more upstream than the flat price collects. That is the gateway’s problem, not the caller’s: the price you were quoted in the 402 is the price you pay.
Paying without the wallet
The 402 body carries the offer. Sign it and retry — see signing it yourself in the wallet docs, or hand the whole flow to aeron-wallet.
curl -s -X POST https://inference.aeron.sh/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"deepseek/deepseek-chat","messages":[{"role":"user","content":"hi"}]}'
{
"x402Version": 1,
"error": "X-PAYMENT header is required",
"accepts": [{ "scheme": "exact", "network": "eip155:4663",
"maxAmountRequired": "4000", "payTo": "0x1b8e…80bd",
"asset": "0x5fc5…d168", "extra": {"name":"USDG","decimals":6} }]
}A successful paid call returns the completion plus X-PAYMENT-RESPONSE: base64 JSON holding the transaction hash. That header is your receipt — the same one Aeronscan indexes.
When it goes wrong
- Upstream failed before settlement —
502, and you are not charged. The authorization stays unspent. - Upstream delivered nothing (empty generation, provider error) — the call is recorded as unpaid and you are not charged.
- Settlement failed —
402with the reason. The completion is discarded rather than delivered unpaid. - Payment invalid —
402with the facilitator’s refusal reason and a fresh offer.
Streaming works: pass "stream": true and the response is passed through untouched while usage is metered from the tail.
Updated 1 September 2026. Everything on this page is read from the running services; report a drift at github.com/aeronlabs.