التوثيق التصنيفات ↗
🌐 العربية
استهلك البيانات

مرجع API

!
تريد أن تظهر بياناتك على TKX؟ أنت في الصفحة الخطأ. هذه الصفحة تشرح استهلاك بيانات TKX. إذا كنت تدير موجِّهًا أو مُجمِّعًا (مثل 0G) وتريد أسعارك على اللوحات، فأنت لا تستدعي هذا الـ API — بل تعرض نقطة نهاية قياسية و TKX يسحبها تلقائيًا. → The Open Router Standard · اطلب الإدراج

كل نقاط النهاية من نوع GET، وتعيد JSON، ولا تحتاج مفتاحًا، وتُحدَّث كل ساعة. عنوان URL الأساسي https://tkx.org. الأمثلة أدناه استجابات حقيقية مقتطعة.

GET/api/v1/rankings.jsonتصنيفات النماذج (أفضل 60)
GET/api/v1/models/{id}.jsonتفاصيل لكل نموذج
GET/api/v1/providers.jsonلوحة ثقة المزوّدين
GET/api/v1/aggregators.jsonلوحة الموجِّهات / المُجمِّعين
GET/api/v1/indices.jsonTTPI + مؤشرات GPU
GET/api/v1/meta.jsonبيانات التجميع الوصفية

التصنيفات

GET/api/v1/rankings.json

أفضل 60 نموذجًا مُصنَّفة بأرخص عرض مُتحقَّق منه. تحمل كل مدخلة أفضل عرض، وعدد المزوّدين، وقيم TTFT/TPS/وقت التشغيل المفحوصة حيثما تتوفّر، وخطًا بيانيًا spark لأسعار ثلاثين يومًا، ومصفوفة providers الكاملة.

الطلب
curl https://tkx.org/api/v1/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
      }
    }
  ]
}

تفاصيل النموذج

GET/api/v1/models/{id}.json

كل عرض مزوّد لنموذج معياري واحد، بالأسعار والأدلة.

معامل المسارالنوعالوصف
idstringالمعرّف المعياري للنموذج، مثل gpt-oss-120b
الطلب
curl https://tkx.org/api/v1/models/gpt-oss-120b.json
الاستجابة (مقتطعة)
{
  "generatedAt": "2026-07-06T07:10:53.381Z",
  "attribution": "Data by TKX (https://tkx.org)",
  "model": {
    "id": "claude-3-5-sonnet",
    "name": "claude-3-5-sonnet",
    "org": "snowflake",
    "ctx": 200000,
    "best": {
      "in": 3,
      "out": 15,
      "blended": 6,
      "router": "official",
      "provider": "snowflake",
      "evidence": "official"
    },
    "providerCount": 3,
    "ttft": null,
    "tps": null,
    "uptime": null,
    "spark": [],
    "providers": [
      {
        "router": "official",
        "provider": "snowflake",
        "in": 3,
        "out": 15,
        "ttft": null,
        "tps": null,
        "uptime": null,
        "evidence": "official"
      }
    ]
  }
}

المزوّدون

GET/api/v1/providers.json

لوحة ثقة المزوّدين: التغطية، وعدد العروض، وعدد مرات فوز الأرخص، ووسيط وقت التشغيل/الكمون (حيثما جرى الفحص)، وأرضية الدقّة.

الطلب
curl https://tkx.org/api/v1/providers.json
الاستجابة (مقتطعة)
{
  "attribution": "Data by TKX (https://tkx.org) — free use requires attribution",
  "data": [
    {
      "key": "requesty",
      "name": "requesty",
      "models": 374,
      "offers": 374,
      "bestWins": 306,
      "routers": [
        "requesty"
      ],
      "medUptime": null,
      "upN": 0,
      "medTtft": null,
      "ttftN": 0,
      "medTps": null,
      "evidence": "api",
      "kind": "provider",
      "quant": null,
      "quantN": 0
    }
  ]
}
GET/api/v1/providers/{key}.json

تفاصيل لكل مزوّد — النماذج التي يقدّمها المزوّد وكيفية مقارنته.

