Wire formats
Signed quotes, x402 payment payloads, receipts, and the ModelChallenge typed data, annotated field by field.
Four payloads carry the market's economics. Each one is signed, so each one is evidence: a quote that cannot be repudiated, a payment that cannot be forged, a receipt that cannot be rewritten, and a challenge that cannot be filed anonymously. Field lists below match the shipped schemas.
The signed standing quote
{
"quote_id": "q-3f9a1c72",
"provider_id": "minimax",
"model_class": "qwen3-72b-instruct",
"price_in": 210000, // USDC base units per 1M input tokens ($0.21/M)
"price_out": 680000, // per 1M output tokens ($0.68/M)
"capacity_rps": 8, // firm concurrent-request headroom
"max_context": 131072, // tokens
"valid_until": 1752241031, // unix seconds; TTL capped at 30s
// optional session (two-part tariff) fields:
"price_in_cached": 42000, // per 1M CACHED input tokens
"session_ttl_s": 600, // cache + rate-hold commitment, seconds
"sig": "0x..." // EIP-191 by the provider's registered key
}A quote is a firm commitment, not an indication: valid until its TTL (capped at 30 seconds), up to the stated capacity. The signature covers a pipe-joined string of every economic field in a fixed order; changing that order is a breaking protocol change. The two session fields append to the payload only when present, so a cache-blind quoter's signature is byte-identical to the V1 protocol. A quote carrying them is also a commitment to hold the cache and those rates for session_ttl_s.
The x402 handshake
HTTP/1.1 402 Payment Required
{
"accepts": [{
"scheme": "exact", // or "upto" (Permit2, settles actuals)
"network": "eip155:999", // HyperEVM mainnet; eip155:998 = testnet
"maxAmountRequired": "550", // worst case, USDC base units (string)
"payTo": "0x<treasury>",
"asset": "0x<usdc contract on this rail>",
"maxTimeoutSeconds": 60
}]
}
// retry the SAME request with the signed authorization:
PAYMENT-SIGNATURE: { "x402Version": 2, "scheme": "exact",
"network": "eip155:999", "payload": {
"authorization": {
"from": "0x<payer>",
"to": "0x<treasury>",
"value": "550", // exact: the signed amount settles
"validAfter": "1752240971", // unix seconds
"validBefore": "1752241091",
"nonce": "0x<random 32 bytes>"
},
"signature": "0x..." // EIP-712 TransferWithAuthorization (EIP-3009)
}}The accepts array is what makes the router chain-agnostic: each enabled settlement adapter contributes one entry and the client picks the rail it can pay on. Two schemes ride HyperEVM. exact is EIP-3009 transferWithAuthorization: the customer signs the exact worst case, the router submits and pays the gas, and any overage refunds at epoch close. upto rides Permit2: the customer signs a maximum and the router settles the metered actual at stream end, so charged equals settled by construction. In both cases the customer only ever signs typed data and never holds the gas token.
The usage receipt
GET /v1/receipts/:request_id
{
"request_id": "3d1c...",
"wallet": "0x<payer>",
"provider_id": "minimax",
"model_class": "qwen3-72b-instruct",
"in_tokens": 1043, // metered by the router's proxy, not claimed
"out_tokens": 512,
"cached_tokens": 0, // session turns: prefix billed at cached rate
"price_in": 230000, // CLEARED prices (second-score), base units/1M
"price_out": 710000,
"price_in_cached": null,
"charged": 603, // metered actuals, USDC base units
"authorized": 750, // the signed max; overage refunds
"payment_ref": "0x<tx>", // settlement reference
"refund_ref": null,
"ttft_ms": 412, // router-measured time to first token
"status": "ok",
"settlement": "landed",
"epoch_id": 472119, // this epoch's hash anchors on-chain
"session_id": null,
"quotes_competing": 4,
"created_at": 1752241034123
}This row is the atom of settlement: billing, payouts, refunds, analytics, and points all derive from it. Note what is absent: no prompt, no reply. The router keeps receipts, not transcripts. Each hour's records hash into an epoch anchor on-chain, so the row you fetch today is provably the row that settled.
The ModelChallenge typed data
{
"domain": { "name": "Omnious Model Integrity", "version": "1" },
"primaryType": "ModelChallenge",
"types": {
"ModelChallenge": [
{ "name": "purpose", "type": "string" },
{ "name": "wallet", "type": "address" },
{ "name": "receiptId", "type": "string" },
{ "name": "evidenceHash", "type": "bytes32" }
]
},
"message": {
"purpose": "Open an Omnious model integrity challenge",
"wallet": "0x<approved challenger>",
"receiptId": "<the challenged request id>",
"evidenceHash": "0x<sha256 over { receipt_id, summary, details }>"
}
}Filing a challenge means signing this over the receipt you dispute. The evidenceHash binds the signature to the exact evidence submitted, and the human-readable purpose line is what a wallet displays before you sign. Price the stake first with GET /v1/model-integrity/challenges/quote; the flow is described in Becoming a challenger.
680000 reads as $0.68 per million.- router/src/types.ts quote schema and signing payload order
- router/src/settle/eip3009.ts EIP-3009 typed data and payload shape
- router/src/records.ts the usage_records schema
- router/src/integrity.ts the ModelChallenge typed data