diff --git a/docs_source/en/api/platform/statistics-app-leaderboard.md b/docs_source/en/api/platform/statistics-app-leaderboard.md index 08bd90c..706b266 100644 --- a/docs_source/en/api/platform/statistics-app-leaderboard.md +++ b/docs_source/en/api/platform/statistics-app-leaderboard.md @@ -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 @@ -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` @@ -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` diff --git a/docs_source/en/api/platform/statistics-app-trending.md b/docs_source/en/api/platform/statistics-app-trending.md index a39c711..ae50deb 100644 --- a/docs_source/en/api/platform/statistics-app-trending.md +++ b/docs_source/en/api/platform/statistics-app-trending.md @@ -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 @@ -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` * @@ -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` diff --git a/docs_source/en/api/platform/statistics-leaderboard.md b/docs_source/en/api/platform/statistics-leaderboard.md index ec50d77..f0db239 100644 --- a/docs_source/en/api/platform/statistics-leaderboard.md +++ b/docs_source/en/api/platform/statistics-leaderboard.md @@ -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 @@ -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. @@ -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` @@ -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` @@ -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 diff --git a/docs_source/en/api/platform/statistics-market-share.md b/docs_source/en/api/platform/statistics-market-share.md index 28a7d62..9505498 100644 --- a/docs_source/en/api/platform/statistics-market-share.md +++ b/docs_source/en/api/platform/statistics-market-share.md @@ -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 @@ -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` * @@ -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` @@ -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: diff --git a/docs_source/en/api/platform/statistics-model-usage.md b/docs_source/en/api/platform/statistics-model-usage.md index 5120d82..20fa20f 100644 --- a/docs_source/en/api/platform/statistics-model-usage.md +++ b/docs_source/en/api/platform/statistics-model-usage.md @@ -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 @@ -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. @@ -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` * @@ -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` @@ -110,6 +111,7 @@ 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` @@ -117,7 +119,7 @@ The aggregate metric value for the model across the **entire range** (equal to t 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 @@ -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. ::: diff --git a/docs_source/en/api/platform/statistics-timeseries.md b/docs_source/en/api/platform/statistics-timeseries.md index 9ef8e56..fb77f3b 100644 --- a/docs_source/en/api/platform/statistics-timeseries.md +++ b/docs_source/en/api/platform/statistics-timeseries.md @@ -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 @@ -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. @@ -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` * @@ -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` @@ -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 diff --git a/docs_source/en/api/platform/statistics-trending.md b/docs_source/en/api/platform/statistics-trending.md index c49b9da..ea78cef 100644 --- a/docs_source/en/api/platform/statistics-trending.md +++ b/docs_source/en/api/platform/statistics-trending.md @@ -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 @@ -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` * @@ -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` diff --git a/docs_source/zh/api/platform/statistics-app-leaderboard.md b/docs_source/zh/api/platform/statistics-app-leaderboard.md index 8131df7..4226dad 100644 --- a/docs_source/zh/api/platform/statistics-app-leaderboard.md +++ b/docs_source/zh/api/platform/statistics-app-leaderboard.md @@ -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 @@ -55,6 +55,7 @@ Authorization: Bearer 用于排名的指标。 - `tokens` — 输入 + 输出 Token 总数 +- `requests` — 归属于该 App / Agent 的请求总次数 - `cost` — 按标价计算的 USD 成本 ### period `string` @@ -92,7 +93,7 @@ Authorization: Bearer ### data.metric `string` -请求指标的回显(`"tokens"` 或 `"cost"`)。 +请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。 ### data.period `string` diff --git a/docs_source/zh/api/platform/statistics-app-trending.md b/docs_source/zh/api/platform/statistics-app-trending.md index f40d4af..3110e17 100644 --- a/docs_source/zh/api/platform/statistics-app-trending.md +++ b/docs_source/zh/api/platform/statistics-app-trending.md @@ -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 @@ -59,6 +59,7 @@ Authorization: Bearer 用于排名与计算增长率的指标。 - `tokens` — 输入 + 输出 Token 总数 +- `requests` — 归属于该 App / Agent 的请求总次数 - `cost` — 按标价计算的 USD 成本 ### bucket_width `string` \* @@ -93,7 +94,7 @@ Authorization: Bearer ### data.metric `string` -请求指标的回显(`"tokens"` 或 `"cost"`)。 +请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。 ### data.bucket_width `string` diff --git a/docs_source/zh/api/platform/statistics-leaderboard.md b/docs_source/zh/api/platform/statistics-leaderboard.md index bf9789c..b31ce9d 100644 --- a/docs_source/zh/api/platform/statistics-leaderboard.md +++ b/docs_source/zh/api/platform/statistics-leaderboard.md @@ -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 @@ -20,7 +20,7 @@ head: GET https://zenmux.ai/api/v1/management/statistics/leaderboard ``` -按 Token 消耗量或成本对模型进行排名。返回 Top N 模型及一条聚合的 "Others" 条目。 +按 Token 消耗量、请求次数或成本对模型进行排名。返回 Top N 模型及一条聚合的 "Others" 条目。 可用于了解平台流量最大的模型、对比各供应商的消费情况,或构建排行榜可视化。 @@ -55,6 +55,7 @@ Authorization: Bearer 排名依据的指标类型。 - `tokens` — 输入 + 输出 Token 总数 +- `requests` — 请求总次数 - `cost` — 按标价计算的 USD 成本 ### starting_at `string` @@ -81,7 +82,7 @@ Authorization: Bearer ### data.metric `string` -请求指标的回显(`"tokens"` 或 `"cost"`)。 +请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。 ### data.starting_at `string` @@ -100,7 +101,7 @@ Authorization: Bearer - `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 diff --git a/docs_source/zh/api/platform/statistics-market-share.md b/docs_source/zh/api/platform/statistics-market-share.md index ca303de..9b6b33e 100644 --- a/docs_source/zh/api/platform/statistics-market-share.md +++ b/docs_source/zh/api/platform/statistics-market-share.md @@ -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 @@ -55,6 +55,7 @@ Authorization: Bearer 计算市场份额所使用的指标。 - `tokens` — 输入 + 输出 Token 总数 +- `requests` — 请求总次数 - `cost` — 按标价计算的 USD 成本 ### bucket_width `string` \* @@ -94,7 +95,7 @@ Authorization: Bearer ### data.metric `string` -请求指标的回显(`"tokens"` 或 `"cost"`)。 +请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。 ### data.bucket_width `string` @@ -121,7 +122,7 @@ Authorization: Bearer - `authors` `array` — 按供应商拆分: - `author` `string` — 供应商标识(如 `anthropic`)。Top N 之外的为 `__others__`。 - `label` `string` — 供应商展示名称(如 "Anthropic") - - `value` `number` — 该桶内的 Token 绝对数或 USD 绝对成本(非百分比) + - `value` `number` — 该桶内的 Token 数、请求次数或 USD 成本(均为绝对值,非百分比) ::: info 计算百分比 接口返回绝对值。要计算市场份额百分比,将每个供应商的值除以该桶的总值: diff --git a/docs_source/zh/api/platform/statistics-model-usage.md b/docs_source/zh/api/platform/statistics-model-usage.md index 3f98a1d..79ef36a 100644 --- a/docs_source/zh/api/platform/statistics-model-usage.md +++ b/docs_source/zh/api/platform/statistics-model-usage.md @@ -7,7 +7,7 @@ head: content: 查询单个模型在时间段内的按天用量 - - meta - name: keywords - content: Zenmux, API, statistics, 统计, 模型用量, tokens, cost, management + content: Zenmux, API, statistics, 统计, 模型用量, tokens, requests, cost, management --- # Get Model Usage @@ -20,7 +20,7 @@ head: GET https://zenmux.ai/api/v1/management/statistics/model_usage ``` -查询**指定模型**在某个时间段内的 Token 消耗量或成本,**按天返回每日数据**,同时给出整个区间的汇总值。适合做单模型账单核对、每日用量趋势图等场景。 +查询**指定模型**在某个时间段内的 Token 消耗量、请求次数或成本,**按天返回每日数据**,同时给出整个区间的汇总值。适合做单模型账单核对、每日用量趋势图等场景。 返回平台范围内从 **2025-09-29** 起的聚合数据。 @@ -62,6 +62,7 @@ Authorization: Bearer 要获取的指标类型。 - `tokens` — 输入 + 输出 Token 总数 +- `requests` — 请求总次数 - `cost` — 按标价计算的 USD 成本 ### starting_at `string` \* @@ -95,7 +96,7 @@ Authorization: Bearer ### data.metric `string` -请求指标的回显(`"tokens"` 或 `"cost"`)。 +请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。 ### data.starting_at `string` @@ -110,6 +111,7 @@ Authorization: Bearer 该模型在**整个区间**内的指标汇总值(等于 `series` 中各天 `value` 之和): - `metric=tokens` 时为 Token 总数(整数)。 +- `metric=requests` 时为请求总次数(整数)。 - `metric=cost` 时为 USD 成本。 ### data.series `array` @@ -117,7 +119,7 @@ Authorization: Bearer 按天拆分的数组(按日期升序),每个元素包含: - `date` `string` — 日期,格式 `YYYY-MM-DD` -- `value` `number` — 当天的 Token 数或 USD 成本。无数据的日期不会出现在序列中。 +- `value` `number` — 当天的 Token 数、请求次数或 USD 成本。无数据的日期不会出现在序列中。 ::: api-request GET /api/v1/management/statistics/model_usage @@ -167,6 +169,6 @@ curl -G https://zenmux.ai/api/v1/management/statistics/model_usage \ ::: -::: info 查询成本 -将 `metric` 改为 `cost` 即可查询同一模型同一区间的 USD 成本,响应结构相同,`value` 与 `series[].value` 此时为成本金额。 +::: info 查询成本或请求次数 +将 `metric` 改为 `cost` 可查询 USD 成本,改为 `requests` 可查询同一模型同一区间的请求次数。响应结构相同,`value` 与 `series[].value` 表示所选指标。 ::: diff --git a/docs_source/zh/api/platform/statistics-timeseries.md b/docs_source/zh/api/platform/statistics-timeseries.md index 3560f51..234ec2b 100644 --- a/docs_source/zh/api/platform/statistics-timeseries.md +++ b/docs_source/zh/api/platform/statistics-timeseries.md @@ -7,7 +7,7 @@ head: content: 获取统计时间序列 - - meta - name: keywords - content: Zenmux, API, statistics, 统计, 时间序列, tokens, cost, management + content: Zenmux, API, statistics, 统计, 时间序列, tokens, requests, cost, management --- # Get Statistics Timeseries @@ -20,7 +20,7 @@ head: GET https://zenmux.ai/api/v1/management/statistics/timeseries ``` -获取按模型维度拆分的 Token 消耗量或成本时间序列数据。返回平台范围内从 **2025-09-29** 起的聚合数据。 +获取按模型维度拆分的 Token 消耗量、请求次数或成本时间序列数据。返回平台范围内从 **2025-09-29** 起的聚合数据。 可用于构建堆叠柱状图、追踪消费趋势,或将历史数据导出为 CSV。 @@ -55,6 +55,7 @@ Authorization: Bearer 要获取的指标类型。 - `tokens` — 输入 + 输出 Token 总数 +- `requests` — 请求总次数 - `cost` — 按标价计算的 USD 成本 ### bucket_width `string` \* @@ -94,7 +95,7 @@ Authorization: Bearer ### data.metric `string` -请求指标的回显(`"tokens"` 或 `"cost"`)。 +请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。 ### data.bucket_width `string` @@ -121,7 +122,7 @@ Authorization: Bearer - `models` `array` — 按模型拆分: - `model` `string` — 模型标识(如 `anthropic/claude-sonnet-4-6`)。Top N 之外的为 `__others__`。 - `label` `string` — 展示名称(如 "Claude Sonnet 4.6") - - `value` `number` — 该桶内的 Token 数或 USD 成本 + - `value` `number` — 该桶内的 Token 数、请求次数或 USD 成本 ::: api-request GET /api/v1/management/statistics/timeseries diff --git a/docs_source/zh/api/platform/statistics-trending.md b/docs_source/zh/api/platform/statistics-trending.md index f2a5677..d2c077b 100644 --- a/docs_source/zh/api/platform/statistics-trending.md +++ b/docs_source/zh/api/platform/statistics-trending.md @@ -7,7 +7,7 @@ head: content: 获取统计增长榜 - - meta - name: keywords - content: Zenmux, API, statistics, 统计, 增长榜, trending, 增长率, tokens, cost, management + content: Zenmux, API, statistics, 统计, 增长榜, trending, 增长率, tokens, requests, cost, management --- # Get Statistics Trending @@ -57,6 +57,7 @@ Authorization: Bearer 用于计算增长率的指标。 - `tokens` — 输入 + 输出 Token 总数 +- `requests` — 请求总次数 - `cost` — 按标价计算的 USD 成本 ### bucket_width `string` \* @@ -91,7 +92,7 @@ Authorization: Bearer ### data.metric `string` -请求指标的回显(`"tokens"` 或 `"cost"`)。 +请求指标的回显(`"tokens"`、`"requests"` 或 `"cost"`)。 ### data.bucket_width `string`