COMPUTE
. FINANCE

Documentation.

Compute Finance is in early access.

The CPI Oracle and public API are live. Register a Compute Finance ID to join the waitlist.

REQUEST ACCESS

What is the CPI?

The Compute Price Index ("CPI") is a public benchmark that tracks the cost of AI inference across major providers. It produces a single weighted reference price — the Standard Compute Unit ("SCU") — calculated from a basket of twelve models across four providers.

The Problem

LLM inference pricing is fragmented. Every provider quotes pricing differently — per token, per character, per request, per tier. There is no standardized way to benchmark or compare the cost of AI computation across models and providers. You need a verifiable pricing reference you can audit independently.

The Solution

The CPI is a weighted basket of 12 AI models across 4 providers (OpenAI, Anthropic, Google, xAI) that produces a single, verifiable unit of account: the Standard Compute Unit (SCU). The SCU represents the USD cost of a reference workload — 1,000 input tokens + 500 output tokens — averaged across the full basket.

Key Properties

  • Verifiable — All prices are published on-chain via the OracleRegistry contract on Base. Anyone can independently verify the basket composition and pricing.
  • Diversified — Twelve models across four providers prevent any single provider from dominating the index.
  • Outlier-resistant — A per-tier 2× cap on individual model costs prevents one expensive model from distorting the tier average.
  • Versioned — Current basket: v1.0 (launched April 7, 2026). The index has tracked AI compute pricing since June 17, 2025 under basket v0. Every reconstitution is recorded on-chain.
  • Open methodology — The formula is deterministic and reproducible from public provider pricing.

Basket Composition

The CPI tracks twelve models from four providers, organized into three tiers. One model per provider per tier. The basket is reviewed quarterly and updated with a new version number when models are added, removed, or replaced.

Frontier

30% weight

Highest-capability models. Best reasoning, longest context, most accurate.

Grok 4

Claude Opus 4.7

GPT 5.5

Gemini 3.1 Pro

Standard

40% weight

Balanced cost-performance models. General-purpose workhorses.

Claude Sonnet 4.6

GPT-4.1

Gemini 3 Pro

Grok 3 Mini

Lightweight

30% weight

Fastest, cheapest models. For high-volume, latency-sensitive tasks.

Claude Haiku 4.5

GPT-5 Mini

Grok 4.1 Fast

Gemini 3 Flash

Tier weights reflect real-world usage distribution across capability tiers. Frontier 30% / Standard 40% / Lightweight 30%.

SCU Formula

The Standard Compute Unit is calculated in three steps. The reference workload is fixed at 1,000 input tokens + 500 output tokens, evaluated across all basket models.

Step 1 — Per-Model Cost

For each model in the basket, compute the USD cost of the reference workload using the provider’s published per-token pricing.

cost_m = (input_price_m × 1000) + (output_price_m × 500)

Step 2 — Per-Tier Capped Mean

Within each tier, compute the mean cost. Any model whose cost exceeds 2× the tier mean is capped at 2× the mean. This prevents a single expensive model from distorting the tier average.

tier_avg_t = mean(min(cost_m, 2 × tier_mean_t))

Step 3 — Weighted Sum

Apply tier weights and sum. Frontier 30%, Standard 40%, Lightweight 30%.

SCU = (frontier_avg × 0.30) + (standard_avg × 0.40) + (lightweight_avg × 0.30)

Live Tier Breakdown

TierWeightCapped MeanContribution
Frontier30%$0.013998$0.004199
Standard40%$0.006263$0.002505
Lightweight30%$0.001800$0.000540
Total SCU$0.007245

Anyone with access to provider pricing pages can independently reproduce this number.

Basket Rules

The CPI basket is governed by rules that enforce stability, fairness, and verifiability. Changes are tracked via version numbers and recorded on-chain.

Quarterly Reviews

The basket is reviewed every quarter. During each review, model pricing is updated, tier assignments are reviewed, and models are added or removed as needed. Each review produces a new basket version.

Addition Criteria

  • Model must be generally available via a public API for at least 30 days
  • Provider must publish verifiable per-token pricing
  • Model must fit one of the three tiers (Frontier, Standard, Lightweight)
  • Each tier targets one model per provider (4 providers × 3 tiers = 12 models)

