Skip to content
This page is a translation of the authoritative Chinese source and may lag behind.View the original

Statistics page

The Statistics page aggregates request usage, breaks it down by model/key/group dimensions, and supports time-series display. Data is persisted to the database at 1-minute granularity.

Entry: Console → Statistics (visible to admin and monitor).

Summary cards

Seven cards at the top, reflecting totals for the selected period:

CardMeaning
Total requestsAll requests in the period
Successful requests2xx
Error requests4xx + 5xx
Average latencymilliseconds
Input TokenInput tokens counted by the upstream
Output TokenOutput tokens counted by the upstream
Cache read TokenTokens hit in the prompt cache

Dimension switching

group_by switches the breakdown dimension:

DimensionMain table first column
modelBy model
access_keyBy access key (expandable)
access_key_groupBy key group

Remaining columns of the main table: request count, success count, error count, success rate, average latency, input tokens, output tokens, cache read tokens.

Time range

  • Presets: 24h (default) / 7d / 30d
  • Custom: pick start and end times with the DateRangePicker, supporting relative expressions

Time-series chart

Granularity is chosen automatically based on the selected period (targeting about 120–720 data points):

Time spanGranularity
≤ 24h5 minutes
≤ 2d15 minutes
≤ 7d1 hour
≤ 30d4 hours
≤ 90d12 hours
> 90d1 day

Shows curves of token usage (input+output by model) and request count (total/success/error).

Export Excel

The export entry is on the billing page (Console → SettingsBillingMonthly costs): pick a month and click export to get an Excel with 6 sheets (model / access key / key group / access key × model distribution / day / week time dimensions), with costs split into columns by currency. See Export billing Excel and log troubleshooting for details.

Notes

  • count_tokens requests (the Anthropic token-counting endpoint) are not counted in statistics, because they do not actually call the upstream and produce no cost.
  • Persisted statistics are stored in 1-minute buckets; the current minute bucket is lost if the gateway crashes, while completed minute buckets are retained.
  • Statistics and billing record the final mapped model name. If an access key / key group has an identity-scoped model mapping configured (e.g. claude-opus-5 → qwen3.7-max), the Statistics page, Excel export, and bills will only show rows with the target name qwen3.7-max and will not show rows with the source name claude-opus-5 — mapping is fully transparent to statistics and billing. If you need to attribute by the client-side source name, record it on the client side yourself. See Configure identity-scoped model mapping for details.

FAQ

Q: Request counts in statistics don't match the logs? Statistics are aggregated at 1-minute granularity, while logs are per-request records. Within a short time window there may be up to 1 minute of flush delay. count_tokens requests appear in logs but are not counted in statistics.

Q: Token counts are high? Confirm whether count_tokens was also counted — it is not counted in statistics. If still high, check whether an upstream returned an inflated usage field.

Q: I configured model mapping, why can't I see the model name the client requested in statistics? Because statistics and billing use the final mapped model name. When the client requests claude-opus-5 and it is mapped to qwen3.7-max, statistics only record qwen3.7-max. This is expected behavior; see Configure identity-scoped model mapping for details.

Next: Overview dashboard for a global view; Export billing Excel and log troubleshooting for the export operation; Log viewer for per-request details.