文档 排行 ↗
🌐 简体中文
调用数据

快速开始

每个 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