Removal Criteria

  • Model is deprecated or end-of-lifed by the provider
  • Model is superseded by a newer version from the same provider in the same tier
  • Provider discontinues verifiable pricing or public API access

Emergency Triggers

An emergency reconstitution is triggered if any model with ≥25% effective weight in its tier changes price by ≥30% within a single day. Emergency updates are published within 24 hours and increment the basket version.

Version Tracking

Every basket change increments the basket_version counter. The full history is available via the GET /v1/oracle/reconstitutions endpoint and exportable as CSV. On-chain, the OracleRegistry contract records each price update with a timestamp.

v0 vs v1.0. The CPI was first deployed on June 17, 2025 as basket v0 — an internal version used to validate the methodology, build version history, and refine basket composition. v1.0 is the public launch basket as of April 7, 2026. The v0 → v1.0 transition carries forward all historical data: anyone querying the API can read the full version history back to inception.

On-Chain Verification

All CPI pricing is recorded on-chain via the OracleRegistry contract on Base. You can independently verify prices without trusting the Compute Finance API.

Contract Address

NetworkBase (Chain ID 8453)
Contract0xE4FC0d3c388D766362992d6985556CF8907276A6
DeployedJune 17, 2025 (basket v0)
Public launchApril 7, 2026 (basket v1.0)

Read Functions

FunctionDescription
lastRevisionVersion()Returns the current basket version number
getLatestRevision()Returns the full latest version: models, prices, tier weights, workload, and SCU
getRevision(uint256 version)Returns a specific version by number
getModelPrices(string modelKey)Returns input and output prices (wei per 1M tokens) for a model in the latest version
getModelPrices(string modelKey, uint256 version)Returns input and output prices for a model at a specific version
getRevisionScuWei(uint256 version)Returns the total SCU value (in wei) for a specific version

Verification with ethers.js

JavaScript
import { ethers } from "ethers";

const ORACLE_REGISTRY = "0xE4FC0d3c388D766362992d6985556CF8907276A6";
const ABI = [
  "function lastRevisionVersion() view returns (uint256)",
  "function getLatestRevision() view returns (tuple(uint256,bytes32,uint256,uint16[3],uint32,uint32,uint256,uint256))",
  "function getModelPrices(string modelKey) view returns (uint256 input, uint256 output)"
];

const provider = new ethers.JsonRpcProvider("https://mainnet.base.org");
const oracle = new ethers.Contract(ORACLE_REGISTRY, ABI, provider);

// Read latest version
const version = await oracle.lastRevisionVersion();
console.log("Latest version:", version.toString());

// Read model prices (wei per 1M tokens)
const { input, output } = await oracle.getModelPrices("gpt-5.4");
console.log("GPT-5.4 input:", ethers.formatUnits(input, 18), "CT/1M");
console.log("GPT-5.4 output:", ethers.formatUnits(output, 18), "CT/1M");

Verification via Basescan

You can also read the contract directly on Basescan:

  1. Go to Basescan → Read Contract
  2. Call getSupportedModels() to see all registered pricing keys
  3. Call getPrice(model) with any model key to get its price per 1M tokens
  4. Prices are returned in wei (18 decimals). Divide by 10^18 to get the USD amount.

Public API

All oracle endpoints are public and require no authentication. Read access is free and unrestricted. Base URL: https://api.compute.finance

Endpoints

GET/v1/oracle/scuCurrent SCU value, tier breakdown, methodology
GET/v1/oracle/modelsAll 12 models with tier, provider, and pricing
GET/v1/oracle/model/:keySingle model by pricing key
GET/v1/oracle/tiersTier definitions, weights, and current model assignments
GET/v1/oracle/basketFull basket composition including all models, tiers, weights
GET/v1/oracle/baselineInception SCU snapshot used as the Efficiency Index denominator
GET/v1/oracle/history?range=30dHourly SCU history (step-shaped between basket updates). Range: 24h, 7d, 30d, 90d, 1y, all
GET/v1/oracle/reconstitutionsNamed basket-change events with version, models, SCU delta
GET/v1/oracle/reconstitutions/exportExport full reconstitution history as a downloadable markdown file
GET/v1/oracle/prices/historyPer-model price history with optional date range and model filter
GET/v1/oracle/latestLatest confirmed basket version summary (version, timestamps, SCU, basket size)
GET/v1/oracle/healthLatest basket version number and confirmation timestamp
GET/v1/oracle/statsPublic aggregate protocol statistics (TVL, users, volume)
GET/v1/oracle/activityLive activity feed of recent protocol events (paginated)
GET/v1/oracle/pricingPer-model pricing in $COMPUTE and USD with markup

