Economics & x402
What this node gives away, what it spends, what got paid, and how a 402 turns into a settled request.
Free-tier quota
What this node gives away: given_tokens,
quota_tokens per peer, window_hours (a sliding window, so it
tops back up), and per-peer usage. Enforced here, by the machine paying the
electricity — not by whoever is asking.
Spend cap
What this node spends on external APIs. Local inference is in neither meter — it costs nobody anything but your electricity.
Look up a receipt
Takes the completion id (chatcmpl-…) that came back with the answer,
and returns the settlement receipt plus the attestation.
The x402 payment flow
A request to a node with a wallet, without a valid credential, gets a
402 whose body is not an error string but a quote: how
much, to whom, on which network, and up to how many tokens.
// 402 response
{ "accepts": [{ "scheme": …, "network": …, "payTo": …, "maxAmountRequired": … }] }
After paying, the answer streams back and a final SSE event carries the proof:
| Field | What it proves |
|---|---|
paymentResponse | Somebody paid — the settlement receipt |
attestation | What this node served, signed with the payout wallet over the JCS form of everything except the signature |
attestationMissing | Present instead, with the reason, when no attestation could be produced |
outputHash
is over the text, not the chunking — so a provider that inflates the
gateway's chunk count by chopping the stream finer cannot move it. Recompute it
against the answer you actually received.402 without an accepts array is
a different thing entirely: your spend cap is exhausted. There is nothing to pay — a
limit was hit.