Skip to content
Search documentation titles, headings, and guides
API v1Updated 2026-10-16

Rankings API

GET /api/rankings — public token usage per model and author, trending and fastest models, the data behind the LLM rankings page.

GET /api/rankings is the public, unauthenticated feed behind the LLM rankings page. It reports how many tokens each model served on zrouter over a rolling window, the market share of each model author, trending models, and the fastest models by median output speed. Responses are aggregates only: no prices, request or user counts, or provider details.

Endpoint#

GET/api/rankings
Auth: public

Token usage rankings for one rolling window. Cached for 60 seconds (Cache-Control: public, max-age=60).

Parameters

windowstringqueryoptionaldefault: week

Rolling window ending now: last 24 hours (hourly buckets), 7 days or 30 days (daily buckets), or everything since the first recorded day (weekly buckets, Monday start).

Allowed values:dayweekmonthall
modalitystringqueryoptionaldefault: text

Only text models are ranked today. Image models are not included.

Allowed values:text

Request Example

curl https://api.zrouter.dev/api/rankings?window=week

Responses

200Rankings for the requested window (abridged).
{
  "schema_version": 1,
  "generated_at": "2026-10-16T08:00:00Z",
  "window": "week",
  "modality": "text",
  "range": {
    "from": "2026-10-09T08:00:00Z",
    "to": "2026-10-16T08:00:00Z",
    "previous_from": "2026-10-02T08:00:00Z",
    "data_since": "2026-09-03"
  },
  "totals": { "tokens": 171534300000, "previous_tokens": 155000001000 },
  "leaderboard": [
    {
      "rank": 1,
      "public_name": "deepseek-v4.1-flash",
      "display_name": "DeepSeek V4.1 Flash",
      "author": "deepseek",
      "listed": true,
      "tokens": 111300000000,
      "previous_tokens": 101000000000,
      "change_pct": 10,
      "is_new": false
    }
  ],
  "other": { "tokens": 315000000 },
  "series": {
    "bucket": "day",
    "keys": ["deepseek-v4.1-flash"],
    "points": [
      { "start": "2026-10-08T17:00:00Z", "partial": true, "values": { "deepseek-v4.1-flash": 7950000000 }, "other": 22500000 }
    ]
  },
  "authors": [{ "author": "deepseek", "tokens": 111300000000, "share_bp": 6489 }],
  "trending": [
    { "public_name": "deepseek-v4.1-flash", "display_name": "DeepSeek V4.1 Flash", "author": "deepseek", "tokens": 111300000000, "change_pct": 10, "is_new": false }
  ],
  "fastest": [
    { "public_name": "deepseek-v4.1-flash", "display_name": "DeepSeek V4.1 Flash", "author": "deepseek", "tps_p50": 91.2, "ttft_p50_ms": 2365, "samples_bucket": "10k+" }
  ]
}
400`invalid_request`: unknown `window` or `modality` value.
404`not_found`: rankings are not enabled on this deployment.
500`internal_error`: usage data could not be read; retry later.

Fields#

FieldMeaning
range.from / range.toWindow bounds (UTC, minute precision). to is when the snapshot was taken.
range.previous_fromStart of the comparison period of equal length right before from; null for all.
range.data_sinceFirst day with recorded usage (Asia/Jakarta calendar date).
totals.tokensAll text tokens in the window: the leaderboard plus other.tokens.
leaderboard[].listedWhether the model is currently in the public catalog. Retired models keep their history but are not listed.
leaderboard[].change_pctInteger percentage vs the previous period; null when is_new is true or for all.
other.tokensTokens of models that are not shown by name.
seriesChart data: per bucket, tokens of the top models (keys) and the rest in other. partial marks a bucket cut by the window edge.
authors[].share_bpMarket share in basis points (1/100 of a percent). Always sums to exactly 10000.
trendingVisible models with at least 1M tokens in the last 7 days that are new or growing vs the 7 days before; up to 10.
fastest[].tps_p50Median output tokens per second of successful streamed requests over 7 days, end to end (includes time to first token).
fastest[].samples_bucketCoarse sample size: 200+, 1k+ or 10k+. Models need at least 200 streamed requests to appear.

How tokens are counted#

  • Tokens = input + output of every inference request on zrouter, including failed requests that consumed tokens. Cache reads are not counted. Health-check traffic is excluded.
  • Days follow Asia/Jakarta (UTC+7). Daily and weekly buckets start at 00:00 WIB.
  • Totals match the status page. The all window equals the lifetime tokens on the status page, minus image models.
  • Fresh for one minute. Results are computed at most once per minute per window and served from cache.