Code Examples

All endpoints are public. No authentication required.

Get Current SCU

curl https://api.compute.finance/v1/oracle/scu

List All Models

curl https://api.compute.finance/v1/oracle/models

Get Single Model

curl https://api.compute.finance/v1/oracle/model/claude-opus-4.7

Historical SCU (30 days)

curl "https://api.compute.finance/v1/oracle/history?range=30d"

Response Schemas

GET /v1/oracle/scu

response
{
  "scuUsd": 0.006494986,
  "breakdown": {
    "frontier": 0.003449676375,
    "standard": 0.00250519,
    "lightweight": 0.000540119625
  },
  "referenceWorkload": { "inputTokens": 1000, "outputTokens": 500 },
  "methodology": "Capped equal-weight across 3 tiers (frontier 30%, standard 40%, lightweight 30%)",
  "updatedAt": "2026-04-21T13:54:38.820Z"  // example timestamp
}

GET /v1/oracle/models

response
{
  "models": [
    {
      "id": "gpt-5.4",
      "displayName": "GPT-5.4",
      "provider": "openai",
      "tier": "frontier",
      "integrated": true,
      "ctPricePerMillion": { "input": 378, "output": 2269 },
      "usdPricePerMillion": { "input": 2.49858, "output": 14.99809 },
      "markedUpCtPricePerMillion": { "input": 396.9, "output": 2382.45 },
      "markedUpUsdPricePerMillion": { "input": 2.623509, "output": 15.747995 },
      "oracleKeyPrefix": "gpt-5.4"
    }
  ]
}

Compute Finance ID

Your Compute Finance ID (CF ID) is your identity across all Compute Finance surfaces. Created on first sign-in via email or wallet, it ties together your profile, points balance, and referral code into a single record.

What CF ID stores

FieldDescription
cf_idPublic identifier — format: cf_usr_XXXXXXXXXXXX
emailUsed for notifications. Optional for wallet-only sign-in.
wallet_addressOn-chain address on Base. Created via account abstraction or connected externally.
display_nameUser-chosen name. Defaults to a truncated email or wallet address.
referral_codePermanent 8-character code — format: cf_ref_XXXXXXXX
points_balanceCurrent points total, denormalized from the points ledger

Sign-in flows

Two sign-in methods, both produce a CF ID:

  • Email — Enter your email, receive a 6-digit code, verify. A smart wallet is created on Base and associated with your email. No seed phrase required.
  • Wallet — Connect MetaMask, Coinbase Wallet, or any WalletConnect-compatible wallet. Sign a SIWE message. Your wallet address becomes your CF ID's primary identifier.

Both flows converge on the same CF ID record. You can add an email to a wallet-only account later from your settings.

Points

Points track your engagement with Compute Finance — signup, daily logins, oracle interactions, and referrals. As your balance grows, you unlock higher tiers. Points are append-only and recorded in a public ledger per CF ID.

Tiers

TierMin Points
Explorer0
Starter500
Builder2,000
Architect5,000
Titan15,000

How points are earned

V1 supports six earning channels. New channels will be added in future versions and announced via the changelog.

ChannelAmountTriggerFrequency
Signup bonus100 ptsCF ID createdOnce per account
Referral (referrer)250 ptsReferred user completes signupPer successful referral
Referral (referred user)50 ptsUser signs up via referral linkOnce per account
Daily login10 ptsUser logs in on a new calendar day (UTC)Once per day
7-day login streak bonus50 ptsUser logs in 7 consecutive daysOnce per streak completion
Oracle interaction5 ptsUser views a unique model’s pricing on the oracle pageUp to 12 per day (one per model)

Ledger model

The points ledger is an append-only log. No entries are ever updated or deleted. Your canonical points balance is the sum of all your ledger entries. The denormalized points_balance field on your CF ID record is a performance optimization that is reconciled periodically.

