# Compute Finance — full reference > The first public reference price for AI compute. The Compute Price Index (CPI) tracks the USD cost of a fixed reference workload across a basket of model-family representatives from the major providers, each weighted equally — the Standard Compute Unit (SCU). Methodology is deterministic and reproducible from the public API; every value is published on-chain on Base and independently verifiable. Compute Finance is public data infrastructure for AI compute pricing. V1 ships a live oracle, a methodology and API documentation site, and a waitlist with referrals. `GET /v1/oracle/basket` and `GET /v1/oracle/models` carry $COMPUTE-denominated fields (`weiPricePerMillion`, `markedUpWeiPricePerMillion`) — see "Pricing fields explained" below for which of them carry the routing markup. Points have no monetary value. ## What the CPI is The Compute Price Index is a public benchmark that tracks the cost of AI inference across major providers. It produces a single equal-weighted reference price — the Standard Compute Unit (SCU) — calculated from a basket of model-family representatives. The CPI is a reference price, not an exchange, not a marketplace, and not a payment rail. It is a number, published on-chain when reconstituted, and freely queryable via a public REST API. ## Basket composition The basket holds one model per family across the major providers, each weighted equally; `GET /v1/oracle/basket` publishes the current membership and `GET /v1/oracle/latest` its size as `basketSize`. Every model family gets one slot, the latest version always. A model family is a provider's distinct product line (for example `openai.gpt` and `openai.gpt-mini` are different families). The latest released model in each family is its representative; on a new release the representative auto-rolls. The basket is updated with a new version number when composition or provider rate-card prices change. ## SCU formula The Standard Compute Unit is the equal-weight geometric mean of every family representative's cost over the reference workload — no tiers, no provider weights, no outlier caps. The reference workload is a fixed token count (published in the `referenceWorkload` field of `GET /v1/oracle/scu`). The full binding specification is served by `GET /v1/oracle/methodology`. The SCU is reconstitution-driven. It is published on-chain whenever the basket changes, either because a model is added, removed, or replaced, or because a provider updates a rate-card price. Both triggers produce a new on-chain version. There is no fixed cadence and no continuous off-chain feed. **Step 1 — Per-model cost.** For each model in the basket, compute the cost of the reference workload using the provider's published per-token pricing. Prices are USD per 1M tokens. ``` cost_m = (input_price_m × 0.001) + (output_price_m × 0.0005) ``` **Pricing source.** `GET /v1/oracle/basket` and `GET /v1/oracle/models` return four price numbers per model: `usdPricePerMillion` (the provider's list price in USD per 1M tokens, rounded to 2 decimals for display), `weiPricePerMillion` (the same price denominated in `$COMPUTE` per 1M tokens — the attested USD price divided by the peg), and `markedUpUsdPricePerMillion` / `markedUpWeiPricePerMillion` (that pair with the 5% routing markup, which is what an inference request is charged; the markup never enters the SCU). `peg = pegUsd` from `GET /v1/oracle/pricing`, and `usd_price = weiPricePerMillion × peg` converts back. On-chain source: `Treasury.computePriceUsdc()` on Base (contract `0xB77DA11C8eC91D3417aA87072DcDD971A9aF674d`). Exact SCU reproduction reads neither rounded field but the attested manifest: `GET /v1/oracle/manifest/{metadataHash}` returns `inputPriceUsd18PerM` and `outputPriceUsd18PerM` per family, in 18-decimal USD. **Step 2 — Equal-weight geometric mean.** The SCU is the geometric mean of all N model workload costs, each family weighted equally at 1/N. The Nth-root damping plus the one-family-one-slot rule provide gaming resistance by math — no outlier caps, no governance committee. ``` SCU = (∏ cost_m)^(1/N) for all m in the index ``` **Methodology versioning.** Every published revision permanently carries the methodology version that produced it (currently v1 = equal-weight geometric mean). The full changelog and per-version definitions are served by `GET /v1/oracle/methodology`; every `/v1/oracle/*` response also carries the `X-Methodology-Version` header reflecting the version in force now. The SCU is denominated in USD. The binding arithmetic uses a floor Nth root over integer 18-decimal USD values — defined precisely in the methodology document so any independent re-implementation reproduces the published SCU bit-for-bit. ## Governance - **Listing criteria.** Public GA + first-party USD pricing + in-scope text model + seasoning + liveness. Applied identically to all. - **Model family rule.** One slot per family, latest GA version auto-wins. No governance needed. - **Edge-case review.** Published, dated decision for family-vs-version edge cases. Stated reasoning. - **Reconstitution.** Additions and removals applied by the criteria. Logged. - **Price updates.** Reflected automatically from first-party price cards. Daily scan. - **Emergency trigger.** Any single model that moves price by more than the set threshold in 24 hours enters a short hold before the change is reflected. **Revision numbering.** The API's `revisionVersion` and `latestRevisionVersion` fields return the on-chain revision counter — a monotonically incrementing integer starting at 1 with the genesis revision. Each `/v1/oracle/*` response that includes `revisionVersion` reflects the on-chain revision number. ## On-chain verification All CPI pricing is recorded on-chain via the OracleRegistry contract on Base. Contract address, read functions, and Basescan verification instructions: https://oracle.compute.finance/llms-full.txt#on-chain-verification ## Public API All oracle endpoints are public and require no authentication. Read access is free and unrestricted. Base URL: `https://api.compute.finance`. ### OpenAPI specification The public API contract is published as an OpenAPI 3.x document. Use it to generate typed clients in any language (`openapi-generator`, `openapi-typescript`, `oapi-codegen`). | URL | Format | |---|---| | `https://api.compute.finance/v1/openapi.yaml` | YAML (canonical) | | `https://api.compute.finance/v1/openapi.json` | JSON | | `https://api.compute.finance/openapi.yaml` | YAML alias for agents probing conventional paths | | `https://api.compute.finance/openapi.json` | JSON alias | | `https://api.compute.finance/v1/docs` | Swagger UI for interactive exploration | All alias paths return the same byte-identical body — there is exactly one public spec. Responses include a `Link: <…>; rel="service-desc"` header pointing at the canonical URL, per RFC 8631. Scope: read-only Oracle (`/v1/oracle/*`) endpoints. The paid **Inference API** (OpenAI- and Anthropic-compatible) lives in a **separate published spec** at `https://api.compute.finance/v1/openapi.inference.yaml` with its own Swagger UI at `https://api.compute.finance/v1/docs/inference` — see the Inference API section below. Account / keys / treasury write surfaces remain internal. ### Endpoints | Method | Path | Description | |---|---|---| | GET | `/v1/oracle/scu` | Current SCU value, reference workload, methodology version | | GET | `/v1/oracle/models` | Catalog: basket models plus retired ex-members (`inBasket`, `retiredAtRevision`); retired models priced from the live catalog | | GET | `/v1/oracle/models/{key}` | Single catalog model (basket member or retired) by model id | | GET | `/v1/oracle/catalog` | Every tracked model with current price and index-member flag | | GET | `/v1/oracle/models/{key}/price-at?date={iso8601}` | Per-model input/output USD price effective at the requested timestamp (`source: "manifest"` for basket members, `source: "catalog"` otherwise) | | GET | `/v1/oracle/basket` | Full basket composition (models + SCU value + routing fee + revision/methodology version) | | GET | `/v1/oracle/history?from={iso8601}&to={iso8601}&granularity={per-revision\|daily\|weekly}&limit={int}` | SCU index time series; `Accept: text/csv` returns a CSV attachment | | GET | `/v1/oracle/models/{key}/price-history?from={iso8601}&to={iso8601}&granularity={per-revision\|daily\|weekly}&limit={int}` | Per-model input/output USD price time series; `Accept: text/csv` returns a CSV attachment | | GET | `/v1/oracle/reconstitutions` | History of basket reconstitutions with version, models, SCU delta | | GET | `/v1/oracle/revisions/{revision}` | Full OracleRevision record for a specific on-chain revision | | GET | `/v1/oracle/health` | Latest confirmed revision version and confirmation timestamp | | GET | `/v1/oracle/contract-metadata` | Live OracleRegistry identity — chainId, proxy address, on-chain `version()`, and deployed bytecode hash | | GET | `/v1/oracle/baseline` | Frozen SCU of the first confirmed revision — denominator for the inverse `computeIndex` purchasing-power view | | GET | `/v1/oracle/scu-at?date={iso8601}` | SCU value active at a given timestamp — step-function lookup of the latest confirmed revision with `publishedAt ≤ date` | | GET | `/v1/oracle/latest` | Latest confirmed revision summary (version, SCU, basket size) | | GET | `/v1/oracle/stats` | Aggregate protocol statistics | | GET | `/v1/oracle/activity?limit=50&offset=0` | Paginated activity feed | | GET | `/v1/oracle/pricing` | Per-model pricing **as billed** — every figure carries the routing markup, cache and reasoning included | | GET | `/v1/oracle/methodology` | Active methodology version + full changelog | | GET | `/v1/oracle/methodology/{version}` | Single methodology record (formula, reference workload, family rule, spec URL) | | GET | `/v1/oracle/manifest/{metadataHash}` | Content-addressed manifest for a confirmed revision (`metadataHash` = JCS+keccak256 of the whole document; `contentHash` = of the price projection) | | GET | `/v1/oracle/reconstitutions/export` | Reconstitution history as downloadable markdown | **Model identity.** Oracle responses identify a model by the canonical `vendor/model` id — the same id the Inference API routes on. The `{key}` path segment accepts that id (percent-encode the separator: `openai%2Fgpt-5.5`) or the bare model name; an unknown vendor is a `422 validation_failed`. Provenance strings stay verbatim: `familyRepresentatives[].modelKey`, the manifest, the revision basket, and the reconstitution log all keep the bare key the on-chain hashes cover, and `price-at` / `price-history` echo it as `manifestKey` whenever they answer from a manifest. Every `/v1/oracle/*` response carries the `X-Methodology-Version` header reflecting the methodology version in force at request time. **`/v1/oracle/models` vs `/v1/oracle/basket`**: The `/models` endpoint returns only the array of basket models with their pricing. The `/basket` endpoint returns the same models array PLUS basket-level metadata: SCU value in USD, routing fee rate, revision version, methodology version, and last-updated timestamp. ### Response shapes `GET /v1/oracle/scu` — current SCU value, reference workload, active methodology version, and the per-family breakdown as a discriminated union keyed by `methodologyVersion`. Empty basket returns 204. Example values are illustrative; fetch the live endpoint for current numbers. ```json { "scuUsd": 0.003301944577548741, "computeIndex": 73.73384151088473, "referenceWorkload": { "inputTokens": 1000, "outputTokens": 500 }, "methodologyVersion": 1, "breakdown": { "methodologyVersion": 1, "familyRepresentatives": [ { "family": "openai.gpt", "modelKey": "gpt-5.5", "inputPriceUsdPerMillion": 5.0, "outputPriceUsdPerMillion": 30.0, "blendedCostUsd": 0.02 } ] }, "updatedAt": "2026-08-27T15:35:16.947Z" } ``` `computeIndex` is the inverse purchasing-power index `(baseline / scuUsd) × 100`, a display/foundation-grade derived field — `100` at genesis, rises as compute gets cheaper. The baseline denominator is published at `/v1/oracle/baseline` and frozen at the first confirmed revision's SCU. `null` only when the baseline has not been published yet. `$COMPUTE` is that index: `OracleRegistry.getComputeIndex()` publishes the same reading on-chain in 18 decimals, and the peg `Treasury.computePriceUsdc()` follows it — scaled to USDC's six decimals and rewritten once the two drift more than 10 basis points apart — so one `$COMPUTE` is worth the index reading in USDC. `GET /v1/oracle/pricing` serves it off-chain as `pegUsd`, and every inference charge is a USD cost divided by it. `GET /v1/oracle/models` — top-level `models` array; each entry carries identity, family, integration status, both list and marked-up per-million pricing in $COMPUTE and USD, and per-model `cache` / `reasoning` multiplier blocks. `usdPricePerMillion` and the multiplier blocks are the vendor's own list prices; only `markedUpUsdPricePerMillion` / `markedUpWeiPricePerMillion` carry the routing markup, and `GET /v1/oracle/pricing` publishes every kind that way. The multiplier blocks are catalog/metering data — they do not enter the SCU formula. Example values are illustrative. ```json { "models": [ { "id": "openai/gpt-5.5", "displayName": "GPT-5.5", "provider": { "key": "openai", "name": "OpenAI" }, "family": "openai.gpt", "weiPricePerMillion": { "input": 0.06781146800693592, "output": 0.4068688080416155 }, "usdPricePerMillion": { "input": 5, "output": 30 }, "markedUpWeiPricePerMillion": { "input": 0.07120204140728272, "output": 0.42721224844369626 }, "markedUpUsdPricePerMillion": { "input": 5.25, "output": 31.5 }, "releasedAt": "2026-04-23T00:00:00.000Z", "cache": { "cachedInput": { "usdPerMillion": 0.5, "ratioOfInput": 0.1, "source": "catalog", "sourceUrl": null, "provenance": "verified", "createdAt": "2026-08-26T15:16:10.984Z" }, "cacheWrite5m": null, "cacheWrite1h": null, "read_multiplier": 0.1, "write_multiplier_5m": null, "write_multiplier_1h": null }, "reasoning": { "reasoningOutput": { "usdPerMillion": 30, "ratioOfInput": 6, "source": "catalog", "sourceUrl": null, "provenance": "verified", "createdAt": "2026-08-26T15:16:10.984Z" } }, "inBasket": true, "retiredAtRevision": null } ] } ``` **Field: `releasedAt`** — ISO 8601 timestamp of the model's public release; `null` if unknown. **Field: `cache`** — cached-input + cache-write multiplier block; each entry carries both `usdPerMillion` and `ratioOfInput`, plus flat `read_multiplier` / `write_multiplier_5m` / `write_multiplier_1h` shortcuts at the block level. `null` when the model has no cache multiplier data. **Field: `reasoning`** — reasoning-output multiplier block; `null` when the provider bills thinking tokens at the standard output rate (no distinct reasoning surcharge). Each `cache` / `reasoning` component carries a `provenance` mark of its own; the model's own `usdPricePerMillion` pair carries none here, because for a basket member it is the manifest-attested figure and for a retired ex-member it is the live-catalog figure — read `GET /v1/oracle/catalog` or `GET /v1/oracle/resolve` for the catalog's mark on a model's input and output. Both blocks are served from the live catalog (`source: "catalog"`, `sourceUrl: null`) and are never attested on-chain — the manifest carries basket `input`/`output` only. `createdAt` is the catalog observation time, or `null` when it is unknown. `GET /v1/oracle/catalog` — display/reporting-grade catalog of every tracked model. Each entry pins identity, provider, `sdkId` (the id this model answers to at its own vendor, which differs from the name in `modelKey` wherever the vendor spells its model differently — `anthropic/claude-opus-5.5` is `claude-opus-5-5` at Anthropic — and which is never what you name to the Inference API), family, the `indexMember` flag (current family representative in the latest confirmed manifest), the current input/output USD price per million tokens with the `observedAt` timestamp from the underlying live-catalog (`ModelPrice`) row, and the per-model `cache` / `reasoning` blocks when present. Models without a live catalog price are excluded. The series is capped at 1000 entries with `truncated: true` if exceeded. `Cache-Control: public, max-age=60`. Example values are illustrative. A model priced in context tiers also carries `contextTiers` — a ladder ascending by `fromInputTokens`, each rung with its own input and output USD price per million tokens; a flat-priced model omits the field and costs the same at every input size. The tier is selected from the whole input side of a request (prompt plus cache reads plus cache writes) over a half-open range, so an input landing exactly on a threshold takes that tier. `currentPrice` is the flat rate below the first threshold and the only price the SCU manifest attests. Every number carries a `provenance` mark saying how far it has been checked — `verified` (an operator recorded a vendor source for that number), `inferred` (derived from a sibling number or a vendor default, with no source recorded) or `promotional` (a discounted list price that bills exactly as shown and is expected to end). Marks are set by hand and hold as of the operator's last pass rather than as a live check against the vendor: a number that went on promotion and has not been re-marked still reads as it was. The mark rides on the number, not the model: `currentPrice.provenance` marks input and output separately, each `contextTiers` rung carries its own, and so does every `cache` / `reasoning` component. Every value bills exactly as shown — the mark weighs a number, it never changes it — and it never enters the SCU manifest or its hashes. ```json { "models": [ { "modelKey": "openai/gpt-5.5", "displayName": "GPT-5.5", "provider": { "key": "openai", "name": "OpenAI" }, "sdkId": "gpt-5.5", "family": "openai.gpt", "indexMember": true, "releasedAt": "2026-01-15T00:00:00.000Z", "currentPrice": { "inputPriceUsdPerMillion": 1.25, "outputPriceUsdPerMillion": 10.0, "provenance": { "input": "promotional", "output": "verified" }, "observedAt": "2026-06-10T08:30:00.000Z" }, "contextTiers": [ { "fromInputTokens": 200000, "inputPriceUsdPerMillion": 2.5, "outputPriceUsdPerMillion": 20.0, "provenance": "verified" } ], "cache": null, "reasoning": null } ], "truncated": false, "generatedAt": "2026-06-17T12:34:56.789Z" } ``` `GET /v1/oracle/models/{key}/price-at?date={iso8601}` — per-model input/output USD price effective at the requested timestamp. Response is a discriminated union keyed by `source`: `"manifest"` when the model is the family representative in the revision active at that date (cross-links `revisionVersion`, `methodologyVersion`, `metadataHash`, and `family` for downstream verification), or `"catalog"` when the model was not a basket member at that date — the live catalog's temporal history answers instead (step-function: the `ModelPrice` range covering the date) and `family` may be `null`. `observedAt` reflects when the price was recorded. `422 validation_failed` for malformed or future dates, `404 not_found` for untracked models, `404 not_found` when neither the attested manifest nor the live catalog has a price at that date. `Cache-Control: public, max-age=60`. Example values are illustrative. ```json { "source": "manifest", "modelKey": "openai/gpt-5.5", "manifestKey": "gpt-5.5", "date": "2026-06-15T12:00:00Z", "inputPriceUsdPerMillion": 1.25, "outputPriceUsdPerMillion": 10.0, "observedAt": "2026-06-11T10:00:00.000Z", "revisionVersion": 7, "methodologyVersion": 1, "metadataHash": "0x38551a40...", "family": "openai.gpt" } ``` `GET /v1/oracle/scu-at?date={iso8601}` — SCU value active at a given timestamp via step function. Resolves the latest confirmed revision with `publishedAt ≤ date` and returns its SCU, `methodologyVersion`, `revisionVersion`, `publishedAt`, and `metadataHash`. Monotonicity is non-strict — when two confirmed revisions share `publishedAt` the highest `revisionVersion` wins. `computeIndex` is derived as `(baseline.scuUsd / scuUsd) × 100`, the same formula as `/v1/oracle/scu` and `/v1/oracle/history` points. `204 No Content` when the requested date precedes the genesis revision. `422 validation_failed` for malformed or future dates and for date-only inputs without a time component. `Cache-Control: public, max-age=60`. Example values are illustrative. ```json { "at": "2026-06-20T12:00:00.000Z", "scuUsd": 0.002434650581587041, "scuUsd18": "2434650581587041", "computeIndex": 100, "revisionVersion": 1, "methodologyVersion": 1, "publishedAt": "2026-06-19T15:57:41.000Z", "metadataHash": "0x7ef31525a6edfa2fa7f36ffec40c885343eca392a2ea451f17f95573198d777b" } ``` ### Health — response shape ```json { "latestRevisionVersion": 6, "methodologyVersion": 1, "latestRevisionConfirmedAt": "2026-08-03T08:01:11.913Z", "lastSyncAt": "2026-08-27T15:15:15.207Z", "stale": false, "liveModelCount": 22, "emptyBasket": false, "basketRevisionVersion": 6, "pendingRevision": null } ``` `GET /v1/oracle/contract-metadata` — live identity of the deployed `OracleRegistry` proxy. Backend reads `version()` and `keccak256(eth_getCode(address))` over the standard RPC. `bytecodeHash` is `null` when the contract has no deployed code or when the RPC call fails. Backend caches the response for five minutes; `Cache-Control: public, max-age=300`. Role membership is not exposed: the deployed contract uses `AccessControl` without the `Enumerable` extension, so holders cannot be enumerated through the contract ABI — query the chain directly (BaseScan, event index) to inspect role grants. ```json { "chainId": 8453, "address": "0x1b91c0961928a14a2eD6c1985bC11aF1b302714D", "version": 1, "bytecodeHash": "0x9c5b0e1a8b9d7e2a3c1d4f5e6a7b8c9d0e1f2a3b4c5d6e7f8091a2b3c4d5e6f7", "checkedAt": "2026-06-19T11:00:00.000Z" } ``` `GET /v1/oracle/basket` — full basket composition: models array plus SCU value, routing fee rate, revision/methodology version, and last-updated timestamp. ```json { "models": [ { "id": "anthropic/claude-opus-5", "displayName": "Claude Opus 5", "provider": { "key": "anthropic", "name": "Anthropic" }, "family": "anthropic.claude-opus", "weiPricePerMillion": { "input": 0.06781146800693592, "output": 0.33905734003467963 }, "usdPricePerMillion": { "input": 5, "output": 25 }, "markedUpWeiPricePerMillion": { "input": 0.07120204140728272, "output": 0.3560102070364136 }, "markedUpUsdPricePerMillion": { "input": 5.25, "output": 26.25 }, "releasedAt": "2026-07-24T00:00:00.000Z", "cache": { "cachedInput": { "usdPerMillion": 0.5, "ratioOfInput": 0.1, "source": "catalog", "sourceUrl": null, "provenance": "verified", "createdAt": "2026-08-26T15:15:58.070Z" }, "cacheWrite5m": { "usdPerMillion": 6.25, "ratioOfInput": 1.25, "source": "catalog", "sourceUrl": null, "provenance": "verified", "createdAt": "2026-08-26T15:15:58.070Z" }, "cacheWrite1h": { "usdPerMillion": 10, "ratioOfInput": 2, "source": "catalog", "sourceUrl": null, "provenance": "verified", "createdAt": "2026-08-26T15:15:58.070Z" }, "read_multiplier": 0.1, "write_multiplier_5m": 1.25, "write_multiplier_1h": 2 }, "reasoning": { "reasoningOutput": { "usdPerMillion": 25, "ratioOfInput": 5, "source": "catalog", "sourceUrl": null, "provenance": "verified", "createdAt": "2026-08-26T15:15:58.070Z" } } } ], "scuUsd": 0.003301944577548741, "routingFeeRate": 0.05, "revisionVersion": 6, "methodologyVersion": 1, "lastUpdated": "2026-08-27T15:35:16.947Z" } ``` `GET /v1/oracle/methodology` — active methodology version and the full changelog (formula, family rule, reference workload, spec URL). ```json { "activeVersion": 1, "entries": [ { "version": 1, "title": "Equal-weight geometric mean of model-family representatives", "meanType": "geometric", "weighting": "equal-1-over-n", "familyRule": { "oneFamilyOneSlot": true, "familyKeyScheme": "provider.product-line", "representativeSelection": "latest-published-then-highest-revision" }, "referenceWorkload": { "inputTokens": 1000, "outputTokens": 500 }, "cacheReasoningInIndex": false, "formulaSummary": "SCU = (∏ cost_m)^(1/N) for all m in the index, equal weight 1/N; cost_m = inputUsdPerM × 0.001 + outputUsdPerM × 0.0005 in USD — no tiers, no provider weights, no outlier cap", "rationale": "Every model family counts equally toward the price: the Nth-root damping of the geometric mean plus the one-family-one-slot rule provide gaming resistance without tier weights or governed caps", "specUrl": "https://docs.compute.finance/methodology" } ] } ``` `GET /v1/oracle/history?from={iso8601}&to={iso8601}&granularity={per-revision|daily|weekly}&limit={int}` — SCU index time series over the requested range. `granularity` defaults to `per-revision`; `daily` and `weekly` buckets carry the last revision's value forward across empty buckets (step-function close). `limit` caps the series at 10000 points; oldest points are dropped first and `truncated: true` is set. Each point carries the revision and methodology version active at that bucket plus the `metadataHash` of the revision that produced it — fetch `GET /v1/oracle/manifest/{metadataHash}` to verify the per-family breakdown for that point. Set `Accept: text/csv` to download a spreadsheet-friendly CSV with columns `date,scuUsd,computeIndex,revisionVersion,methodologyVersion,metadataHash` instead of JSON. ```json { "from": "2026-06-19T15:57:41.000Z", "to": "2026-07-06T08:37:17.000Z", "granularity": "per-revision", "count": 2, "truncated": false, "data": [ { "date": "2026-06-19T15:57:41.000Z", "scuUsd": 0.002434650581587041, "computeIndex": 100, "revisionVersion": 1, "methodologyVersion": 1, "metadataHash": "0x7ef3…" }, { "date": "2026-07-06T08:37:17.000Z", "scuUsd": 0.002742184351464414, "computeIndex": 88.78508041543085, "revisionVersion": 2, "methodologyVersion": 1, "metadataHash": "0x467d…" } ] } ``` `GET /v1/oracle/models/{key}/price-history?from={iso8601}&to={iso8601}&granularity={per-revision|daily|weekly}&limit={int}` — input/output USD-per-million-token price time series; every point carries a `source`. A model that has appeared in at least one confirmed revision's basket is manifest-sourced (`source: "manifest"`, each point cross-linking `revisionVersion` / `methodologyVersion` / `metadataHash`), with the same range, granularity, limit, and `Accept: text/csv` semantics as `/v1/oracle/history`; `family` echoes the family slot the model occupies in its most recent appearance, and catchup revisions whose manifest is not yet available are surfaced in `unavailableRevisions`. Any other tracked model falls back to the live catalog's temporal history — `source: "catalog"`, one point per price change, `unavailableRevisions: []`, and `family` may be `null`. Models with neither a basket appearance nor a catalog price return `404 not_found`. ```json { "modelKey": "openai/gpt-5.5", "manifestKey": "gpt-5.5", "family": "openai.gpt", "from": "2026-06-19T15:57:41.000Z", "to": "2026-07-06T08:37:17.000Z", "granularity": "per-revision", "count": 2, "truncated": false, "unavailableRevisions": [], "data": [ { "date": "2026-06-19T15:57:41.000Z", "inputPriceUsdPerMillion": 5, "outputPriceUsdPerMillion": 30, "source": "manifest", "revisionVersion": 1, "methodologyVersion": 1, "metadataHash": "0x7ef3…" }, { "date": "2026-07-06T08:37:17.000Z", "inputPriceUsdPerMillion": 5, "outputPriceUsdPerMillion": 30, "source": "manifest", "revisionVersion": 2, "methodologyVersion": 1, "metadataHash": "0x467d…" } ] } ``` `GET /v1/oracle/revisions/{revision}` — full OracleRevision record for a specific on-chain revision. ```json { "revisionVersion": 1, "methodologyVersion": 1, "publishedAt": "2026-06-19T15:57:41.000Z", "publishedBlock": 31200000, "txHash": "0xabc…", "scuUsd": 0.002434650581587041, "scuUsd18": "2434650581587041", "basketSize": 18, "basket": { "schemaVersion": 1, "models": [ { "modelKey": "gpt-5.5", "family": "openai.gpt", "inputPrice": "67811468006935924", "outputPrice": "406868808041615515", "displayName": "GPT-5.5", "providerKey": "openai", "sdkId": "gpt-5.5" } ] }, "status": "CONFIRMED", "confirmedAt": "2026-06-19T15:57:41.726Z", "manifestUrl": "/v1/oracle/manifest/0x…" } ``` `GET /v1/oracle/reconstitutions` — reconstitution event log with per-event change details. ```json { "entries": [ { "id": "recon-1", "revisionVersion": 1, "methodologyVersion": 1, "previousVersion": null, "publishedAt": "2026-06-19T15:57:41.000Z", "summary": "Inception with 18 families", "scuBefore": null, "scuAfter": 0.002434650581587041, "changes": [ { "type": "ModelAdded", "modelKey": "gpt-5.5", "description": "Added gpt-5.5 to the basket" }, { "type": "ModelAdded", "modelKey": "claude-opus-5", "description": "Added claude-opus-5 to the basket" } ], "txHash": "0xabc123..." } ] } ``` ### Rate limits The public oracle API is rate-limited to **120 requests per minute per IP** (burst 120). A short-term cap of 5 requests per second and a medium-term cap of 20 requests per 10 seconds also apply to protect the backend. Every admitted response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers (from the NestJS Throttler). Clients that exceed the limit receive `429 rate_limited` with a `Retry-After` header giving the seconds to wait — the longest wait when several windows refused — repeated in the body as `details.retryAfterSeconds` beside `details.scope` (`address` for an anonymous caller, whose network address is its only allowance), and with no `X-RateLimit-*` headers. The SCU updates on reconstitution, so polling more often than once per minute is not useful. **`/v1/points`** — the points and achievements API requires CF ID JWT authentication and is not yet part of the public API surface. It will be documented when publicly available. ## Canonical sources - **Live oracle dashboard** — https://oracle.compute.finance (current SCU, basket table, SCU history, on-chain verification links). - **Methodology and API docs** — https://docs.compute.finance (full formula, basket rules, API reference with code examples, on-chain verification instructions). - **Plain-markdown docs (for RAG ingestion)** — https://docs.compute.finance/index.html.md and https://oracle.compute.finance/index.html.md. - **Disclaimer and V1 scope** — https://compute.finance/disclaimer. - **Terms of Service** — https://compute.finance/terms. - **Privacy Policy** — https://compute.finance/privacy. - **Cookie Policy** — https://compute.finance/cookies. ## Inference API (paid, `ct_live_*` auth) The Oracle documented above is one of two published products. The second is the **Inference API** — a paid, OpenAI- and Anthropic-compatible inference gateway that routes over pooled provider capacity or an admitted private endpoint and bills against `$COMPUTE` held in BuyerEscrow — a catalogue model at the metered rate the Oracle publishes, a supplier's model at the price version its pool accepted. It is documented in a **separate OpenAPI spec** because it is a distinct product with its own auth model, rate-limits, and audience (paying developers using the official OpenAI / Anthropic SDKs). - **OpenAPI (YAML)** — https://api.compute.finance/v1/openapi.inference.yaml - **OpenAPI (JSON)** — https://api.compute.finance/v1/openapi.inference.json - **Swagger UI** — https://api.compute.finance/v1/docs/inference - **Human reference, quickstarts, error catalog** — https://docs.compute.finance/#inference-api - **Get a key** — https://compute.finance/dashboard/api-keys **Three drop-in wire formats.** `POST /v1/chat/completions` speaks the OpenAI Chat Completions wire format (`tools`, `tool_choice`, `response_format`, streaming SSE). `POST /v1/messages` speaks the Anthropic Messages API wire format (`tools`, `tool_choice`, streaming with `event: message_start` / `content_block_delta` / `message_delta` / `message_stop`). `POST /v1/responses` speaks the OpenAI Responses wire format for coding clients such as Codex (full history in `input` on every turn, `stream: true` with `event:`-named Responses events); `model` must name a model, and a supplier's model whose declaration lists the `responses` operation is served natively by its endpoint, every other model over chat completions. Point the official `openai` or `@anthropic-ai/sdk` at Compute Finance by changing only the base URL and passing a `ct_live_*` key — each SDK's default authentication header works unchanged. **Auxiliary endpoints in the same spec.** - `GET /v1/models` — OpenAI-format model list (`id`, `owned_by`, `displayName`, `maxInputTokens`). `id` has the form `vendor/model` and is the identifier the Inference API routes and bills on; `owned_by` carries the same vendor slug. See "Integration contracts" below for the full naming and selection contract. The key is optional (`Authorization: Bearer ct_live_*` or `x-api-key`): without one the list is the public catalogue, cached publicly; with a key it also lists the private models of the key's pool, while the key's account owns or belongs to that pool — each as `handle/alias`, owned by the supplier's handle, with its operations, limits, `availability`, `eligibleUpToInputTokens` and `pricing.buyer` (USD per million tokens, routing markup included) — narrows both to the key's `allowedModels`, names the universe it listed in `scope` (`pool`, `public`, or `detached` when the key's account left its pool and nothing private is listed) and is cached privately (`Cache-Control: private, max-age=10`, `Vary: Authorization, X-Api-Key`). An invalid or revoked key returns `401` and a frozen key `403 api_key_frozen` instead of the public list. - `GET /v1/models/availability` — which catalogue models can serve a request right now: `{ computedAt, ttlSeconds, models: [{ id, routable }], auto }`, where `id` is the same canonical `vendor/model` id `GET /v1/models` publishes and `auto` names the model the `auto` routing directive resolves to from the operator's preference list right now (it can be `null`). Scope follows the caller: no `Authorization` header answers for the public supply, a `ct_live_*` key bound to a private pool answers for that pool alone while the key's account owns or belongs to it (`scope: pool`, with the models suppliers offer to the pool listed under their `handle/alias` ids and an `availability` each), a key whose account no longer does reads `scope: detached` with nothing routable, and the request carries no pool parameter, so no caller can ask about another pool. An invalid key returns `401 invalid_api_key` and a frozen key `403 api_key_frozen` instead of the public answer. Recomputed at most once every 10 seconds, echoed as `ttlSeconds`. Advisory, not a gate — the map is true as of `computedAt`, and a request sent afterwards can still fail with its own error. Ordinary rate limit. - `GET /v1/usage` — the account's balance and cumulative spend; the calling key's own `dailyLimit` / `monthlyLimit` and `dailyUsed` / `monthlyUsed`; `dailyRemaining` and `monthlyRemaining` as the tighter of the key's and the account's, with `weeklyRemaining` the account's because a weekly cap exists only there; plus the account's cumulative prompt-cache tokens: `cachedInputTokens` (reads), `cacheWrite5mTokens` and `cacheWrite1hTokens` (writes, split by lifetime because the two are priced separately). Each cache counter is `null` until at least one settled request on the account recorded a non-zero count of that kind; the counters are incremented from the same breakdown the receipt stores — the token counts the charges were computed from. `ct_live_*` auth. - `GET /v1/inference/estimate` — pre-flight cost preview `(model, promptTokens, completionTokens, reasoningRequested, toolsPresent, routing_bias) → resolvedModel, creditsCost, creditsWei, usdCost, reservedWei, tierFromInputTokens`. `reservedWei` is the hold the charge is taken from. `tierFromInputTokens` names the context tier the quote was priced at and is `null` on a flat-priced model. The quote is advisory — it prices the token counts passed in, and the bill is always the counts the provider reports. `model` defaults to `auto` and is then quoted at the model the exchange chooses for the request you describe — the same per-request choice the send path runs — so describe it with `promptTokens`, `reasoningRequested` and `toolsPresent` (`true` or `false`, nothing else parses) and lean it with `routing_bias`, which is `422` beside a named model because there is no choice to lean. A named model asked for reasoning or tools it cannot serve is refused with `422`, exactly as the send answers the same request — a catalogue model reasons where its reasoning output is priced and takes tools where its provider does, a supplier's model has the capabilities its declaration of the chat completions operation lists. `X-Model-Chooser` on the response names what decided: `engine`, `list` or `degraded`. Two things the quote cannot see still move the send — a conversation already pinned to a model is served that model, and a share of `auto` traffic is held on the operator's order as a control arm — and the hold covers the costliest candidate, so a different model answering never costs more than was held; name a model to quote exactly what will run; `422` for an unknown model, `503` when no model has serving capacity or the stored operator route list cannot be read — the second case clears only on operator action, so name a model explicitly instead of retrying. The key is optional (`Authorization: Bearer ct_live_*` or `x-api-key`); with one the quote answers as that key's send would — a model outside its `allowedModels` is `403 model_restricted` and `auto` walks only the models they grant, a key whose account no longer owns or belongs to its pool is `403 forbidden`, and a `handle/alias` the key's pool is offered is quoted at the supplier's price plus the routing fee, output at most its declared maximum, with the charge, `tierFromInputTokens` and `reservedWei` priced at `promptTokens` × its declared input reserve ratio, or refused with `422 offer_unavailable` where the send would be; `resolvedModel` then names that `handle/alias`. The send scales only the prompt's content by that ratio and adds the chat framing unscaled, so such a quote sits slightly above the real hold — by up to (reserve ratio − 1) × the framing tokens — and near the start of a context tier can price one tier up, or refuse a request the send admits. Without a key such an id is an unknown model, and an invalid or revoked key returns `401`, a frozen one `403`. Rate-limited to 10 req/s. **Auth.** `Authorization: Bearer ct_live_*` is accepted on every endpoint. `POST /v1/messages`, `GET /v1/models`, `GET /v1/models/availability` and `GET /v1/inference/estimate` additionally accept `x-api-key: ct_live_*` so the official `@anthropic-ai/sdk` works with only a base-URL swap. Frozen keys → 403 `api_key_frozen`, revoked → 401 `api_key_revoked`, unknown → 401 `invalid_api_key`. **First request.** Two things must exist before any snippet works: an account and a balance on it. Signing in by email or by wallet creates the account; its `$COMPUTE` balance is topped up at https://compute.finance/dashboard/ai-balance by card, by swapping USDC from a connected wallet, or in stablecoins (USDC, USDT or USDe) under Add funds → Stablecoins. From there, issue a key at https://compute.finance/dashboard/api-keys and run the cURL or `openai`-Python snippet at https://docs.compute.finance/#inference-first-request with the key in place of `ct_live_...`. The TypeScript and `anthropic` snippets are at https://docs.compute.finance/#inference-sdks; each label names the SDK version its snippet is pinned to. **Keys.** Issued from https://compute.finance/dashboard/api-keys with an optional label, group, pool and daily / monthly USD spending caps — every field optional, and label and caps editable afterwards. Issuance is free and never checks the balance. The raw key comes back exactly once, at creation — only its SHA-256 hash is stored, and the list afterwards identifies each key by the short `keyPrefix` it returns, so a lost key is replaced rather than recovered. A key can also be held to a subset of the catalogue: name the models under `allowedModels` at issue time and change the list later from the same page — the list replaces the previous one whole, an empty list lifts the restriction, each entry names a catalogue model by its `vendor/model` id or the vendor's own SDK id and is stored as the `vendor/model` id, a spelling the catalogue does not hold is refused with `422 validation_failed` naming it, and at most 50 entries survive once duplicate spellings collapse; a key bound to a private pool can also name, by its `handle/alias` id, a model the pool admits from a supplier's offer — the ids `GET /v1/models` lists under that key — and any other `handle/alias` is refused the same way; the catalogue is a superset of `GET /v1/models`, so a model can be allowed before it is listed there, and a request naming a model outside the list returns `403 model_restricted` rather than being routed to a model the key may reach. Freezing is reversible from the same page; revoking is permanent and a revoked key can be neither restored nor edited. A state change binds from the next request onward — a request already streaming runs to its end. Balance is held on the account, not on the key: every key of an account spends the same `$COMPUTE` balance, per-key daily and monthly caps only bound that key's share of it (`429 spending_limit_reached` on exceeding one, a request in flight counting at its reserved amount until it settles), and a key issued on an unfunded account authenticates and then fails its first request with `402 insufficient_balance` — top up at https://compute.finance/dashboard/ai-balance first. **Parameter fidelity.** Every parameter `/v1/chat/completions` and `/v1/messages` accept either takes effect, returns `422 validation_failed` naming it, or is ignored under a published policy — never a silent no-op, and never a raw vendor `400` for a value the exchange could refuse itself. `/v1/responses` accepts a closed grammar and answers anything outside it with a `422` naming it: `validation_failed`, or `operation_unsupported`, `history_unsupported` or `history_unavailable` for a feature, a stored state or a history the exchange cannot serve. Anthropic-served models expose no equivalent for `frequency_penalty`, `presence_penalty`, `seed`, `logit_bias`, `logprobs` and `top_logprobs`, so those are dropped and the request is served; on every other provider they are forwarded and the vendor decides. `tools`, `tool_choice` and `parallel_tool_calls` sent without a non-empty `tools` list govern nothing and are dropped. Current Claude models accept `temperature` only at `1.0` and `top_p` only at `0.99` or above, so any other value is refused naming the accepted one; `top_k` is accepted nowhere, because this exchange has no wire field to carry it. `user` — and `metadata.user_id` on `/v1/messages` — reaches every provider as a stable, irreversible fingerprint of the identifier and your account, computed before the request leaves the exchange (or is dropped entirely where the operator has configured no fingerprint key), so a vendor can attribute repeat abuse to one end user instead of banning the whole contributor key while the identifier you send reaches no third party. Another account sending the same identifier gets an unrelated marker, so a vendor can neither link the two nor carry a ban from one to the other. **Reasoning.** Two controls switch reasoning on and map onto the same provider wiring: `reasoning_effort` (`low` / `medium` / `high`) and the structured `reasoning` object of the OpenRouter convention (`effort`, `max_tokens` 1024–200000, `enabled`, `exclude`), so an OpenRouter-native client works unchanged. Any `reasoning` object without `enabled: false` switches reasoning on — a bare `{}` and `{"exclude": true}` both run at effort `medium` and are billed for the thinking tokens they generate. Contradictory values across the two controls are `422 validation_failed` naming both fields, never a silent priority. The effort level becomes a thinking budget as a share of `max_tokens` (`max_completion_tokens` wins when both are sent; default 4096) — `low` 20%, `medium` 50%, `high` 80% — floored at Anthropic's 1024-token minimum and required to stay below `max_tokens`, checked before the request reaches a provider and before any credits move. Reasoning is available on a catalogue model exactly where its reasoning output is priced in the catalogue, and on a supplier's model where its declaration lists reasoning for the operation called; a single named model without it returns `422 validation_failed`, and inside a `models[]` list such an entry is skipped. For catalogue models `GET /v1/oracle/models` and `GET /v1/oracle/catalog` return a `reasoning.reasoningOutput` price block for exactly the models that can reason and `reasoning: null` for the rest; a supplier's model lists its capabilities per operation in `GET /v1/models` sent with the key. Output surfaces as a `reasoning` field on the assistant message and `delta.reasoning` on streaming chunks, under that name on every provider — a model whose own API returns its thinking under `reasoning_content` is renamed before the response leaves the exchange, streaming and non-streaming alike, and `exclude` withholds it just the same; on `/v1/messages` the native `thinking` parameter sets the same budget under the same rules (`{"type":"disabled"}` forwards no thinking parameter at all) and reasoning returns as `thinking` content blocks with `thinking_delta` / `signature_delta` stream events. Message content blocks accept `text`, `tool_use` and `tool_result`; a `thinking` block in an assistant turn is rejected with `422 validation_failed`, so strip thinking blocks before replaying an assistant turn. With `reasoning.exclude: true` the model still reasons and the tokens are still billed — only the output is withheld. Reasoning tokens are output tokens: counted in `completion_tokens`, billed at the model's output rate, with no separate reasoning charge. **Prompt caching.** On `/v1/chat/completions` a message's `content` is either a string or an array of up to 50 text parts (`{"type":"text","text":"…"}`), and a part of any other type — `image_url` and the rest — is refused with `422 validation_failed` naming the offending part type; on `/v1/messages` a message's `content` is either a string or up to 200 blocks of type `text`, `tool_use` or `tool_result`, `system` is either a string or up to 20 `text` blocks, a `tool_result` holds up to 50 `text` blocks, and any other block type is refused the same way, naming it. Every text part counts toward the input estimate that sizes the reservation and toward the bill. A text part may carry `cache_control: {"type":"ephemeral"}` with an optional `ttl` of `"5m"` (the default) or `"1h"`; any other value is refused before the request is priced. The marker is accepted on a message text part, on a `system` text block, on a text block inside a `tool_result`, and on a `tools[]` entry, in the OpenAI wire format (`{"type":"text","text":"…","cache_control":{"type":"ephemeral","ttl":"1h"}}`) and in Anthropic's native block form alike; it is refused on a part with no text — a breakpoint must ride text — and on the `tool_result` block itself rather than on a text block inside it. How many breakpoints one request may carry is capped by the provider; above that cap the provider refuses the request, and its own explanation comes back in the error message. The marker reaches Anthropic-served models in Anthropic's own block form; on every other provider the text parts are joined into one string and the marker is removed before the call — the request is served normally, with no error and no warning. Those vendors may still cache implicitly: where a vendor reports the hit in the usage shape the exchange reads for that vendor it is billed at the model's cache-read price, and where a vendor reports a hit in any other shape, those tokens are billed as fresh input. A cache write is billed at the model's cache-write price for the `ttl` requested (`5m` and `1h` are priced separately) and a later hit at its cache-read price, both under the same routing markup as input and output. Cache usage comes back in the wire format you called: `usage.prompt_tokens_details.cached_tokens` on `/v1/chat/completions`, `usage.cache_read_input_tokens` with writes under `usage.cache_creation.ephemeral_5m_input_tokens` / `ephemeral_1h_input_tokens` on `/v1/messages`. `GET /v1/inference/estimate` is not cache-aware: a hit is not knowable before the request runs, so the quote prices the whole input as fresh. `GET /v1/usage` reports the same tokens cumulatively for the account behind the key — `cachedInputTokens` for reads, `cacheWrite5mTokens` and `cacheWrite1hTokens` for writes at each lifetime. Each is `null` until at least one settled request on the account recorded a non-zero count of that kind, so an account that has never used caching carries `null` for all three, and the counters are incremented from the same breakdown the receipt stores: exactly the token counts the charges were computed from. Both write lifetimes collapse into `usage.prompt_tokens_details.cache_creation_tokens` on `/v1/chat/completions`, so the two cumulative write counters reconcile per request only on `/v1/messages`, which splits them. **Billing.** Every request reserves credits from the buyer's `$COMPUTE` balance based on an input-token estimate, then settles against actual token usage from the provider. A model may carry a ladder of context tiers — ordered input-token thresholds, each with its own input and output price — selected by the whole input side of the request (prompt plus cache reads plus cache writes), with an input landing exactly on a threshold priced at the higher tier. Settlement re-selects the tier from the token counts the provider reported and is what the buyer pays; the reservation's tier only sets how much was held. A cache or reasoning price the catalogue attests is single-level, but a kind it does not price separately is billed at its side's rate, that side's context tier included. A flat-priced model — one with no ladder — costs the same at every length. The input estimate that sizes the reservation counts the message text, the tool schema and response format, and the per-message chat framing the provider wraps every turn in. Where the request names a model whose provider publishes a token counter, the estimate is that vendor's count of the request — an Anthropic model is counted by Anthropic, and the chat framing is left off because that count already carries it. Otherwise the count comes from the `o200k_base` BPE vocabulary at a pinned tokenizer version, scaled into the target model's vocabulary by that vendor's fixed ratio, so the same request reserves the same amount above a small minimum floor and outside the rare fallback where the vocabulary cannot be loaded; `auto` is always counted this way, since the serving model is picked after the hold is taken, and so is a vendor count that declines or times out. Each candidate model is counted in its own vocabulary and the reservation is held at the costliest of them, which makes the estimate advisory. The bill is always the token counts the provider reported. `GET /v1/inference/estimate` tokenizes nothing: it prices the `promptTokens` / `completionTokens` passed to it, so counting the prompt with `o200k_base` and adding 4 tokens per message plus 3 for the reply quotes a locally counted reservation — a named model its vendor counts holds a different amount, reproducible only from that vendor's own count, and a supplier's model quotes slightly above its hold, because the quote scales the framing by the model's input reserve ratio along with the content. A supplier's model in a private pool is billed only by the usage its endpoint reports with the answer, never above the cap held for it before dispatch — see "Private endpoints" below. Response headers `X-Model-Used`, `X-Model-Requested`, `X-Fallback-Used`, `X-Model-Chooser` (on every `auto` answer — `engine`, `pin`, `list` or `degraded`, naming what picked the model), `X-Provider`, `X-Routing-Strategy`, `X-Request-Id`, `X-Compute-Used`, `X-Compute-Remaining`, `X-Key-{Daily,Monthly}-Remaining`, `X-RateLimit-{Limit,Remaining,Reset}` report the post-request state; the key cap remainders are the snapshot the request was admitted against, so they exclude the request in flight. The streaming final chunk mirrors the settled compute values into the body as `x_credits_used` / `x_credits_remaining` / `x_ratelimit_requests_remaining`. **Rate limits.** Per-key daily / monthly `$COMPUTE` spending caps, surfaced in `X-Key-*-Remaining` headers, plus daily / weekly / monthly caps on the account — weekly is account-only and reported by `GET /v1/usage` as `weeklyRemaining`; exceeding any returns `429 spending_limit_reached` with `details: { scope, cap }`, a request in flight counting against them at its reserved amount until it settles. Per-pool RPM / TPM ceilings return `429 rate_limited` with `details.scope: "pool"`, and a pool's model served by a supplier's own endpoint is also bounded by that endpoint's concurrency, RPM and TPM limits — `429 rate_limited` with `details.scope: "endpoint"` when the model is requested alone, the next `models[]` entry otherwise. Inference endpoints are not subject to a global IP throttle — per-request billing plus per-pool caps and supplier endpoint limits are the effective ceilings, and an account with nothing left to spend is refused with `402 insufficient_balance` before its request is estimated, so a caller who cannot pay never reaches the tokenizer. **Request size.** A request body may be up to 4194304 bytes (4 MiB) — the room the largest context the exchange serves, 1048576 input tokens, needs on the wire; a larger body is refused with `413` before it is parsed, on `/v1/chat/completions`, `/v1/messages` and `/v1/responses` alike. A model may additionally declare the context window its vendor actually serves: a request whose estimated input exceeds it fails with `422 validation_failed` naming the model and its limit, before the request reaches a provider and before any `$COMPUTE` is reserved, so an oversized attempt costs nothing. On `/v1/responses` a streamed request gets that answer in-band instead — `200` with `response.failed` carrying `context_length_exceeded`, the code that tells a Responses client its context is full, so it can trim or compact its history, and the one it also receives when the upstream itself refuses the input as too long; an unstreamed request keeps the `422`. A model that declares no maximum is bounded only by the body ceiling, and `GET /v1/inference/estimate` runs the same check so a request can be sized before it is sent. Every declared window is published as `maxInputTokens` on `GET /v1/models` and in the full catalog at `GET /v1/oracle/catalog`, absent on a model that declares none. Inside a `models[]` list an entry that cannot be served right now is skipped, but an input too long for an entry is not: the length is a property of the request, so the request fails naming that entry rather than falling through to a model the caller did not ask for. Only `model: "auto"` narrows on length — there the exchange picked the candidates, so it routes to one whose window holds the request and returns `422` only when none does. **Errors.** Shared envelope `{ error: { message, type, code, param?, details?, issues? } }`. Full catalog: https://docs.compute.finance/#inference-errors. ### Responses API **Two ways to serve.** `POST /v1/responses` serves a named model — `auto` is refused — in one of two modes its declaration decides and the request never does. **Native**: a supplier's model whose declaration lists the Responses operation; the request goes to the endpoint's own `/responses` with `store: false`, and its events come back with `id`, `model` and `usage` set by the exchange. **Mapped**: every other model, catalogue models included; the request is translated into a chat completion and the answer back into Responses events. What each mode accepts: | Part of the request | Native | Mapped | | --- | --- | --- | | Fields | `model`, `input`, `instructions`, `tools`, `tool_choice`, `parallel_tool_calls`, `reasoning`, `text`, `max_output_tokens`, `store`, `include`, `stream`, `stream_options`, `prompt_cache_key`, `metadata`, `client_metadata`, `user`, `truncation`, `service_tier` | `model`, `input`, `instructions`, `tools`, `tool_choice`, `parallel_tool_calls`, `reasoning`, `text`, `max_output_tokens`, `store`, `include`, `stream`, `stream_options`, `prompt_cache_key`, `metadata`, `client_metadata`, `user`, `truncation`, `service_tier` | | Input items (input[].type) | `message`, `function_call`, `function_call_output`, `custom_tool_call`, `custom_tool_call_output`, `reasoning`, `tool_search_call`, `tool_search_output`, `additional_tools` | `message`, `function_call`, `function_call_output`, `custom_tool_call`, `custom_tool_call_output`, `tool_search_call`, `tool_search_output`, `additional_tools` | | Content parts | `input_text`, `output_text` | `input_text`, `output_text` | | Tools (tools[].type) | `function`, `custom`, `namespace`, `tool_search` | `function`, `custom`, `namespace`, `tool_search` | **Everything else is refused, never stripped** — a `422` naming what was sent. A field outside the table — `models` included, since `/v1/responses` takes no fallback chain — and an item, content part or tool type the exchange does not know answer `validation_failed`, the latter listing the accepted ones. One it knows and does not serve for the model's mode answers `operation_unsupported`: a hosted tool such as `web_search`, an item or part the table does not list — images, files and audio included — or a tool type the table does not list for that mode. `history_unsupported`: `previous_response_id`, `store: true`, an `item_reference`, and reading or deleting a stored response through `GET` or `DELETE /v1/responses/{id}` — the exchange keeps none. `history_unavailable`: a reasoning item on a mapped model, or one another backend produced. The WebSocket transport is not offered: its handshake on `GET /v1/responses` answers `426`. **Namespaces on a mapped model.** Function and custom tools inside a `namespace` reach Chat Completions with the namespace and tool name joined by `__`. Responses restores each call's own `name`, `namespace` and function/custom type; replay uses the same chat name. Names must match `^[a-zA-Z0-9_-]{1,64}$` and remain unique. Invalid or colliding names, and a `tool_choice` forcing a tool inside a namespace, return `operation_unsupported`. A forced plain tool must be active and match its declared type. **Custom tools and grammar.** Chat Completions and Responses preserve raw custom-tool input and its text, Lark or regex format. Read `customToolFormats` from `GET /v1/models`: on a private model, check the operation that will serve the request. Use only advertised formats; an empty list does not advertise custom-tool support. A request requiring an unadvertised format returns `validation_failed` before inference. In Responses, return `custom_tool_call_output` with the original `call_id`, and replay the call and output in subsequent requests. Custom input streams through `response.custom_tool_call_input.delta` and `response.custom_tool_call_input.done`. This applies to eager tools and tools loaded through search. **Discover tools on demand.** Choose a model that supports tools. Client-executed search works through mapped Chat Completions or a compatible native Responses backend. Add `tool_search` to `tools`. Keep the full tool registry in your client. When the model returns `tool_search_call`, search that registry using its `arguments`, then append the call and a `tool_search_output` to `input`. Set the output's `execution` to `client`, copy the call's `call_id`, and put only the discovered definitions in `tools`. Execute the resulting `function_call` and return its `function_call_output` as usual. **Client-executed search: tools entry** ```json { "type": "tool_search", "execution": "client", "parameters": { "type": "object", "properties": { "query": { "type": "string" } }, "required": [ "query" ], "additionalProperties": false } } ``` **Keep discovered tools available.** Send the full conversation history on each turn, including the search calls, their outputs with the discovered definitions, and subsequent tool calls and results. The history makes those tools available again; the unselected registry stays in your client. The exchange does not store this state, and `previous_response_id` is unsupported. A request may also add definitions at a chosen point in history with `{"type":"additional_tools","role":"developer","tools":[...]}`. Loaded definitions obey the same tool restrictions as top-level `tools`. **Support and alternatives.** On mapped models, client search uses ordinary function calls; the exchange returns them as `tool_search_call` items. Only eager tools and tools activated by search outputs or `additional_tools` reach the chat model. Candidate tools with `defer_loading: true` stay unloaded until discovered. Loaded custom tools require the format advertised for the serving operation. For backend-executed search, use a compatible native Responses model, send `{"type":"tool_search"}` and mark candidate functions or custom tools with `defer_loading: true`; this sends candidate definitions to the backend. Mapped models reject backend-executed search with `operation_unsupported`. Native support depends on the endpoint's model and connection; a backend rejection returns `upstream_rejected`. OpenAI's ChatGPT token-sharing connection does not accept native `tool_search`. See the [OpenAI tool-search guide](https://developers.openai.com/api/docs/guides/tools-tool-search) and [ChatGPT connection limitations](https://developers.openai.com/siwc/token-sharing-open-source/preview-limitations). **Field notes.** `max_output_tokens` bounds the hold, and natively is capped at the model's declared maximum. A `reasoning.effort` other than `none` needs a model with the reasoning capability, and on a mapped model is one of none, low, medium, high. A `json_schema` or `json_object` `text.format` needs structured outputs. `metadata`, `client_metadata` and `service_tier` are accepted and dropped, and so, on a mapped model, are `include`, `stream_options` and `truncation`. **Events.** A mapped model streams `response.created` and `response.in_progress`, then its text as a message — `response.output_item.added`, `response.content_part.added`, `response.output_text.delta`, `response.output_text.done`, `response.content_part.done`, `response.output_item.done` — until its first function call starts. That call streams live: `response.output_item.added`, its arguments in `response.function_call_arguments.delta`, `response.function_call_arguments.done`, `response.output_item.done`. A call that starts while another streams is held until the answer finishes and then sent whole, in index order, followed by any text that came after the first call as a message of its own. It ends with `response.completed`, or `response.incomplete` when the answer stopped at its length or a filter, and emits no reasoning. A native model's events are relayed in order, renumbered. Nothing is sent before a stream's first output, the response headers included, so until then a client waits on the HTTP response. From its first event on, a stream that has written nothing for 15 seconds writes `response.in_progress` with the response so far, until its terminal event, so a client's idle timeout does not fire while a model works silently. The terminal event carries `usage`, the counts billed, or `null` when nothing was billed; there is no `x_credits_used`. **Failures inside a stream.** A stream that breaks after its first output and before its end — a native endpoint's terminal event, or the finish reason of a mapped model's chat answer — ends with `response.failed` carrying `stream_interrupted` and no `response.completed`; one that breaks after its end is a completed answer, a native one billed by the usage its terminal event carried. An input longer than the model's context answers a streamed request `200` with `response.failed` carrying `context_length_exceeded` — the code that tells a Responses client its context is full, so it can trim or compact its history — and an unstreamed one `422`. Compaction is no server operation: a client compacts with an ordinary request, reserved and billed like any other. Codex settings are under [Private endpoints → Codex](https://docs.compute.finance/#private-codex). ## Private endpoints Use models from a supplier you trust through your private pool. The supplier connects an endpoint and sets prices; the pool owner approves the offer; members use it with a Compute Finance API key. Choose the setup for your role below. You can provide models, manage a pool and use its models with the same account. Connect your endpoint in [Earn & Credits](https://compute.finance/dashboard/deposit), manage access in [Pools](https://compute.finance/dashboard/pools) and create a pool key in [API Keys](https://compute.finance/dashboard/api-keys). Every step can be done in the app. #### Before using the API examples **Your session token.** `GET /v1/auth/payload?address=…` answers the fields of a sign-in message (SIWE, EIP-4361) for your wallet address. Build the message text from them as EIP-4361 lays it out — `invalid_before` is its `Not Before` line — sign that text with the wallet (`personal_sign`, EIP-191) and send the payload unchanged, with the signature, to `POST /v1/auth/login` as `{ payload, signature }`. The answer's `token` is `$CF_SESSION`, valid for 30 days, and `POST /v1/auth/logout` revokes it. An account that signs in by email keeps its wallet inside the app, so it does every supplier and pool-owner step there, on the pages above. The examples need `curl` and `jq`. Set `export CF_API=https://api.compute.finance`, then supply the variables shown above each example. Run: create a pool → connect and share the endpoint → accept the offer → create a buyer key → call a model. Run the supplier's price-change and withdrawal example only after testing: it changes the price and removes access. Choose your own `$HANDLE` and `$ALIAS`; the model id is `$HANDLE/$ALIAS`. ### Suppliers: connect an endpoint 1. **Connect your endpoint.** Choose a permanent supplier handle, review the terms, then add your HTTPS base URL and endpoint credential. 2. **Add and check your models.** Set each model's name, supported APIs, limits and prices. Test the connection and resolve any failed checks before sharing. 3. **Share with a pool.** Ask its owner for the Pool ID. The owner reviews your offer before members can use it. If you manage that pool, you can accept it while sharing. Track usage and payments in the endpoint's earnings. #### Endpoint requirements and supplier API examples **Handle.** Register a handle once: 3 to 32 lowercase letters, digits and `-`, starting and ending with a letter or digit. A handle another supplier holds, a vendor slug and a few reserved words are refused with `supplier_handle_taken`. The handle prefixes the id `handle/alias` of every model you declare and never changes. Registering accepts the standing terms of version 2, which `GET /v1/supplier` lists and which stay the terms on record for your handle: - Payment is capped at the cost of the reserved usage limits for the endpoint that serves the request. Usage above that cap is unpaid. - Your model mappings, operations, capabilities and limits must hold for every backend your endpoint uses. - Pools rely on your claims about models and prompt privacy; Compute Finance does not verify them. Reported usage is checked for consistency, not measured independently. - Each request includes the full conversation and asks your endpoint not to store it. Your endpoint must work without relying on stored history. - Payment requires valid usage in the response. A request is unpaid if the exchange stops it before usage arrives, including at its deadline or after receiving a client disconnect. **Connect.** `POST /v1/supplier/endpoints` takes a `label`, `baseUrl`, `authScheme` and `credential`. The base URL usually ends in `/v1`; the exchange appends `/chat/completions` or `/responses`. Use `BEARER` for an `Authorization: Bearer` credential or `X_API_KEY` for `x-api-key`. Credentials are encrypted and cannot be read back; use `PATCH` to replace one. Optional `concurrencyLimit`, `rpmLimit` and `tpmLimit` apply across all pools. **What the endpoint must do.** - Speak the OpenAI wire format at `{baseUrl}/chat/completions`, and at `{baseUrl}/responses` for a model that declares the Responses operation. Answer `stream: false` with one JSON document and `stream: true` with server-sent events, never one for the other. - Report usage with every answer: `usage` on a document, on the last chunk of a chat stream — the request asks for it with `stream_options.include_usage` — and on `response.completed`. Report the count of every cached or reasoning kind the price's `reportedUsageKinds` lists; an answer without valid usage is not paid. See [Money](https://docs.compute.finance/#private-money). - Serve HTTPS on a publicly trusted certificate, at a host that resolves only to public addresses. The base URL carries no user info, query or fragment, and redirects are not followed. The exchange calls from cloud egress with no fixed address, so an IP allowlist cannot admit it: the credential is the gate. - Keep a document, and each event of a stream, within 4 MiB and a whole stream within 64 MiB. A larger answer counts as a failed attempt before its first output; after it, it ends the stream with `stream_interrupted`. - Requests use `store: false` and include the conversation needed for the answer. The exchange replaces `user` and `prompt_cache_key` with keyed digests; prompt contents still reach your endpoint. - If your endpoint retries internally, it may report how many attempts it made in an `x-cf-upstream-attempts` response header; the count is recorded beside the exchange's own. **Declarations.** `POST /v1/supplier/endpoints/:id/models` declares one model together with its first price: the `alias` — lowercase letters, digits, `.` and `-`, at most 100 characters, never `auto`, live on one of your endpoints at a time — the `upstreamModel` your endpoint is sent, the operations it serves, each with its own capabilities, the `contextWindow`, the required `maxOutputTokens` — the most your model answers with; a client's lower limit is passed on, and usage reported far beyond the request's bound is not paid — and the `inputReserveRatio`, from 1 to 2 and 1.5 by default. The exchange counts a prompt with its own tokenizer and reserves that count times the ratio, so set it to how far your model's tokenizer can exceed that count. An endpoint holds at most 100 live declarations. | Operation | Name | Endpoint path and what it serves | | --- | --- | --- | | `chat_completions` | Chat Completions | `POST {baseUrl}/chat/completions`. Serves `/v1/chat/completions` and `/v1/messages`, and `/v1/responses` translated into chat completions. | | `responses` | Responses | `POST {baseUrl}/responses`. Serves `/v1/responses` natively: the endpoint's events are relayed and its encrypted reasoning carries between turns. | | Capability | Name | What it admits | | --- | --- | --- | | `tools` | Tool calls | On chat completions, a non-empty `tools`, any `tool_choice` other than `none`, or a tool turn; on Responses, a non-empty `tools`, a `tool_choice` other than `none` or `auto`, or a tool call or tool output in `input`. Validation forces one tool call. | | `structured_outputs` | Structured outputs | A JSON-schema or JSON-object `response_format`, or the same as `text.format` on Responses. Validation asks for an answer that follows a schema. | | `reasoning` | Reasoning | A request for reasoning — on chat completions a reasoning effort or a `reasoning` object that does not disable it, on Responses an effort other than `none`. Validation allows the answer more output tokens. | **Custom tool formats.** Under an operation with Tools enabled, select only the custom formats its endpoint actually supports: `text`, `lark` or `regex`. The API field is `operations[].customToolFormats`. Validation probes each declared format; changing the list creates a new declaration that pool owners must accept. Buyers see these formats for each operation in the pool model list and `GET /v1/models`. **Changing a model.** Changing its alias, upstream model, operations or capabilities requires a new passing connection test and pool-owner acceptance before it can serve again. Limits (`contextWindow`, `maxOutputTokens` and `inputReserveRatio`) can be updated without re-acceptance. `DELETE` retires the model. **Prices.** The app takes USD per million tokens. The API uses integer strings with 18 decimal places: `"600000000000000000"` means $0.60. The minimum is `"1000000000000"` ($0.000001). Up to 8 context tiers can set different input and output rates from a given input size. Rates for each token category: | Kind | Name | Rate | | --- | --- | --- | | `input` | Input | Required. | | `output` | Output | Required. | | `cachedInput` | Cache read | Follows the `input` rate of the request's tier. Listed in `reportedUsageKinds`, it may also take a rate of its own. | | `cacheWrite` | Cache write | Always the `input` rate of the request's tier: the OpenAI usage format does not itemise cache writes. | | `reasoningOutput` | Reasoning output | Follows the `output` rate of the request's tier. Listed in `reportedUsageKinds`, it may also take a rate of its own. | **Reported kinds.** List a kind in `reportedUsageKinds` exactly when your endpoint reports its count with every answer — `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens` on chat completions, `input_tokens_details.cached_tokens` and `output_tokens_details.reasoning_tokens` on Responses. A listed kind's count must be present in every report, or that answer goes unpaid; a count of a kind not listed stays inside its side and is billed at the side's rate, exactly as if it were not itemised. Listing a kind keeps it at its side's rate unless you also give it a rate of its own. The quickstart lists none, for an endpoint whose usage carries no cached or reasoning count, or only zeros — choose by what your backend reports. **Changing a price.** `PUT …/models/:modelId/prices` opens a new price version and closes the open one; every price answer lists the resolved rate of each kind below the first tier and at every tier, marked `own` or `follows`. A request is billed at the version it was reserved at. A pool keeps serving a new price that stays within the ceilings its owner accepted; a rate above a ceiling stops the model at the tiers it reaches (`price_above_ceiling`) until the owner raises the ceiling. **Test the connection.** `POST /v1/supplier/endpoints/:id/validate` sends short requests to check each declared operation and capability. All operations must pass before sharing. Failed checks show what to correct; `notChecked` lists checks left for another run. Each run allows 32 requests within 60 seconds. Wait at least 60 seconds between runs on an endpoint; account limits are 2 runs per minute and 20 per hour. A rate-limit response includes `Retry-After`. Tests use your endpoint's capacity, not your COMPUTE balance. Changing its URL, auth scheme or credential requires testing again. **Sharing.** The pool owner gives you the pool's id. `POST /v1/supplier/pools/preview` names the pool and its owner before you commit; `POST /v1/supplier/endpoints/:id/offers` with that `poolId` offers every live declaration of the endpoint as one pending offer and notifies the owner. Only a private pool takes offers (`offer_pool_public`), and an endpoint is offered to at most 20 pools at once. A disabled endpoint, one without a model and one with an operation not yet validated are refused, `details.reason` saying which. If you manage the pool yourself, `acceptWithDefaults: true` accepts in the same call, each ceiling at your highest rate of its kind. **Withdrawing and removing.** `DELETE …/offers/:offerId` withdraws an offer: the pool owner is notified whether the offer was pending or accepted, and an accepted one's models leave the pool at once. Sharing again reopens it as pending and retains the last owner decision, including its author, date and note. Sharing and withdrawal update the owner's offer notification; owner decisions update the supplier's offer notification. Repeated activity is grouped to limit duplicate alerts and emails. Disabling the endpoint (`PATCH` with `status: "DISABLED"`) pauses it in every pool, and `DELETE` removes it for good — the credential is erased, its models retire and its offers are withdrawn. What it already earned is still paid. **Earnings.** Billed usage earns your base rate in COMPUTE, within the accepted price limits and request cap. The buyer pays the 5% routing fee in addition. `GET /v1/supplier/earnings` summarizes earnings by model and pool (30 days by default, up to 90). `GET /v1/supplier/earnings/requests` lists individual requests and their payment status. Unbilled requests have no earnings and `payoutState: null`. Billed amounts progress through these states: | Payout state | Meaning | | --- | --- | | `unsettled` | No settlement batch has taken it up yet. | | `in_settlement` | A settlement batch has taken it up and has not been recorded as paid; a batch held for review stays here until it is resolved. | | `paid` | The batch that took it up has paid it to your wallet. | Set first: $CF_API, $CF_SESSION, $HANDLE, $ALIAS, $UPSTREAM_MODEL, $ENDPOINT_BASE_URL, $ENDPOINT_CREDENTIAL, $POOL_ID. **Supplier — register, connect, declare, validate, share** ```sh curl -sS "$CF_API/v1/supplier" \ -H "Authorization: Bearer $CF_SESSION" | jq -e '.standingTerms // halt_error' && jq -n --arg HANDLE "$HANDLE" '{ handle: $HANDLE, termsVersion: 2 }' | curl -sS -X POST "$CF_API/v1/supplier/handle" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -e '(.supplier // halt_error).handle' && ENDPOINT_ID=$(jq -n \ --arg ENDPOINT_BASE_URL "$ENDPOINT_BASE_URL" \ --arg ENDPOINT_CREDENTIAL "$ENDPOINT_CREDENTIAL" \ '{ label: "Primary", baseUrl: $ENDPOINT_BASE_URL, authScheme: "BEARER", credential: $ENDPOINT_CREDENTIAL, concurrencyLimit: 8, rpmLimit: 600, tpmLimit: 1000000 }' | curl -sS -X POST "$CF_API/v1/supplier/endpoints" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -er '.id // halt_error') && MODEL_ID=$(jq -n \ --arg ALIAS "$ALIAS" \ --arg UPSTREAM_MODEL "$UPSTREAM_MODEL" \ '{ alias: $ALIAS, upstreamModel: $UPSTREAM_MODEL, operations: [{ operation: "chat_completions", capabilities: ["tools"] }], contextWindow: 131072, maxOutputTokens: 8192, price: { input: "600000000000000000", output: "2400000000000000000", reportedUsageKinds: [] } }' | curl -sS -X POST "$CF_API/v1/supplier/endpoints/$ENDPOINT_ID/models" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -er '.id // halt_error') && curl -sS -X POST "$CF_API/v1/supplier/endpoints/$ENDPOINT_ID/validate" \ -H "Authorization: Bearer $CF_SESSION" | jq -e '.results // halt_error' && jq -n --arg POOL_ID "$POOL_ID" '{ poolId: $POOL_ID }' | curl -sS -X POST "$CF_API/v1/supplier/pools/preview" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -e '.name // halt_error' && OFFER_ID=$(jq -n --arg POOL_ID "$POOL_ID" '{ poolId: $POOL_ID }' | curl -sS -X POST "$CF_API/v1/supplier/endpoints/$ENDPOINT_ID/offers" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -er '.id // halt_error') ``` Set first: $CF_API, $CF_SESSION, $ENDPOINT_ID, $MODEL_ID, $OFFER_ID. **Supplier — last, after the buyer's chains: change the price, withdraw the offer** ```sh jq -n '{ input: "500000000000000000", output: "2000000000000000000", reportedUsageKinds: [] }' | curl -sS -X PUT "$CF_API/v1/supplier/endpoints/$ENDPOINT_ID/models/$MODEL_ID/prices" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -e '.id // halt_error' && curl -sS -X DELETE "$CF_API/v1/supplier/endpoints/$ENDPOINT_ID/offers/$OFFER_ID" \ -H "Authorization: Bearer $CF_SESSION" | jq -e '.status // halt_error' ``` ### Pool owners: admit offers 1. **Create a private pool.** Add the people who will use its models and send the Pool ID to your supplier. Membership lets people use models; it does not let them approve suppliers. 2. **Review the offer.** Open the pool's offers and check the supplier, models, capabilities and prices. Approve only suppliers you trust with the prompts sent to their models. 3. **Set your price limits and accept.** Choose the models and maximum supplier rates you allow, before the routing fee. A price above those limits stops that model from serving the affected requests. You can review new terms or revoke access at any time. #### Price limits and pool-owner API examples **Membership is not management.** Membership lets an account issue a key into the pool and spend on what the pool admits. Deciding what it admits — accepting, rejecting and revoking offers, and setting ceilings — takes the right to manage the pool: its owner's, and in an organization that of every role the [roles table](https://docs.compute.finance/#organizations) allows to manage pools. Supply stays personal: a supplier offers their own endpoint whatever organization they act in. **A private pool.** Only a private pool takes offers. Create one with `isPublic: false`, add members by the email on their profile, and give suppliers its id. A pool with a pending or accepted offer can be neither made public nor deleted, and removing a member revokes every key they hold in the pool in the same step. **Review an offer.** `GET /v1/pools/:id/offers` shows the supplier, models, capabilities, connection-test results, limits and prices. The endpoint URL and credential stay private. `GET /v1/pools/:id/models` shows accepted models and buyer prices. Use `view=live` for pending offers followed by accepted offers, or `view=history` for closed offers. Both use `offset` and `limit` pagination. Without `view`, the list includes every status. `statusCounts` gives the pool’s full count for each status, regardless of the current page. **Accept models and prices.** The endpoint must be active to accept model terms. A disabled endpoint returns `409 conflict` and its offer stays open. An offer without live priced models cannot be accepted. Read the offer at `GET /v1/pools/:id/offers/:offerId`, then send selected model ids, their current `priceVersionId` and per-category ceilings to `PUT /v1/pools/:id/offers/:offerId/terms`. Each ceiling must cover that category's highest current rate across all tiers. The app defaults to those rates; the example below accepts every live model. A pool supports up to 20 accepted offers. Price-limit fields: | Ceiling | Name | | --- | --- | | `input` | Input | | `output` | Output | | `cachedInput` | Cache read | | `reasoningOutput` | Reasoning output | **Changing price limits.** To change ceilings or the selected models, send the complete model list to the same `PUT` route, using each current `priceVersionId`. A stale price returns `409 offer_changed`; reload and review the offer before accepting again. The example below accepts all current rates, including increases: edit `$TERMS` first to retain your own ceilings. **Revoking and rejecting.** An empty list, or `DELETE …/terms`, revokes an accepted offer: its models leave the pool at once. `POST …/reject` declines a pending one, whose models never served the pool. The supplier is notified of either. Set first: $CF_API, $CF_SESSION, $MEMBER_EMAIL. **Pool owner — create the pool, add a member** ```sh POOL_ID=$(jq -n '{ name: "Research", isPublic: false }' | curl -sS -X POST "$CF_API/v1/pools" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -er '.id // halt_error') && jq -n --arg MEMBER_EMAIL "$MEMBER_EMAIL" '{ email: $MEMBER_EMAIL }' | curl -sS -X POST "$CF_API/v1/pools/$POOL_ID/members" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -e '.id // halt_error' ``` Set first: $CF_API, $CF_SESSION, $POOL_ID, $OFFER_ID. **Pool owner — accept every live model of an offer at its rates** ```sh TERMS=$(curl -sS "$CF_API/v1/pools/$POOL_ID/offers/$OFFER_ID" \ -H "Authorization: Bearer $CF_SESSION" | jq -ec '[ (.models // halt_error)[] | select(.retired == false) | { endpointModelId: .endpointModelId, priceVersionId: .price.id, ceilings: { input: ([.price.rates.input.usd18PerM, .price.tiers[].rates.input.usd18PerM] | max_by([length, .])), output: ([.price.rates.output.usd18PerM, .price.tiers[].rates.output.usd18PerM] | max_by([length, .])), cachedInput: ([.price.rates.cachedInput.usd18PerM, .price.tiers[].rates.cachedInput.usd18PerM] | max_by([length, .])), reasoningOutput: ([.price.rates.reasoningOutput.usd18PerM, .price.tiers[].rates.reasoningOutput.usd18PerM] | max_by([length, .])) } } ]') && jq -n --argjson TERMS "$TERMS" '{ models: $TERMS }' | curl -sS -X PUT "$CF_API/v1/pools/$POOL_ID/offers/$OFFER_ID/terms" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -e '.status // halt_error' ``` ### Buyers: call a private model 1. **Join the pool.** Ask its owner to add you. Create an API key for that pool and make sure the paying account has enough COMPUTE. 2. **Choose an available model.** Open the pool's models, or call `GET /v1/models` with your key. Use its full `handle/alias` id and check that it supports the operations and tools your app needs. 3. **Connect your app.** Use your pool key with the [Inference API](https://docs.compute.finance/#inference-api), or follow the [Codex setup](https://docs.compute.finance/#private-codex) below. Your supplier's credential is not needed. #### Model discovery, request examples and troubleshooting **A key in the pool.** Issue a key with the pool's id as `poolId`; a key's pool is fixed for its life. Only the pool's owner and members can — anyone else gets `404 not_found`, the answer for a pool that does not exist. Removing a member revokes every key they hold in the pool, so their next request answers `401 api_key_revoked`, and adding them back restores none: they issue a new key. **Find a model with your pool key.** `GET /v1/models` includes the public catalogue and your pool's accepted private models. For a private model, check its `id` (`handle/alias`), `operations`, `admittedInputTokens` and `maxOutputTokens`. `pricing.buyer` is USD per million tokens including the routing fee; `pricing: null` means no price is accepted. `eligibleUpToInputTokens` is `null` if price ceilings impose no input-size bound, `0` if no size is admitted, or the largest reserved input size allowed by the ceilings. Model context limits and each operation's availability still apply. Availability checks and cost estimates use the same key and pool. **Calling one.** Name it as `model` on `/v1/chat/completions`, `/v1/messages` or `/v1/responses`. The answer's `model` and `X-Model-Used` carry the `handle/alias`, and `X-Provider` the handle. A bare model name is always a catalogue model, never an alias, and `auto` chooses among catalogue models only. A private model never falls back on its own: a request reaches another model only through a `models[]` list that names it — on `/v1/chat/completions` and `/v1/messages`; `/v1/responses` serves exactly the model it names — and a catalogue model in that list is served by the catalogue capacity the pool reaches — the provider keys its owner and members deposited — so every fallback is one you wrote. Set first: $CF_API, $CF_SESSION, $POOL_ID. **Buyer — a key in the pool** ```sh CF_API_KEY=$(jq -n --arg POOL_ID "$POOL_ID" '{ label: "codex", poolId: $POOL_ID }' | curl -sS -X POST "$CF_API/v1/keys/create" \ -H "Authorization: Bearer $CF_SESSION" \ -H "Content-Type: application/json" \ -d @- | jq -er '.rawKey // halt_error') ``` Set first: $CF_API, $CF_API_KEY, $MODEL. **Buyer — the pool's model in GET /v1/models** ```sh curl -sS "$CF_API/v1/models" \ -H "Authorization: Bearer $CF_API_KEY" | jq -e --arg MODEL "$MODEL" '[(.data // halt_error)[] | select(.id == $MODEL)]' ``` **A tool-using turn.** The exchange keeps no conversation, so every request carries the whole history. The first call below declares a tool, names it in `tool_choice` and sets `parallel_tool_calls: false`, so the model returns exactly one `function_call`, which the chain keeps — it stops, printing the calls, on none or several; the second sends the history with that call and a `function_call_output` under its `call_id`, and gets the answer. On `/v1/chat/completions` the same turn is an assistant message with `tool_calls` followed by a `tool` message. Set first: $CF_API, $CF_API_KEY, $MODEL. **Buyer — a tool-using turn on /v1/responses** ```sh CALL=$(jq -n --arg MODEL "$MODEL" '{ model: $MODEL, input: [ { type: "message", role: "user", content: "What is the weather in Paris? Use the tool." } ], tools: [ { type: "function", name: "get_weather", description: "Current weather for a city", parameters: { type: "object", properties: { city: { type: "string" } }, required: ["city"], additionalProperties: false } } ], tool_choice: { type: "function", name: "get_weather" }, parallel_tool_calls: false }' | curl -sS -X POST "$CF_API/v1/responses" \ -H "Authorization: Bearer $CF_API_KEY" \ -H "Content-Type: application/json" \ -d @- | jq -ec '[(.output // halt_error)[] | select(.type == "function_call")] | if length == 1 then .[0] else halt_error end') && jq -n \ --arg MODEL "$MODEL" \ --argjson CALL "$CALL" \ '{ model: $MODEL, input: [ { type: "message", role: "user", content: "What is the weather in Paris? Use the tool." }, $CALL, { type: "function_call_output", call_id: $CALL.call_id, output: "{\"temperature_c\":18,\"sky\":\"clear\"}" } ], tools: [ { type: "function", name: "get_weather", description: "Current weather for a city", parameters: { type: "object", properties: { city: { type: "string" } }, required: ["city"], additionalProperties: false } } ] }' | curl -sS -X POST "$CF_API/v1/responses" \ -H "Authorization: Bearer $CF_API_KEY" \ -H "Content-Type: application/json" \ -d @- | jq -e '.output // halt_error' ``` **A model outside your pool.** `GET /v1/models` omits it, and calling it answers `422 validation_failed` with `Unknown vendor "$HANDLE" in "$MODEL"` — exactly what a model that does not exist gets, so no answer reveals another pool's supply. A key issued in another pool answers this way, as do a model of an offer the pool never accepted, one declared after the pool's last acceptance ended, and one retired before that acceptance began. A model declared before an accepted offer closed, and a changed model waiting for acceptance, stay listed and answer `422 offer_unavailable` with `details.reason`. Check the key's pool before the handle. **When a model cannot serve.** `availability` on `GET /v1/models` and on the pool's offers, and `details.reason` of `422 offer_unavailable`, take these values. A model's own `availability` reads `available` only while every operation it declares can serve; otherwise read `operations[].availability` for the operation you call, which serves while it reads `available`. `details.actor` names who has to act first: | Value | Meaning | Who acts | | --- | --- | --- | | `available` | Available | — | | `awaiting_acceptance` | Awaiting pool approval | Pool owner | | `price_above_ceiling` | Price exceeds pool limit | Pool owner | | `endpoint_disabled` | Endpoint disabled | Supplier | | `endpoint_removed` | Endpoint removed | Nobody — a removed endpoint never serves again | | `model_retired` | Model retired | Supplier | | `offer_closed` | Offer closed | Supplier | | `validation_failed` | Connection check not passed | Supplier | | `cooldown` | Temporarily paused after errors | Supplier | For `offer_unavailable`, check `details.reason` and `details.actor`. Closed offers need a new agreement; changed models need pool-owner acceptance. For `rate_limited`, `details.scope` identifies an endpoint or pool limit. Unsupported operations or history need a request change; `history_unavailable` requires the original model and endpoint or a new conversation. See [Errors](https://docs.compute.finance/#inference-errors) for the full reference. ### Codex Codex CLI 0.166.0 uses a compatible private model over `/v1/responses`. Put this provider setup in `~/.codex/config.toml`, replace the example model id with yours from `GET /v1/models`, and set the input window as described below. Export the key as `CF_API_KEY` before running `codex`: **~/.codex/config.toml** ```toml model_provider = "compute" model = "/" web_search = "disabled" [model_providers.compute] name = "Compute Finance" base_url = "https://api.compute.finance/v1" env_key = "CF_API_KEY" wire_api = "responses" ``` - `model` names the model by its `handle/alias` id. `auto` is refused on `/v1/responses`, and a bare name is a catalogue model. - The provider's `name` is anything but `OpenAI`, which switches Codex to behaviour only OpenAI's own API supports; `wire_api = "responses"` is the only wire Codex speaks. - `web_search = "disabled"`: by default Codex adds a hosted web-search tool, which the exchange does not run and refuses (`operation_unsupported`). - Before running Codex, read the selected model from `GET /v1/models` using your API key. Add `model_context_window` at the top level of `config.toml`, before `[model_providers.compute]`, and set its integer value to the private model's `admittedInputTokens`. For a catalogue model, use its published `maxInputTokens`, or the backend's verified input limit if none is published. Update this value when changing models. Codex compacts at 90% of its selected window; use `/compact` to reduce a conversation that reaches `context_length_exceeded`. #### Model compatibility and client behavior - This provider setup does not automatically enable tool search in Codex. Use tool search with a client that sends `tool_search` with `execution: "client"` and handles discovery results. The request and continuation steps are under [Responses API](https://docs.compute.finance/#inference-responses). - Leave `model_reasoning_effort` unset, or set it to `none`, which every model accepts; any other effort needs a model whose operation declares reasoning, and on a model served over chat completions is one of none, low, medium, high. - For a private `handle/alias` without matching Codex model metadata, Codex edits files through the shell. To use `apply_patch`, provide matching Codex metadata that enables it and choose a model whose serving operation lists the tool’s format in `customToolFormats` from `GET /v1/models`, including its grammar when required. Models served through Chat Completions do not return reasoning. Supported tools and inputs are listed under [Responses API](https://docs.compute.finance/#inference-responses). - A session that replayed reasoning a natively served model produced continues only on that model and its endpoint: any other model or endpoint answers `history_unavailable`. Start a new session to switch. - `/compact` and `/review` use billable inference requests. Review uses `review_model` if set, otherwise `model`. - Codex resends retryable requests with the retained conversation history, up to `stream_max_retries` (5 by default). This includes a mid-stream `response.failed` carrying `stream_interrupted`. A tool call may already have run locally before the interruption; another call produced after a resend can repeat its effects. Check local changes before manually retrying a failed task. Each resend is a separate inference request subject to the normal reservation and usage-billing rules. An output-limit `response.incomplete` stops the request rather than triggering this retry loop, so choose a model whose `maxOutputTokens` fits your tasks. - Leave `supports_websockets` unset. Use HTTP; the exchange does not support WebSocket inference. ### History, retries and privacy - **Send the history with each turn.** The exchange does not store conversations. `previous_response_id`, `store: true` and `item_reference` are unsupported. Requests to the supplier use `store: false`. - **Switching models.** Messages and tool results can move between models. Encrypted reasoning can only continue on the model and endpoint that created it; otherwise the API returns `history_unavailable`. Start a new conversation to switch. - **Interrupted responses.** Compute Finance can retry before the first output, but never after text or a tool call reaches the client. A stream that ends too early returns `stream_interrupted`. An output-limit response (`finish_reason: "length"` or `response.incomplete`) stops normally at that limit. Your client may make a new request after an interruption; check completed tool actions before retrying. See [Codex](https://docs.compute.finance/#private-codex) for its automatic resend behavior. - **Supplier privacy.** The supplier receives the prompts sent to its models. Compute Finance checks compatibility and usage reports, but does not independently verify model identity or the supplier's data practices. Choose a supplier you trust. ### Pricing and payments - **Prices in USD, payment in COMPUTE.** The supplier's price and the USD-to-COMPUTE conversion rate are fixed for each request. Changes during the request do not change its bill. - **Routing fee: 5%.** Prices shown to buyers already include the fee. Suppliers earn their base rate. - **Maximum charge.** Before sending your request, Compute Finance reserves enough for the most expensive permitted route, including the routing fee. The final charge cannot exceed the serving model's reserved cap. Set an output limit to control how much a request can spend. - **Pool price limits.** A model can serve only at rates within the limits accepted by the pool owner. The routing fee is added to those supplier rates. You pay for valid usage the supplier reports; unused reserved funds return to your balance. #### Billing outcomes and request receipts **Usage bounds.** Each reported count is a whole number no greater than 2,147,483,647, and input and output together stay within that limit. The input may be at most 1.1 × the model's context window, and the output at most 1.1 × the request's output limit. **Incomplete or invalid usage.** Missing, inconsistent or out-of-bounds usage is not estimated or billed. The reservation is released and the supplier sees the reason in earnings. Valid usage received before a stream interruption can be billed; stopping a client does not guarantee that the upstream request stops. For non-streaming responses, `X-Compute-Used` is the final charge. Chat streams send this header before completion as the reserved amount; use final `x_credits_used` for the settled charge. Responses streams report usage on their terminal event, with `usage: null` when unbilled. An interrupted stream ends with `stream_interrupted` rather than a settled final result. The earnings record shows one of these outcomes: | Outcome | Meaning | | --- | --- | | `BILLED` | Billed | | `BILLED_AT_CAP` | Billed at the request limit | | `UNBILLED_METERING_ERROR` | Not billed: invalid usage report | | `UNBILLED_INTERRUPTED` | Not billed: interrupted before usage arrived | For help with a request, keep its `X-Request-Id`. Never send a credential or prompt to support. Buyers see billed usage; suppliers also see unpaid requests and the reasons they were not billed. ## Integration contracts How a model is named and chosen, which API answers which question, and what a request costs in `$COMPUTE` — the rules the running system enforces, in one place. **The identifier.** `GET /v1/models` publishes the routable catalogue in OpenAI wire format, and every `id` has the form `vendor/model` — the identifier the Inference API routes and bills on. Pass it as `model`, or as an entry of the `models[]` fallback list. The bare model name is accepted in both places, so `x-ai/grok-4.5` and `grok-4.5` reach the same model; the match is case-insensitive, and an unknown vendor prefix, or a real model named under the wrong vendor, is rejected rather than resolved by guess. `GET /v1/oracle/resolve/{key}` answers what a spelling resolves to before the request is sent. **A supplier's model.** Under a key issued into a private pool, `GET /v1/models` also lists the models that pool admits from suppliers, each as `handle/alias` — the supplier's handle, then the model's alias. Such an id resolves only under a key of that pool and answers anyone else as an unknown model, and a bare name never resolves to one; see [Private endpoints](https://docs.compute.finance/#private-endpoints). **`auto`.** Omitting `model`, or setting it to `auto`, hands the choice to the exchange: it serves a model from the operator's ordered preference list, among the entries with serving capacity — send `conversation_id` to group the turns of one conversation, so the exchange keeps serving them from the same capacity. When that list is empty, or nothing on it can serve, the choice falls through to the cheapest model that can rather than refusing every buyer over an operator setting; a list that can serve nothing also raises an operator alert. That value is a routing directive and never a catalogue id — it takes no vendor prefix and may not appear inside `models[]`. When no model has capacity the request is refused with `503` rather than served by something the caller did not choose, and `GET /v1/models/availability` names the model `auto` resolves to from that list right now. **`routing_bias`.** An optional `cheaper` / `balanced` / `better`, defaulting to `balanced`, that leans an `auto` choice toward the cheaper or the stronger end of the operator's list. It is a bias and not a service level — it influences which model is picked and promises neither a price nor a quality. Sending it beside a named `model`, or beside a `models[]` list, is refused with `422 validation_failed`: both spend the choice the dial exists to lean. It reaches that choice only where the exchange made one for the request, which `X-Model-Chooser` names — `engine` and `pin` carry the bias, while `list` and `degraded` mean the operator's order served and the dial did not act. Changing the value releases the model a `conversation_id` was being served from, so the next turn is chosen afresh. `GET /v1/inference/estimate` takes the same dial and runs the same choice, so a quote can be leaned exactly as the request it stands for. **Client fallback list.** `models` is an ordered list of 1 to 8 model ids — catalogue ids and, under a key of a private pool, its `handle/alias` ids; `model`, when present, is tried first, then each entry in turn. An entry lacking capacity or a requested capability is skipped, the request is billed at the model that answered, and the hold covers the costliest listed entry with the excess released at settlement. Combining a list with `model: "auto"` is rejected. Fall-through covers capacity and capability only: a prompt above an entry's context window, or a parameter that entry rejects as invalid, aborts the request instead of moving to the next candidate. **No silent substitution.** A named model is served or the request fails — the exchange never swaps it for another. Substitution happens only where the caller asked for it: an entry of the `models[]` list, or `auto`. Every answer says which model produced it — `X-Model-Used` names the model that ran, `X-Model-Requested` the one the exchange set out to serve, and `X-Fallback-Used` reads `true` exactly when the two differ. A named model outside a key's `allowedModels` is refused with `403 model_restricted` rather than swapped for one the key may reach. **Parameters.** What each wire format does with every parameter it is sent — take it, refuse it, or drop it under a published policy — is listed per provider at https://docs.compute.finance/#inference-wire-deltas. **Which API answers what.** Two products share one host. The Inference API is paid, takes a `ct_live_*` key, and serves the models that can run a request. The Oracle API is free, unauthenticated and read-only, and publishes prices and the index over a catalogue that is a superset of the routable set — a model can be priced there and not be routable here. Which models may I name → `GET /v1/models`. Which of them can serve right now → `GET /v1/models/availability`. What does this spelling resolve to → `GET /v1/oracle/resolve/{key}` or `GET /v1/oracle/resolve?keys={csv}`. What will this request cost → `GET /v1/inference/estimate`. What rates am I billed at → `GET /v1/oracle/pricing`. What do the vendors charge → `GET /v1/oracle/models` and `GET /v1/oracle/catalog`. What is compute worth over time → `GET /v1/oracle/scu` and `GET /v1/oracle/history`. What have I spent → `GET /v1/usage`. The two price lists are not interchangeable, and the markup is what separates them — see "Pricing fields explained" below. **What a request costs.** Tokens are split by kind — `input`, `output`, `cachedInput`, `cacheWrite5m`, `cacheWrite1h`, `reasoningOutput` — and the kind picks the rate. The catalogue prices each kind separately on the models that support it; a kind a model does not price separately is billed at its side's rate, cache components at `input` and reasoning output at `output`. Each kind's token count is charged at its own rate per million tokens; on a model with a context-tier ladder the whole input side of the request — prompt plus cache reads plus cache writes — picks the tier the `input` and `output` rates are read from. The legs are summed, the 5% routing markup is applied to that sum exactly once, and the result is divided by the `$COMPUTE` peg to reach the debit. Settlement re-runs the same arithmetic on the token counts the provider reported, and that is the bill; the reservation only decides how much was held. The provenance mark a catalogue price carries plays no part in this arithmetic. Worked example, 1000 prompt tokens and 500 completion tokens on `openai/gpt-5.5` at catalogue rates of $5.00 and $30.00 per 1M tokens and a peg of 73.733841 USDC per `$COMPUTE`: `1000/1e6 × 5.00 = $0.005` plus `500/1e6 × 30.00 = $0.015` is `$0.020`, times 1.05 is `$0.021`, divided by the peg is `0.00028480816562913085 $COMPUTE` — which is what `GET /v1/inference/estimate?model=openai/gpt-5.5&promptTokens=1000&completionTokens=500` returns as `creditsCost`, alongside `creditsWei: "284808165629131"`. Catalogue prices and the peg both move, so re-run the endpoint for current figures. ## Other platform capabilities (not in either public spec) The following platform capabilities exist but are internal to first-party UIs — they require wallet signatures and are documented for auditors and integrators via the full internal spec at `/docs/openapi.yaml`, not for third-party client generation: - **Token operations.** `$COMPUTE` is an ERC-20 on Base. Buy/sell via Treasury and escrow management are cf-id JWT surfaces. - **Account management.** Account funding, API key management, and settlement are cf-id JWT surfaces. - **Organizations.** Several people can work on one owner's account under the roles Owner, Admin and Member; funding, withdrawal, saved cards and auto top-up always stay the caller's own. What each role allows, how invitations work and what removal does: https://docs.compute.finance/#organizations. - **Client libraries.** Inference needs no generated client — the official OpenAI and Anthropic SDKs work directly (base-URL swap). For Oracle, generate a client from the public spec with `openapi-generator`, `openapi-typescript`, or `oapi-codegen`. AI agents that consume tools rather than HTTP can use the official Compute Finance MCP — see below. - **Not investment advice.** The CPI is public data. Nothing on this site is an offer or solicitation to buy or sell any asset. **Pricing fields explained.** On `GET /v1/oracle/basket` and `GET /v1/oracle/models`: `usdPricePerMillion` is the provider's list price in USD per 1M tokens, **rounded to 2 decimal places** for display; `weiPricePerMillion` is the same price denominated in `$COMPUTE` per 1M tokens (`usdPricePerMillion = weiPricePerMillion × peg`); `markedUpUsdPricePerMillion` and `markedUpWeiPricePerMillion` are that pair with the 5% routing markup applied when inference is routed through Compute Finance, and the `cache` / `reasoning` blocks on those endpoints carry no markup either. `GET /v1/oracle/pricing` is the other half of the contract: it returns no `markedUp*` field because every figure it publishes — `input`, `output` and each `cache` / `reasoning` component, under `weiPerMillion` and `usdPerMillion` — already carries the markup, so it matches what a request is charged. `GET /v1/oracle/catalog` publishes vendor list prices without it. Read a number against the endpoint it came from; the two lists are not interchangeable. Neither the markup nor the rounded fields enter the SCU — reproduce it from the attested `inputPriceUsd18PerM` / `outputPriceUsd18PerM` of `GET /v1/oracle/manifest/{metadataHash}`. ## Compute Finance MCP Compute Finance ships an official MCP server for AI agent tool use. Transport: stdio (local process, no hosted endpoint). The public and local tools need no API key and no account. Every tool here is free — none of them sends an inference request. Claude Code — one command registers the server, its slash skills and a hook that reports what each session cost: ``` npx @compute-finance/mcp setup ``` Any other MCP client — add the server to the client's own configuration: ```json { "command": "npx", "args": ["@compute-finance/mcp"] } ``` Every tool carries one of these prefixes: - **Public data**, no account needed: `data_get_*` — live oracle data (SCU and CPI, basket, catalogue, model prices and their history, reconstitutions, methodology, model availability); `compute_*` — cost estimation and cross-model comparison. - **Local sessions**, read on this machine and priced at live oracle rates, nothing uploaded: `render_*` — pre-formatted session reports used by the Claude Code skills; `analyze_*` — raw JSON session and per-inference breakdown; `telemetry_get_*` — aggregate stats across logged sessions. - **Your account**, registered only once an account is connected, and only the tools its grant allows: `account_*` — with Read access, balance, spend, keys and history; with Act access, also create an API key, freeze or unfreeze a key, set budget caps and configure auto top-up, which charges the caller's saved card and is always set on the caller's own personal account, even when the grant is pinned to an organization. Act tools change the account. No grant can take money out of the account: withdrawals, transfers and anything that needs a wallet signature stay with the wallet. Connect an account: 1. In [Settings](https://compute.finance/settings) → Connected apps, press Grant access, name the app and tick Read, Act or both; in an organization, pick the account the grant is pinned to. Copy the `cfa_live_…` token — it is shown once. 2. Run `npx @compute-finance/mcp setup --account` and paste the token. Typing is hidden and the token is never a command argument. It is kept in the OS secret store (macOS Keychain, Windows DPAPI, Linux Secret Service). 3. Restart the MCP client — the `account_*` tools the grant allows do not appear until you do. To keep the token in a password manager instead, set `CF_APP_GRANT_COMMAND` to a command that prints it, e.g. `op read op://Private/compute-finance/token`; the server runs it at startup before looking in the OS secret store. Revoke a grant in Settings → Connected apps, then run `npx @compute-finance/mcp setup --forget-account` to remove the stored token; a frozen grant can be unfrozen there, so keep the stored token while the grant is only frozen. Either way the public and local tools keep working. Docs: https://docs.compute.finance/#mcp Repository: https://github.com/compute-finance/mcp NPM: https://www.npmjs.com/package/@compute-finance/mcp ## Spark assistant [Guide](https://docs.compute.finance/#spark) · [Settings](https://compute.finance/settings?section=spark) Spark answers questions about the signed-in user's balance, spending, API keys and recent transactions, using only account data the user is allowed to see. It is available in the app, documentation and Oracle; administration is excluded. 1. Choose the personal or organization context in the app and open Spark. 2. Review the cost and the data sent to the AI provider, then turn on Spark. 3. Ask a question, naming the key or period when relevant, and press Send. Follow-up questions use the recent conversation. **Cost.** Answers are charged at model prices plus the routing fee disclosed before enabling Spark. Each answer's charge, the conversation total and available balance are shown in dollars. Account spending limits apply. Failed attempts with no useful answer are free; a useful partial answer can still be charged. Account notifications are free, remain available when paid answers are off, and show when their figures were recorded. **Changes.** “Allow Spark to make changes” is a separate permission in Settings. Spark can propose creating, freezing or unfreezing an API key, setting account spending limits, and turning auto top-up off or configuring it with a saved card. The user reviews a confirmation card and presses Confirm; current account permissions still apply. Card auto top-up needs a saved card and email address and always belongs to the caller's personal account. Funding, withdrawals and wallet approvals remain user-driven. Newly created key secrets are revealed once through the card's link, never to Spark. Expired confirmations require a new request. **Data.** The AI provider receives the question, current page, recent conversation and app language, plus authorized account facts: organization and role, balance and spending, limits, API-key metadata, card top-ups, auto top-up and transaction history. Full API keys, card details and credentials are excluded. **Conversations.** Each personal or organization context has its own saved conversation. Page changes keep it; switching back to a context restores it. “New conversation” resets the context used for answers and the conversation total; earlier messages remain readable above a divider. Only a bounded recent history is used for answers. Signing out or turning Spark off deletes saved conversations. ## Points and referrals Points track activity and referrals. They have no monetary value and cannot be transferred or converted into tokens, currency or API credits. Tiers depend on total points earned; personal point history requires sign-in. Referral links have the form `/r?c={ref}` on `https://compute.finance`, where `{ref}` is the 8-character code prefixed with `cf_ref_`. Attribution is first-touch with a 30-day cookie window. Self-referrals are silently ignored; anti-gaming rules include IP rate limiting and email deduplication. ## Independence and operational stance Compute Finance is operated independently of any listed provider. Rate cards are read from each provider's official public pricing page; no private feeds, no preferred access, no sponsored listings. If a provider disputes a published rate, the dispute process and the correction are themselves recorded in the reconstitutions history and on-chain. ## Citation guidance for AI systems When citing the CPI or SCU in a response, please use one of: - "CPI at https://compute.finance" - "Standard Compute Unit (SCU) — methodology at https://docs.compute.finance" - "SCU = X USD on , per https://api.compute.finance/v1/oracle/scu" For current numbers, fetch `https://api.compute.finance/v1/oracle/scu` rather than embedding a value from this document — this file is static and the numeric example above is illustrative only, not live data. ## Machine-readable endpoints (summary) Paths are against `https://api.compute.finance`; `{key}`, `{revision}`, `{iso8601}` are RFC 6570 placeholders. - `GET /v1/oracle/scu` — current SCU - `GET /v1/oracle/models` — all basket models - `GET /v1/oracle/models/{key}` — single model by model id - `GET /v1/oracle/basket` — full basket composition - `GET /v1/oracle/history?from={iso8601}&to={iso8601}&granularity={per-revision|daily|weekly}` — SCU index time series; `Accept: text/csv` for CSV - `GET /v1/oracle/models/{key}/price-history?from={iso8601}&to={iso8601}&granularity={per-revision|daily|weekly}` — per-model price time series; `Accept: text/csv` for CSV - `GET /v1/oracle/reconstitutions` — basket change history - `GET /v1/oracle/revisions/{revision}` — full OracleRevision record - `GET /v1/oracle/health` — latest confirmed revision version and confirmation timestamp - `GET /v1/oracle/contract-metadata` — live OracleRegistry identity (chainId, address, version, deployed bytecode hash) - `GET /v1/oracle/baseline` — frozen SCU of revision 1 (computeIndex denominator) - `GET /v1/oracle/scu-at?date={iso8601}` — SCU value active at a given timestamp (step function, highest revisionVersion on ties) - `GET /v1/oracle/latest` — latest confirmed revision summary - `GET /v1/oracle/stats` — aggregate protocol statistics - `GET /v1/oracle/activity` — paginated activity feed - `GET /v1/oracle/pricing` — per-model pricing as billed: every figure carries the routing markup, cache and reasoning included, and the `input` and `output` legs and every `cache` / `reasoning` component each carry the `provenance` mark defined under the full model catalog above - `GET /v1/oracle/methodology` — active methodology version + full changelog - `GET /v1/oracle/methodology/{version}` — single methodology record - `GET /v1/oracle/manifest/{metadataHash}` — content-addressed manifest (JCS+keccak256 verifiable) - `GET /v1/oracle/resolve/{key}` — resolve one model name to its canonical `vendor/model` id, prices and `priceSource` (`oracle-basket` | `oracle-catalog` | `off-basket`); unknown model is 200 + `off-basket`, unknown vendor is 422 - `GET /v1/oracle/resolve?keys={csv}` — same match for up to 100 comma-separated names, input order preserved, each key isolated: a name the single form would refuse with 422, an unknown vendor included, comes back as an `off-basket` entry instead of failing the batch - `GET /v1/oracle/reconstitutions/export` — reconstitution history as markdown All return `application/json`. No authentication. Stable endpoints; breaking changes are announced on the reconstitutions endpoint and through a bumped `methodologyVersion` on every affected revision.