معامل المسارالنوعالوصف
keystringمفتاح المزوّد، مثل fireworks، 0g
الطلب
curl https://tkx.org/api/v1/providers/fireworks.json
الاستجابة (مقتطعة)
{
  "generatedAt": "2026-07-22T16:07:24.242Z",
  "attribution": "Data by TKX (https://tkx.org)",
  "provider": {
    "key": "0g",
    "name": "0G Compute",
    "models": 17,
    "offers": 17,
    "bestWins": 14,
    "routers": [
      "0g"
    ],
    "medUptime": null,
    "upN": 0,
    "medTtft": null,
    "ttftN": 0,
    "medTps": null,
    "evidence": "api",
    "kind": "web3",
    "quant": null,
    "quantN": 0,
    "items": [
      {
        "id": "qwen3-vl-30b",
        "name": "qwen3-vl-30b",
        "org": "",
        "in": 0.0194,
        "out": 0.1892,
        "ttft": null,
        "tps": null,
        "uptime": null,
        "evidence": "api",
        "router": "0g",
        "isBest": true
      }
    ]
  }
}

المُجمِّعون

GET/api/v1/aggregators.json

لوحة الموجِّهات/المُجمِّعين: markupPct المقيس مقابل سعر القائمة، والتغطية، ووسيط وقت التشغيل، والمستوى (live | listed)، والمنطقة.

الطلب
curl https://tkx.org/api/v1/aggregators.json
الاستجابة (مقتطعة)
{
  "attribution": "Data by TKX (https://tkx.org) — free use requires attribution",
  "data": [
    {
      "slug": "openrouter",
      "name": "OpenRouter",
      "kind": "aggregator",
      "url": "https://openrouter.ai",
      "models": 319,
      "offers": 612,
      "markupPct": 0,
      "markupN": 199,
      "medUptime": 99.5547,
      "medTtft": null,
      "evidence": "api",
      "tier": "live",
      "region": "western",
      "note": "",
      "oai": true,
      "trustScore": 90,
      "completeness": 100,
      "breakdown": {
        "coverage": 100,
        "price": 80,
        "reliability": 93,
        "evidence": 80
      },
      "volume24h": {
        "tokens": 9621566458152,
        "usd": 6402826,
        "date": "2026-07-17",
        "stale": true,
        "volChgPct": null,
        "spendChgPct": null
      }
    }
  ]
}

المؤشرات

GET/api/v1/indices.json

مؤشر سعر الرموز TTPI إضافةً إلى مؤشرات السعر الفوري لوحدات GPU (دولي حي + محلي منسّق)، كلٌّ مع حجم العيّنة وإصدار المنهجية.

الطلب
curl https://tkx.org/api/v1/indices.json
الاستجابة (مقتطعة)
{
  "generatedAt": "2026-07-22T16:07:24.241Z",
  "methodology": {
    "version": "M-2026.1",
    "url": "https://tkx.org/methodology/"
  },
  "indices": {
    "TTPI": {
      "name": "TKX 词元价格指数",
      "unit": "USD / 1M tokens (completion, median)",
      "value": 1.9,
      "sample": 319
    },
    "TTV-OR": {
      "name": "TKX Token Traded Value (OpenRouter, est.)",
      "unit": "USD / day (est., paid traffic at list rates, 3:1 in:out blend)",
      "value": 6402826,
      "sample": 36,
      "date": "2026-07-17",
      "stale": true,
      "note": "Estimated list-rate value of paid token traffic routed through OpenRouter. Not billed revenue; free-tier traffic excl…"
    }
  },
  "gpu": {
    "international": [
      {
        "gpu": "H200",
        "source": "vast",
        "currency": "USD",
        "priceHr": 4.08,
        "sample": 18,
        "history": []
      }
    ],
    "domestic": [
      {
        "gpu": "RTX 4090",
        "source": "curated snapshot 2026-07-04",
        "currency": "CNY",
        "priceHr": 2.18,
        "sample": 5,
        "history": []
      }
    ]
  },
  "attribution": "Data by TKX (https://tkx.org) — free use requires attribution"
}

التغيّرات

GET/api/v1/changes.json

أحداث تغيّر السعر خلال 24 ساعة — تحرّكات أرخص سعر مخلوط لكل نموذج فوق العتبة، يومًا بعد يوم.