FieldTypeDescription
idUUIDPrimary key
cf_idString (FK)The user who earned the points
typeEnumOne of: signup, referral, referral_welcome, daily_login, streak_bonus, oracle_interaction
amountIntegerPoints earned (always positive — append-only, no negative entries)
sourceStringHuman-readable source descriptor (e.g. referral:cf_usr_a3k9m2x7p1b4, oracle:gpt-5.4)
created_atTimestampWhen the points were earned

The append-only design means: no points can be silently removed or altered, the complete earning history is preserved and queryable, and any future audit can reconstruct the exact points balance at any point in time.

Streaks

Use Compute Finance on consecutive calendar days to build a streak. Longer streaks earn bonus points. Your current streak and longest streak are shown in your profile. Streaks reset if you miss a calendar day (UTC).

Leaderboard

The top 50 users by total points are displayed on the public leaderboard, refreshed hourly. The leaderboard shows display name and points only — no other profile data is exposed.

Non-transferability

Points are non-transferable in V1. They have no monetary value, are not convertible to any token or currency, and cannot be sold, traded, or assigned to another account. A points-to-credits conversion ratio for V2 will be announced before V2 ships, and the append-only ledger ensures all V1 earning history is preserved and can be converted accurately at that time.

API endpoints

Points data is queryable via the following endpoints. Authentication is required for endpoints that return personal data; the leaderboard is public.

GET/v1/pointsYour points summary (total, tier, current streak, longest streak)
GET/v1/points/historyPaginated points ledger entries for your CF ID
GET/v1/points/leaderboardTop 50 users by total points (public, no auth)

Referral Program

Every CF ID includes a unique referral code (8 characters). Share your link to invite new users — both sides earn points. The program uses first-touch attribution with a 30-day cookie window.

Referral rewards

EventPointsWho Earns
New user signs up with your code50 ptsNew user (welcome bonus)
You referred a new user250 ptsReferrer

Sharing your referral link

// Referral URL format
https://compute.finance/r/cf_ref_XXXXXXXX

Find your referral code in your Compute Finance ID settings. Share buttons are available for X, LinkedIn, Telegram, and copy-to-clipboard. The link uses a 30-day attribution cookie — referrals count when the referred user creates a CF ID within 30 days of clicking your link.

Attribution model

Referral attribution is first-touch with a 30-day window. The first referral link a user clicks is the one credited if they sign up within the window. Subsequent referral links from other users do not overwrite the original cookie.

How it works step by step:

  • A user visits https://compute.finance/r/cf_ref_XXXXXXXX
  • The server redirects to https://compute.finance and sets a cookie: cf_ref=cf_ref_XXXXXXXX with Max-Age=2592000 (30 days), SameSite=Lax, Secure
  • The click is recorded in the database with the referral code, timestamp, hashed IP address, and user agent
  • If the user signs up within 30 days — even if they navigate directly to https://compute.finance without the referral link — the cookie is read during CF ID creation and the referral relationship is stored
  • If the user has already clicked a different referral link, the first-touch cookie is preserved

Anti-gaming rules

The referral program enforces several rules to prevent farming and abuse. None of these rules surface error messages — invalid referrals are silently ignored to avoid leaking information about user accounts.

RuleImplementation
No self-referralIf the cf_ref cookie matches the signing-up user's own referral code, the referral is silently ignored
Email deduplicationOne CF ID per email — a user cannot create multiple accounts with the same email to farm referral points
IP rate limitingMaximum 10 CF ID creations per IP address per 24 hours, preventing mass account creation from a single source
Click rate limitingMaximum 100 clicks per referral code per hour. Clicks beyond the limit are not recorded.
Disposable email detectionOptional: reject signups from known disposable email domains (mailinator, guerrillamail, etc.)

Referral dashboard

Your CF ID profile includes a referral dashboard showing:

  • Total referral link clicks (all-time)
  • Total signups from your referral link
  • Conversion rate (signups ÷ clicks)
  • Total points earned from referrals
  • List of referred users (display name or truncated email, signup date, status: pending or confirmed)

Status transitions

A referral has two possible states. Points are awarded when the status transitions from pending to confirmed:

  • pending — The user clicked the referral link but has not yet completed signup
  • confirmed — The user has created a CF ID. Points are awarded to both sides within 60 seconds of confirmation.