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#
/api/rankingsToken usage rankings for one rolling window. Cached for 60 seconds (Cache-Control: public, max-age=60).
Parameters
weekRolling 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).
dayweekmonthalltextOnly text models are ranked today. Image models are not included.
textRequest Example
curl https://api.zrouter.dev/api/rankings?window=weekResponses
{
"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+" }
]
}Fields#
| Field | Meaning |
|---|---|
range.from / range.to | Window bounds (UTC, minute precision). to is when the snapshot was taken. |
range.previous_from | Start of the comparison period of equal length right before from; null for all. |
range.data_since | First day with recorded usage (Asia/Jakarta calendar date). |
totals.tokens | All text tokens in the window: the leaderboard plus other.tokens. |
leaderboard[].listed | Always true: models that are not currently in the public catalog are counted in Other instead of being named. |
leaderboard[].change_pct | Integer percentage vs the previous period; null when is_new is true or for all. |
other.tokens | Tokens of models that are not shown by name. |
series | Chart 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_bp | Market share in basis points (1/100 of a percent). Always sums to exactly 10000. |
trending | Visible 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_p50 | Median output tokens per second over 7 days, measured at the server from the first token to the last token written to you. Only successful streamed requests with at least 100 upstream-reported output tokens and at least 500 ms between those two tokens count. See How speed is measured. |
fastest[].samples_bucket | Coarse 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
allwindow 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.
How speed is measured#
- One clock per request, at the server. The clock starts when zrouter receives the request, before authentication, and the same start is used for time to first token and for total time.
- Time to first token (TTFT) ends when the first chunk with text, reasoning or a tool call is written to you. Role frames, pings,
message_start,response.created, keepalives and usage-only chunks do not count. Non-stream requests have no TTFT. - Total time ends when the last token chunk is written to you. Billing and settlement time after that is not included. If a provider failed first and zrouter switched to another one, that time is included in both numbers.
- Tokens per second = output tokens ÷ (total time − time to first token), rounded to one decimal, so waiting for the first token is not counted as generation. Output tokens are the billed output, including reasoning. Only successful streamed requests with at least 100 output tokens and at least 500 ms of generation get a value.
- What the Fastest list counts. Successful streamed requests with token counts reported by the provider (never an estimate), at least 100 output tokens and at least 500 ms of generation. The value is the median per request over 7 days, and a model needs at least 200 such requests to appear. Requests recorded before the server started measuring time to first token are not used.