文件 排行 ↗
🌐 繁體中文
取用資料

快速上手

每個 TKX 端點都是一份靜態 JSON 文件。無需安裝任何東西,也無需取得金鑰 — 只要發出一個 HTTP GET 即可。

基礎 URL

所有端點都位於:

https://tkx.org/api/v1/

你的第一個請求

取得模型排行 — 每個上榜模型經驗證的最低報價:

curl https://tkx.org/api/v1/rankings.json
回應 — rankings.json 的頂部(截斷為單一模型):
{
  "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
      }
    }
  ]
}

回應慣例

更新頻率與快取

i
採集器每小時執行一次。檔案為靜態且由 CDN 快取,因此以更快的頻率輪詢只會取回相同的位元組。用戶端請快取約 1 小時。檢查 generatedAt 可查看上次執行時間。

CORS 與瀏覽器

CORS 已啟用,因此你可以直接從瀏覽器 fetch()

const r = await fetch('https://tkx.org/api/v1/indices.json');
const { indices } = await r.json();
console.log(indices.TTPI.value); // 1.67