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.comWithout 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
/api/gpu-types/api/gpu-types-freeGPU 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
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.
{
"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
/api/gpu/:gpuNameThe 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
curl "https://api.ornnai.com/api/gpu/H100 SXM"Example response
{
"success": true,
"data": {
"gpu_name": "H100 SXM",
"region": "",
"index_value": 2.74,
"last_updated": "2026-07-15T19:02:47.119Z"
}
}Latest Daily Index
/api/daily-indexThe 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
curl "https://api.ornnai.com/api/daily-index?gpu=H100 SXM"Example response
{
"success": true,
"data": {
"gpu_type": "H100 SXM",
"region": "global",
"index_value": 2.505,
"date": "2026-07-14T20:00:00.000Z"
}
}All GPUs
/api/daily-index/allEvery 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
curl "https://api.ornnai.com/api/daily-index/all"Example response
{
"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
/api/gpu/:gpuName/index-historyDaily compute price index history for one GPU.
Path parameter
gpuName: GPU identifier (e.g. H100 SXM, H200).
Free GPUs
Ornn tracks more; any other model needs a key. Fetch this list live from GPU Types rather than copying it.
Query parameters
startDateandendDate: optional inclusive range inYYYY-MM-DD. WithoutstartDate, 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
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
{
"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
/api/token-types/api/token-types-freeModel 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
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.
{
"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
/api/otpiDaily settled, volume-weighted blended USD prices per million tokens.
Query parameters
date: settlement date inYYYY-MM-DD. Defaults to the latest settled day.startDateandendDate: inclusive range inYYYY-MM-DD. Supply both together.lab: optional single-lab filter.
Examples
curl "https://api.ornnai.com/api/otpi"
curl "https://api.ornnai.com/api/otpi?date=2026-06-17"Example response
{
"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
Ornn tracks more; any other lab returns 401 without a key. Fetch this list live from Token Types rather than copying it.
Price History
/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
startDateandendDate: inclusive range inYYYY-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
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
{
"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" }
]
}