API Documentation

Overview

Read-only access to the Ornn Compute Price Index (OCPI) and Ornn Token Price Index (OTPI): the same data charted on this site. Every endpoint here works without a key or an account. Anonymous requests are rate-limited per IP.

Base URL

https://api.ornnai.com

Without a key

  • Compute (OCPI): current price, plus 3 months of daily history, for 5 GPUs.
  • Tokens (OTPI): 1 month of daily settled prices, for 4 labs.

With a key

Full history, every tracked GPU and lab, plus memory prices, datacenter sites and LLM coding analytics. Get a key at data.ornn.com; full reference at data.ornn.com/docs.

GPU Types

GET/api/gpu-types
GET/api/gpu-types-free

GPU identifiers, for use as gpuName. /api/gpu-types lists every GPU Ornn tracks; /api/gpu-types-free lists the ones reachable without a key. Anything in the first but not the second needs a key. Fetch both rather than hard-coding the difference.

Examples

bash
curl "https://api.ornnai.com/api/gpu-types"
curl "https://api.ornnai.com/api/gpu-types-free"

Example response

From /api/gpu-types-free, which carries "access": "free-tier". /api/gpu-types returns the same shape without it.

json
{
  "success": true,
  "access": "free-tier",
  "data": [
    { "gpu_name": "A100 SXM4", "region": "" },
    { "gpu_name": "B200", "region": "" },
    { "gpu_name": "H100 SXM", "region": "" },
    { "gpu_name": "H200", "region": "" },
    { "gpu_name": "RTX 5090", "region": "" }
  ]
}

Current Price

GET/api/gpu/:gpuName

The latest compute price index for one GPU, updated hourly.

Path parameter

gpuName: any of the 5 free GPUs (see GPU Types). Others need a key.

Examples

bash
curl "https://api.ornnai.com/api/gpu/H100 SXM"

Example response

json
{
  "success": true,
  "data": {
    "gpu_name": "H100 SXM",
    "region": "",
    "index_value": 2.74,
    "last_updated": "2026-07-15T19:02:47.119Z"
  }
}

Latest Daily Index

GET/api/daily-index

The most recent settled daily index for one GPU. Daily values are the settled close; use Current Price for the live hourly value.

Query parameters

  • gpu: GPU identifier (e.g. H100 SXM). Free GPUs only.

Examples

bash
curl "https://api.ornnai.com/api/daily-index?gpu=H100 SXM"

Example response

json
{
  "success": true,
  "data": {
    "gpu_type": "H100 SXM",
    "region": "global",
    "index_value": 2.505,
    "date": "2026-07-14T20:00:00.000Z"
  }
}

All GPUs

GET/api/daily-index/all

Every GPU's most recent settled daily index, in one call. Without a key this returns the 5 free GPUs; a key widens it to every tracked GPU.

Examples

bash
curl "https://api.ornnai.com/api/daily-index/all"

Example response

json
{
  "success": true,
  "date": "2026-07-14T20:00:00.000Z",
  "data": [
    { "gpu_type": "A100 SXM4", "region": "global", "index_value": 1.0308, "date": "2026-07-14T20:00:00.000Z" },
    { "gpu_type": "B200", "region": "global", "index_value": 7.27625, "date": "2026-07-14T20:00:00.000Z" },
    { "gpu_type": "H100 SXM", "region": "global", "index_value": 2.505, "date": "2026-07-14T20:00:00.000Z" }
  ]
}

Price History

GET/api/gpu/:gpuName/index-history

Daily compute price index history for one GPU.

Path parameter

gpuName: GPU identifier (e.g. H100 SXM, H200).

Free GPUs

H100 SXMH200B200A100 SXM4RTX 5090

Ornn tracks more; any other model needs a key. Fetch this list live from GPU Types rather than copying it.

Query parameters

  • startDate and endDate: optional inclusive range in YYYY-MM-DD. Without startDate, the response covers the trailing 3 months.

Free-tier window

Without a key, responses are capped at the trailing 3 months. An earlier startDate is accepted but clamped, so the series starts 3 months ago. Use an API key for the full history.

Examples

bash
curl "https://api.ornnai.com/api/gpu/H100 SXM/index-history"
curl "https://api.ornnai.com/api/gpu/H100 SXM/index-history?startDate=2026-05-01&endDate=2026-06-01"

Example response

json
{
  "success": true,
  "gpu_type": "H100 SXM",
  "data": [
    { "timestamp": "2025-11-24T21:00:00.000Z", "index_value": 1.85 },
    { "timestamp": "2025-11-25T21:00:00.000Z", "index_value": 1.86 }
  ]
}

Token Types

GET/api/token-types
GET/api/token-types-free

Model labs, for use as the lab filter. /api/token-types lists every lab Ornn tracks; /api/token-types-free lists the ones reachable without a key. A lab in the first but not the second returns 401 without a key.

Examples

bash
curl "https://api.ornnai.com/api/token-types"
curl "https://api.ornnai.com/api/token-types-free"

Example response

From /api/token-types-free, which carries "access": "free-tier". /api/token-types returns the same shape without it.

json
{
  "success": true,
  "access": "free-tier",
  "data": [
    { "lab": "anthropic", "label": "Anthropic" },
    { "lab": "openai", "label": "OpenAI" },
    { "lab": "google", "label": "Google" },
    { "lab": "deepseek", "label": "DeepSeek" }
  ]
}

Latest Daily Index

GET/api/otpi

Daily settled, volume-weighted blended USD prices per million tokens.

Query parameters

  • date: settlement date in YYYY-MM-DD. Defaults to the latest settled day.
  • startDate and endDate: inclusive range in YYYY-MM-DD. Supply both together.
  • lab: optional single-lab filter.

Examples

bash
curl "https://api.ornnai.com/api/otpi"
curl "https://api.ornnai.com/api/otpi?date=2026-06-17"

Example response

json
{
  "success": true,
  "date": "2026-06-17",
  "count": 11,
  "data": [
    {
      "date": "2026-06-17",
      "lab": "openai",
      "indexPerMtok": 1.198924,
      "computedAt": "2026-06-18T12:02:38.511Z"
    }
  ]
}

Free labs

anthropicopenaigoogledeepseek

Ornn tracks more; any other lab returns 401 without a key. Fetch this list live from Token Types rather than copying it.

Price History

GET/api/otpi?startDate=&endDate=

The same endpoint returns a daily series when given a date range. Add lab to narrow to one lab, or omit it for every lab per day.

Query parameters

  • startDate and endDate: inclusive range in YYYY-MM-DD. Supply both together.
  • lab: optional single-lab filter.

Free-tier window

Without a key, the series is capped at the trailing 1 month across the 4 free labs. An earlier startDate is clamped, and a date older than the window returns 401. Use an API key for the full history. The index began settling in June 2026, so it currently spans only a few weeks.

Examples

bash
curl "https://api.ornnai.com/api/otpi?lab=openai&startDate=2026-06-04&endDate=2026-07-10"
curl "https://api.ornnai.com/api/otpi?startDate=2026-06-04&endDate=2026-07-10"

Example response

json
{
  "success": true,
  "startDate": "2026-06-04",
  "endDate": "2026-07-10",
  "count": 2,
  "data": [
    { "date": "2026-06-04", "lab": "openai", "indexPerMtok": 1.141472, "computedAt": "2026-06-11T14:46:27.702Z" },
    { "date": "2026-06-05", "lab": "openai", "indexPerMtok": 1.259932, "computedAt": "2026-06-11T14:46:27.702Z" }
  ]
}