API reference
The OpenAI-compatible surface plus the Omnious extensions: analytics, market data, integrity, points, orders.
The customer-facing API is OpenAI-compatible: POST /v1/chat/completions works as a drop-in base_url swap for existing apps and agent frameworks, with images and embeddings alongside. Payment rides the x402 flow. An unpaid request answers 402 Payment Required with an acceptsarray quoting the worst-case cost at the winner's cleared prices; the client signs a USDC authorization and retries the same request with the x402 v2 PAYMENT-SIGNATURE header. Verification takes about 100 ms and inference starts while settlement runs concurrently. Payload details are in Wire formats.
Auth in the table below: pay means an x402 payment signature, pub is a public read, key reads your own data via x-api-key, sig is a wallet typed-data signature, and provider is a quote signed by a registered provider key. Admin surfaces (/v1/admin/*) exist but are operator-token gated and not listed here.
| Endpoint | Auth | Purpose |
|---|---|---|
POST /v1/chat/completions | pay | OpenAI-compatible completions; the core paid surface |
POST /v1/images/generations | pay | paid image generation |
POST /v1/embeddings | pay | embeddings, billed input-only at the cleared price |
POST /v1/locks | pay | buy a forward price lock for a model class |
POST /v1/orders | pay | place a patient limit order |
GET /health | pub | router status, chain network, auction version |
GET /v1/models | pub | model classes with live depth and prices |
GET /v1/market/book | pub | anonymized ask ladder per class |
GET /v1/market/stats | pub | rolling clearing summary (24h window) |
GET /v1/market/snapshot | pub | full point-in-time market snapshot |
GET /v1/market/candles | pub | cleared-price OHLC and VWAP candles |
GET /v1/market/index | pub | composite price index and component weights |
GET /v1/receipts/:id | pub | the signed usage record for a request |
GET /v1/analytics/requests/:id | pub | reconstructed auction: rivals, counterfactuals, fee split |
GET /v1/analytics/sessions/:id | pub | per-turn session tape and cache discount captured |
GET /v1/analytics/market | pub | per-class cleared prices, HHI, latency |
GET /v1/analytics/providers/:id | pub | a provider's served volume and reliability |
GET /v1/analytics/dashboard | pub | bucketed chart feed |
GET /v1/analytics/leaderboard | pub | providers ranked by cleared volume |
GET /v1/model-integrity/claims/:id | pub | a provider's bonded model claim |
GET /v1/model-integrity/challengers/:wallet | pub | approved-challenger status for a wallet |
GET /v1/model-integrity/challenges/quote | pub | stake terms for challenging one receipt, before signing |
POST /v1/model-integrity/challenges | sig | open a points-staked challenge (approved challengers) |
GET /v1/points/:wallet | pub | S1 score: earned bps, tier, streak, rank, challenge record |
GET /v1/points/leaderboard | pub | the points board |
GET /v1/points/provider/:id | pub | serve-side points for a provider |
GET /v1/orders/:id | pub | order state: funding, resting, filled, expired |
POST /v1/orders/:id/cancel | sig | cancel a resting order; escrow refunds at epoch close |
GET /v1/locks/:id | pub | lock state: remaining budget, expiry |
GET /v1/sessions/:id | pub | session state and remaining budget |
POST /v1/sessions/:id/close | sig | close a session; unspent budget refunds |
POST /v1/keys | sig | mint an API key bound to your wallet |
GET /v1/keys/usage | key | per-key request and spend attribution |
POST /provider/quotes | provider | signed standing-quote ingest (the maker side) |
/v1/messages) and back before the metering tap, so metering, billing, analytics, and the customer never know which dialect the winning backend spoke. Customers always see the OpenAI surface.Every endpoint here has a typed method in the SDK and most have a CLI command.
- router/src/server.ts every route, in one file
- router/src/protocol.ts OpenAI to Anthropic translation