الطلب
curl https://tkx.org/api/v1/changes.json
الاستجابة (مقتطعة)
{
  "attribution": "Data by TKX (https://tkx.org) — free use requires attribution",
  "generatedAt": "2026-07-22T16:07:24.211Z",
  "window": "24h",
  "events": []
}

التطبيقات

GET/api/v1/apps.json

لوحة استخدام الرموز للتطبيقات والوكلاء، منسوبة إلى OpenRouter.

الطلب
curl https://tkx.org/api/v1/apps.json
الاستجابة (مقتطعة)
{
  "attribution": "App/agent token usage via OpenRouter (openrouter.ai/apps)",
  "generatedAt": "2026-07-22T16:07:24.203Z",
  "source": "OpenRouter",
  "popular": [
    {
      "rank": 2,
      "title": "Hermes Agent",
      "desc": "Hermes Agent is an open-source, self-improving AI agent by Nous Research that runs persistently with memory across se…",
      "slug": "hermes-agent",
      "url": "https://hermes-agent.nousresearch.com/",
      "cats": [
        "personal-agent"
      ],
      "tokens": 28772524995746,
      "requests": 367166827
    }
  ],
  "trending": [
    {
      "rank": 7,
      "title": "Command Code",
      "desc": "",
      "slug": "",
      "url": "https://commandcode.ai/",
      "cats": [
        "programming-app"
      ],
      "tokens": 1273389568214,
      "requests": 37968056,
      "growth": 1431
    }
  ],
  "leaderboards": {
    "coding": [
      {
        "rank": 2,
        "title": "Hermes Agent",
        "desc": "Hermes Agent is an open-source, self-improving AI agent by Nous Research that runs persistently with memory across se…",
        "slug": "hermes-agent",
        "url": "https://hermes-agent.nousresearch.com/",
        "cats": [
          "personal-agent"
        ],
        "tokens": 889819065274,
        "requests": 12846144
      }
    ],
    "creative": [
      {
        "rank": 9,
        "title": "Descript",
        "desc": "AI Video & Podcast Editor",
        "slug": "descript",
        "url": "https://descript.com/",
        "cats": [
          "video-gen"
        ],
        "tokens": 72758705917,
        "requests": 919852
      }
    ],
    "productivity": [
      {
        "rank": 2,
        "title": "Hermes Agent",
        "desc": "Hermes Agent is an open-source, self-improving AI agent by Nous Research that runs persistently with memory across se…",
        "slug": "hermes-agent",
        "url": "https://hermes-agent.nousresearch.com/",
        "cats": [
          "personal-agent"
        ],
        "tokens": 889819065274,
        "requests": 12846144
      }
    ],
    "entertainment": [
      {
        "rank": 12,
        "title": "Hello Minds, powered by Ethoswarm",
        "desc": "",
        "slug": "",
        "url": "https://www.hellominds.ai/",
        "cats": [
          "roleplay"
        ],
        "tokens": 50652424750,
        "requests": 233112
      }
    ]
  }
}

سحابات GPU

GET/api/v1/gpu-clouds.json

جدول أسعار موردي سحابات GPU — لقطة منسّقة إضافةً إلى أسعار Vast الفورية الحية، لكل بطاقة.

الطلب
curl https://tkx.org/api/v1/gpu-clouds.json
الاستجابة (مقتطعة)
{
  "attribution": "Data by TKX (https://tkx.org) — free use requires attribution",
  "asof": "2026-07-04",
  "vastLiveAt": "2026-07-22T11:39:11.061Z",
  "clouds": [
    {
      "name": "Vast.ai",
      "url": "https://vast.ai/",
      "region": "spot",
      "cur": "$",
      "p": {
        "4090": 0.369,
        "5090": 0.457,
        "a100": 0.889,
        "h100": 2.235,
        "b200": 7.126
      },
      "tier": "live",
      "note": "竞价市场,最便宜;会被抢占需 checkpoint。TKX 实时抓取此源。"
    }
  ]
}

السجل

GET/api/v1/history/ttpi.json

السجل اليومي لـTTPI (نافذة 30 يومًا).

الطلب
curl https://tkx.org/api/v1/history/ttpi.json
الاستجابة (مقتطعة)
{
  "attribution": "Data by TKX (https://tkx.org) — free use requires attribution",
  "code": "TTPI",
  "unit": "USD per 1M completion tokens (median)",
  "history": []
}
GET/api/v1/history/gpu.json

