Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs_source/en/api/platform/statistics-app-leaderboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: Get App Leaderboard
- - meta
- name: keywords
content: Zenmux, API, statistics, apps, agents, leaderboard, ranking, tokens, cost, management
content: Zenmux, API, statistics, apps, agents, leaderboard, ranking, tokens, requests, cost, management
---

# Get App Leaderboard
Expand Down Expand Up @@ -55,6 +55,7 @@ Each endpoint has its own independent rate limit counter. The maximum number of
Which metric to rank by.

- `tokens` — total input + output token count
- `requests` — total request count attributed to the App / Agent
- `cost` — list-price cost in USD

### period `string`
Expand Down Expand Up @@ -92,7 +93,7 @@ Maximum number of entries to return, between `1` and `11` (top 10 plus the aggre

### data.metric `string`

Echo of the requested metric (`"tokens"` or `"cost"`).
Echo of the requested metric (`"tokens"`, `"requests"`, or `"cost"`).

### data.period `string`

Expand Down
5 changes: 3 additions & 2 deletions docs_source/en/api/platform/statistics-app-trending.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: Get App Trending
- - meta
- name: keywords
content: Zenmux, API, statistics, apps, agents, trending, growth, tokens, cost, management
content: Zenmux, API, statistics, apps, agents, trending, growth, tokens, requests, cost, management
---

# Get App Trending
Expand Down Expand Up @@ -59,6 +59,7 @@ Each endpoint has its own independent rate limit counter. The maximum number of
Which metric to rank and compute growth by.

- `tokens` — total input + output token count
- `requests` — total request count attributed to the App / Agent
- `cost` — list-price cost in USD

### bucket_width `string` <span style="color: #FA6062; font-weight: 400">&#42;</span>
Expand Down Expand Up @@ -93,7 +94,7 @@ Maximum number of entries to return, between `1` and `10`.

### data.metric `string`

Echo of the requested metric (`"tokens"` or `"cost"`).
Echo of the requested metric (`"tokens"`, `"requests"`, or `"cost"`).

### data.bucket_width `string`

Expand Down
9 changes: 5 additions & 4 deletions docs_source/en/api/platform/statistics-leaderboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: Get Statistics Leaderboard
- - meta
- name: keywords
content: Zenmux, API, statistics, leaderboard, ranking, tokens, cost, management
content: Zenmux, API, statistics, leaderboard, ranking, tokens, requests, cost, management
---

# Get Statistics Leaderboard
Expand All @@ -20,7 +20,7 @@ Encountering errors? See the [API Error Codes Reference](/guide/advanced/error-c
GET https://zenmux.ai/api/v1/management/statistics/leaderboard
```

Rank models by total token consumption or cost over a date range. Returns the top N models plus an aggregated "Others" entry for the remainder.
Rank models by total token consumption, request count, or cost over a date range. Returns the top N models plus an aggregated "Others" entry for the remainder.

Use this endpoint to see which models dominate platform traffic, compare spending across providers, or build leaderboard visualizations.

Expand Down Expand Up @@ -55,6 +55,7 @@ Each endpoint has its own independent rate limit counter. The maximum number of
Which metric to rank by.

- `tokens` — total input + output token count
- `requests` — total request count
- `cost` — list-price cost in USD

### starting_at `string`
Expand All @@ -81,7 +82,7 @@ Top N models to return.

### data.metric `string`

Echo of the requested metric (`"tokens"` or `"cost"`).
Echo of the requested metric (`"tokens"`, `"requests"`, or `"cost"`).

### data.starting_at `string`

Expand All @@ -100,7 +101,7 @@ Ranked list of models. Each entry contains:
- `label` `string` — Display name (e.g., "Claude Opus 4.6")
- `author` `string` — Provider slug (e.g., `anthropic`, `openai`). Empty for `__others__`.
- `author_label` `string` — Provider display name (e.g., "Anthropic"). Empty for `__others__`.
- `value` `number` — Total token count or USD cost over the date range
- `value` `number` — Total token count, request count, or USD cost over the date range

::: api-request GET /api/v1/management/statistics/leaderboard

Expand Down
7 changes: 4 additions & 3 deletions docs_source/en/api/platform/statistics-market-share.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: Get Statistics Market Share
- - meta
- name: keywords
content: Zenmux, API, statistics, market share, provider, tokens, cost, management
content: Zenmux, API, statistics, market share, provider, tokens, requests, cost, management
---

# Get Statistics Market Share
Expand Down Expand Up @@ -55,6 +55,7 @@ Each endpoint has its own independent rate limit counter. The maximum number of
Which metric to compute market share for.

- `tokens` — total input + output token count
- `requests` — total request count
- `cost` — list-price cost in USD

### bucket_width `string` <span style="color: #FA6062; font-weight: 400">&#42;</span>
Expand Down Expand Up @@ -94,7 +95,7 @@ Top N providers per bucket.

### data.metric `string`

Echo of the requested metric (`"tokens"` or `"cost"`).
Echo of the requested metric (`"tokens"`, `"requests"`, or `"cost"`).

### data.bucket_width `string`

Expand All @@ -121,7 +122,7 @@ Array of time buckets. Each bucket contains:
- `authors` `array` — Per-provider breakdown:
- `author` `string` — Provider slug (e.g., `anthropic`). `__others__` for providers outside top N.
- `label` `string` — Provider display name (e.g., "Anthropic")
- `value` `number` — Absolute token count or USD cost for this bucket (not a percentage)
- `value` `number` — Absolute token count, request count, or USD cost for this bucket (not a percentage)

::: info Computing percentages
The API returns absolute values. To compute market share percentages, divide each provider's value by the bucket total:
Expand Down
14 changes: 8 additions & 6 deletions docs_source/en/api/platform/statistics-model-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: Get daily model usage for a single model over a time range
- - meta
- name: keywords
content: Zenmux, API, statistics, model usage, tokens, cost, management
content: Zenmux, API, statistics, model usage, tokens, requests, cost, management
---

# Get Model Usage
Expand All @@ -20,7 +20,7 @@ Encountering errors? See the [API Error Codes Reference](/guide/advanced/error-c
GET https://zenmux.ai/api/v1/management/statistics/model_usage
```

Retrieve the token consumption or cost of a **specific model** over a time range, **returned as daily data**, together with an aggregate value for the entire range. Useful for single-model bill reconciliation, daily usage trend charts, and similar scenarios.
Retrieve the token consumption, request count, or cost of a **specific model** over a time range, **returned as daily data**, together with an aggregate value for the entire range. Useful for single-model bill reconciliation, daily usage trend charts, and similar scenarios.

Returns platform-wide aggregated data available from **2025-09-29** onward.

Expand Down Expand Up @@ -62,6 +62,7 @@ The model identifier (slug) to query, e.g. `anthropic/claude-opus-4.8`.
Which metric to retrieve.

- `tokens` — total input + output token count
- `requests` — total request count
- `cost` — list-price cost in USD

### starting_at `string` <span style="color: #FA6062; font-weight: 400">&#42;</span>
Expand Down Expand Up @@ -95,7 +96,7 @@ Model display name (e.g. `Claude Opus 4.8`). Falls back to the slug itself if th

### data.metric `string`

Echo of the requested metric (`"tokens"` or `"cost"`).
Echo of the requested metric (`"tokens"`, `"requests"`, or `"cost"`).

### data.starting_at `string`

Expand All @@ -110,14 +111,15 @@ Echo of the end date (`YYYY-MM-DD`).
The aggregate metric value for the model across the **entire range** (equal to the sum of each day's `value` in `series`):

- For `metric=tokens`, the total token count (integer).
- For `metric=requests`, the total request count (integer).
- For `metric=cost`, the USD cost.

### data.series `array`

Array broken down by day (sorted in ascending date order). Each element contains:

- `date` `string` — date, in `YYYY-MM-DD` format
- `value` `number` — token count or USD cost for that day. Days with no data do not appear in the series.
- `value` `number` — token count, request count, or USD cost for that day. Days with no data do not appear in the series.

::: api-request GET /api/v1/management/statistics/model_usage

Expand Down Expand Up @@ -167,6 +169,6 @@ curl -G https://zenmux.ai/api/v1/management/statistics/model_usage \

:::

::: info Querying cost
Set `metric` to `cost` to retrieve the USD cost for the same model over the same range. The response structure is identical; in this case `value` and `series[].value` represent cost amounts.
::: info Querying cost or request count
Set `metric` to `cost` to retrieve USD cost, or to `requests` to retrieve request count for the same model over the same range. The response structure is identical; `value` and `series[].value` represent the selected metric.
:::
9 changes: 5 additions & 4 deletions docs_source/en/api/platform/statistics-timeseries.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: Get Statistics Timeseries
- - meta
- name: keywords
content: Zenmux, API, statistics, timeseries, tokens, cost, management
content: Zenmux, API, statistics, timeseries, tokens, requests, cost, management
---

# Get Statistics Timeseries
Expand All @@ -20,7 +20,7 @@ Encountering errors? See the [API Error Codes Reference](/guide/advanced/error-c
GET https://zenmux.ai/api/v1/management/statistics/timeseries
```

Retrieve token consumption or cost over time, broken down by model. Returns platform-wide aggregated data available from **2025-09-29** onward.
Retrieve token consumption, request count, or cost over time, broken down by model. Returns platform-wide aggregated data available from **2025-09-29** onward.

Use this endpoint to build stacked bar charts of model usage, track spending trends, or export historical data to CSV.

Expand Down Expand Up @@ -55,6 +55,7 @@ Each endpoint has its own independent rate limit counter. The maximum number of
Which metric to retrieve.

- `tokens` — total input + output token count
- `requests` — total request count
- `cost` — list-price cost in USD

### bucket_width `string` <span style="color: #FA6062; font-weight: 400">&#42;</span>
Expand Down Expand Up @@ -94,7 +95,7 @@ Top N models per bucket.

### data.metric `string`

Echo of the requested metric (`"tokens"` or `"cost"`).
Echo of the requested metric (`"tokens"`, `"requests"`, or `"cost"`).

### data.bucket_width `string`

Expand All @@ -121,7 +122,7 @@ Array of time buckets. Each bucket contains:
- `models` `array` — Per-model breakdown:
- `model` `string` — Model slug (e.g., `anthropic/claude-sonnet-4-6`). `__others__` for models outside top N.
- `label` `string` — Display name (e.g., "Claude Sonnet 4.6")
- `value` `number` — Token count or USD cost for this bucket
- `value` `number` — Token count, request count, or USD cost for this bucket

::: api-request GET /api/v1/management/statistics/timeseries

Expand Down
5 changes: 3 additions & 2 deletions docs_source/en/api/platform/statistics-trending.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: Get Statistics Trending
- - meta
- name: keywords
content: Zenmux, API, statistics, trending, growth, models, tokens, cost, management
content: Zenmux, API, statistics, trending, growth, models, tokens, requests, cost, management
---

# Get Statistics Trending
Expand Down Expand Up @@ -57,6 +57,7 @@ Each endpoint has its own independent rate limit counter. The maximum number of
Which metric to rank growth by.

- `tokens` — total input + output token count
- `requests` — total request count
- `cost` — list-price cost in USD

### bucket_width `string` <span style="color: #FA6062; font-weight: 400">&#42;</span>
Expand Down Expand Up @@ -91,7 +92,7 @@ Top N models to return.

### data.metric `string`

Echo of the requested metric (`"tokens"` or `"cost"`).
Echo of the requested metric (`"tokens"`, `"requests"`, or `"cost"`).

### data.bucket_width `string`

Expand Down
5 changes: 3 additions & 2 deletions docs_source/zh/api/platform/statistics-app-leaderboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: 获取 App / Agent 排行榜
- - meta
- name: keywords
content: Zenmux, API, statistics, 统计, App, Agent, 应用, 排行榜, leaderboard, tokens, cost, management
content: Zenmux, API, statistics, 统计, App, Agent, 应用, 排行榜, leaderboard, tokens, requests, cost, management
---

# Get App Leaderboard
Expand Down Expand Up @@ -55,6 +55,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>
用于排名的指标。

- `tokens` — 输入 + 输出 Token 总数
- `requests` — 归属于该 App / Agent 的请求总次数
- `cost` — 按标价计算的 USD 成本

### period `string`
Expand Down Expand Up @@ -92,7 +93,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>

### data.metric `string`

请求指标的回显(`"tokens"` 或 `"cost"`)。
请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。

### data.period `string`

Expand Down
5 changes: 3 additions & 2 deletions docs_source/zh/api/platform/statistics-app-trending.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: 获取 App / Agent 增长榜
- - meta
- name: keywords
content: Zenmux, API, statistics, 统计, App, Agent, 应用, 增长榜, trending, tokens, cost, management
content: Zenmux, API, statistics, 统计, App, Agent, 应用, 增长榜, trending, tokens, requests, cost, management
---

# Get App Trending
Expand Down Expand Up @@ -59,6 +59,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>
用于排名与计算增长率的指标。

- `tokens` — 输入 + 输出 Token 总数
- `requests` — 归属于该 App / Agent 的请求总次数
- `cost` — 按标价计算的 USD 成本

### bucket_width `string` <span style="color: #FA6062; font-weight: 400">\*</span>
Expand Down Expand Up @@ -93,7 +94,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>

### data.metric `string`

请求指标的回显(`"tokens"` 或 `"cost"`)。
请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。

### data.bucket_width `string`

Expand Down
9 changes: 5 additions & 4 deletions docs_source/zh/api/platform/statistics-leaderboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: 获取统计排行榜
- - meta
- name: keywords
content: Zenmux, API, statistics, 统计, 排行榜, leaderboard, tokens, cost, management
content: Zenmux, API, statistics, 统计, 排行榜, leaderboard, tokens, requests, cost, management
---

# Get Statistics Leaderboard
Expand All @@ -20,7 +20,7 @@ head:
GET https://zenmux.ai/api/v1/management/statistics/leaderboard
```

按 Token 消耗量或成本对模型进行排名。返回 Top N 模型及一条聚合的 "Others" 条目。
按 Token 消耗量、请求次数或成本对模型进行排名。返回 Top N 模型及一条聚合的 "Others" 条目。

可用于了解平台流量最大的模型、对比各供应商的消费情况,或构建排行榜可视化。

Expand Down Expand Up @@ -55,6 +55,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>
排名依据的指标类型。

- `tokens` — 输入 + 输出 Token 总数
- `requests` — 请求总次数
- `cost` — 按标价计算的 USD 成本

### starting_at `string`
Expand All @@ -81,7 +82,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>

### data.metric `string`

请求指标的回显(`"tokens"` 或 `"cost"`)。
请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。

### data.starting_at `string`

Expand All @@ -100,7 +101,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>
- `label` `string` — 展示名称(如 "Claude Opus 4.6")
- `author` `string` — 供应商标识(如 `anthropic`、`openai`)。`__others__` 为空。
- `author_label` `string` — 供应商展示名称(如 "Anthropic")。`__others__` 为空。
- `value` `number` — 日期范围内的 Token 总数或 USD 总成本
- `value` `number` — 日期范围内的 Token 总数、请求总次数或 USD 总成本

::: api-request GET /api/v1/management/statistics/leaderboard

Expand Down
7 changes: 4 additions & 3 deletions docs_source/zh/api/platform/statistics-market-share.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ head:
content: 获取统计市场份额
- - meta
- name: keywords
content: Zenmux, API, statistics, 统计, 市场份额, market share, tokens, cost, management
content: Zenmux, API, statistics, 统计, 市场份额, market share, tokens, requests, cost, management
---

# Get Statistics Market Share
Expand Down Expand Up @@ -55,6 +55,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>
计算市场份额所使用的指标。

- `tokens` — 输入 + 输出 Token 总数
- `requests` — 请求总次数
- `cost` — 按标价计算的 USD 成本

### bucket_width `string` <span style="color: #FA6062; font-weight: 400">\*</span>
Expand Down Expand Up @@ -94,7 +95,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>

### data.metric `string`

请求指标的回显(`"tokens"` 或 `"cost"`)。
请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。

### data.bucket_width `string`

Expand All @@ -121,7 +122,7 @@ Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>
- `authors` `array` — 按供应商拆分:
- `author` `string` — 供应商标识(如 `anthropic`)。Top N 之外的为 `__others__`。
- `label` `string` — 供应商展示名称(如 "Anthropic")
- `value` `number` — 该桶内的 Token 绝对数或 USD 绝对成本(非百分比)
- `value` `number` — 该桶内的 Token 数、请求次数或 USD 成本(均为绝对值,非百分比)

::: info 计算百分比
接口返回绝对值。要计算市场份额百分比,将每个供应商的值除以该桶的总值:
Expand Down
Loading