Consume the data
Quickstart
Every TKX endpoint is a static JSON document. There is nothing to install and no key to obtain — just make an HTTP GET.
Base URL
All endpoints live under:
https://tkx.org/api/v1/
Your first request
Fetch the model rankings — the cheapest verified offer for each ranked model:
curl https://tkx.org/api/v1/rankings.json
Response — top of rankings.json (truncated to one model):
{
"generatedAt": "2026-07-22T16:07:24.242Z",
"attribution": "Data by TKX (https://tkx.org) — free use requires attribution",
"rankings": [
{
"id": "gpt-5.5",
"name": "gpt-5.5",
"org": "azure_ai",
"ctx": 1050000,
"best": {
"in": 5,
"out": 30,
"blended": 11.25,
"router": "official",
"provider": "azure_ai",
"evidence": "official"
},
"avgBlended": 11.25,
"providerCount": 5,
"ttft": null,
"tps": null,
"uptime": null,
"spark": [],
"providers": [
{
"router": "official",
"provider": "azure_ai",
"in": 5,
"out": 30,
"ttft": null,
"tps": null,
"uptime": null,
"evidence": "official"
}
],
"usage": {
"tokens": 98987458250,
"tokensPaid": 98987458250,
"tokensFree": 0,
"share": 1.03,
"rank": 15,
"usd": 1113608.91,
"volChgPct": null,
"spendChgPct": null
}
}
]
}
Response conventions
- Every response includes an
attributionstring and, where relevant, ageneratedAtISO-8601 timestamp (UTC). - List payloads sit under a named key —
rankings,data,events,clouds, etc. (see each endpoint). - Prices are USD per 1M tokens unless a
currencyfield says otherwise (GPU domestic leg is CNY). Missing/untested values arenull— never estimated. - Each offer carries an
evidencetag — see Data model & evidence.
Freshness & caching
i
The collector runs hourly. Files are static and CDN-cached, so polling faster than that returns identical bytes. Cache client-side ~1h. Check
generatedAt to see the last run.CORS & browsers
CORS is enabled, so you can fetch() directly from a browser:
const r = await fetch('https://tkx.org/api/v1/indices.json');
const { indices } = await r.json();
console.log(indices.TTPI.value); // 1.67