السجل اليومي لأسعار GPU حسب المصدر والبطاقة (نافذة 30 يومًا).

الطلب
curl https://tkx.org/api/v1/history/gpu.json
الاستجابة (مقتطعة)
{
  "attribution": "Data by TKX (https://tkx.org) — free use requires attribution",
  "unit": "per GPU-hour (vast=USD live market, curated-cn=CNY curated snapshot)",
  "series": {}
}

البيانات الوصفية

GET/api/v1/meta.json

بيانات التجميع الوصفية — الأعداد وحالة كل مصدر (بما في ذلك مصادر dev/apps/gpu المساعِدة).

الطلب
curl https://tkx.org/api/v1/meta.json
الاستجابة (مقتطعة)
{
  "generatedAt": "2026-07-22T16:07:24.242Z",
  "counts": {
    "models": 1593,
    "offers": 3177,
    "pages": 207
  },
  "sources": [
    {
      "source": "litellm",
      "ok": true,
      "count": 2068
    }
  ]
}

مواصفة OpenAPI

GET/api/v1/openapi.json

العقد الكامل القابل للقراءة آليًا (OpenAPI 3.1). وجّه إليه أداة توليد الشيفرة / واجهة Swagger UI.

الطلب
curl https://tkx.org/api/v1/openapi.json
الاستجابة (مقتطعة)
{
  "openapi": "3.1.0",
  "info": {
    "title": "TKX Public Data API",
    "version": "1.3.0",
    "description": "The data authority for the AI token & compute market. Free with attribution to tkx.org. All endpoints are static JSON…",
    "contact": {
      "email": "echo@minax.io",
      "url": "https://tkx.org/standard/"
    }
  },
  "servers": [
    {
      "url": "https://tkx.org"
    }
  ],
  "paths": {
    "/api/v1/rankings.json": {
      "get": {
        "summary": "Model rankings: sorted by est. 24h traded value first (usage.usd = paid tokens × list rate; free traffic never priced…",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/models/{id}.json": {
      "get": {
        "summary": "Per-model detail: all provider offers, prices, evidence",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Unknown model"
          }
        }
      }
    },
    "/api/v1/providers.json": {
      "get": {
        "summary": "Provider trust board: coverage, cheapest-wins, uptime/latency medians, precision floor",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/providers/{key}.json": {
      "get": {
        "summary": "Per-provider detail",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/aggregators.json": {
      "get": {
        "summary": "Router board (45 tracked), sorted by 24h token volume first (Deng 2026-07-21: volume is the primary ranking; coverage…",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/indices.json": {
      "get": {
        "summary": "TTPI token price index, TTV-OR est. daily token traded value (paid traffic at list rates), GPU spot indices (intl liv…",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/changes.json": {
      "get": {
        "summary": "24h price-change events (>2% day-over-day per-model cheapest blended)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/trending.json": {
      "get": {
        "summary": "Top movers (30d) and trending apps",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/usage.json": {
      "get": {
        "summary": "Real per-model token usage/share + est. spend (OpenRouter rankings-daily; paid/free split; est. at list rates; OpenRo…",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/apps.json": {
      "get": {
        "summary": "Apps & agents token-usage board (attributed to OpenRouter)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/gpu-clouds.json": {
      "get": {
        "summary": "GPU cloud supplier price table (curated + Vast live)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/history/ttpi.json": {
      "get": {
        "summary": "TTPI daily history (30d window)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/history/gpu.json": {
      "get": {
        "summary": "GPU price daily history by source|card (30d window)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/constituents/ttpi.json": {
      "get": {
        "summary": "TTPI full constituents for today's point + sha256 — recompute/audit the index without database access",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/constituents/ttv-or.json": {
      "get": {
        "summary": "TTV-OR full constituents (per-model est. spend) + sha256 for today's point",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/price-ohlc.json": {
      "get": {
        "summary": "Per-model daily price OHLC (cheapest blended, 90d) — real prices, candles gain intraday range as hourly buckets accum…",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/meta.json": {
      "get": {
        "summary": "Collection metadata: counts, source status incl. aux (dev/apps/gpu)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}