Page summary

Review routed requests, tokens, cache hits, cost, and quota statistics.

Key takeaways
  • Track requests, tokens, cache hits, costs, and quota in one local view.
  • Use usage data to choose the right provider for each workflow.
  • Review this page when debugging unexpected quota or billing changes.

4.4 Usage Statistics

Overview

The usage statistics feature records and analyzes API request data, helping you:

Usage is a global page in the sidebar. Usage data comes from two sources:

Data SourceCoverageLocal Routing Required?
Routing request logAll requests forwarded through local routingYes
CLI session logLocal session logs of Claude Code, Codex, Gemini CLI, Grok Build, OpenCode, Pi, MiniMax CodeNo

Prerequisites

Depending on which data source you use, the prerequisites differ:

Routing request log (covers all requests forwarded through local routing):

  1. ✅ Local routing started
  2. ✅ Routing enabled for the corresponding app
  3. ✅ "Record request usage" turned on (on by default, under Settings → Local routing)

CLI session log (no local routing required):

  1. ✅ The corresponding CLI has session history files
  2. ✅ "Scan session logs automatically" stays on (on by default). When it's off, scanning only happens when you click "Sync Now"
  3. ✅ CC Switch scans once at startup, then every 10 minutes in the background. Opening the Usage page scans right away and keeps scanning at the selected interval

Session logs can't tell which provider was used, so for these records the Provider column shows "{App} · Session logs".

Open Usage Statistics

Click Usage in the left sidebar. It's a global page: you don't need to pick an app first, or turn on local routing.

The top right of the page has:

Usage

Statistics Overview

Summary Cards

Key metrics displayed at the top of the page:

MetricDescription
Total CostCost estimated from the pricing configuration
Total RequestsTotal number of requests in the time period
Tokens ProcessedFresh input + output + cache writes + cache hits
Cache Hit RateCache hits ÷ (fresh input + cache writes + cache hits)

Click "More metrics" to expand the separate numbers for fresh input, output, cache writes and cache hits. Some protocols (such as OpenAI) don't report cache writes, so cache writes and tokens processed may read low.

When you change the time range, app, provider or model filter, these numbers update together and stay aligned with the logs and stats below.

Time Range and Filters

Time rangeDescription
TodayFrom 00:00 today to now
Last 24 hours / Last 7 days / Last 14 days / Last 30 daysThe corresponding period up to now
AllAll history
Calendar FilterCustom start and end date and time

The filter row lets you:

OpenClaw and Hermes don't support usage statistics yet.

Heatmap and Trend Charts

Usage Heatmap

Shows daily usage over the last 53 weeks; darker colors mean more usage.

A line chart showing change over time; switch between three metrics: Tokens / Requests / Cost:

💡 Cache Token explanation: Anthropic API supports Prompt Caching. Creating cache incurs a higher fee (typically 1.25x input price), but subsequent cache hits only charge 0.1x, significantly reducing costs for repeated requests.

Detailed Data

Four tabs at the bottom of the page: Request Logs, Providers, Models, Pricing (pricing is covered in the next section).

Request Logs

Record of each request:

FieldDescription
TimeRequest time
AppThe app it belongs to
ProviderProvider name used (records imported from session logs show "{App} · Session logs")
ModelRequested model
Fresh InputInput tokens, excluding cache
OutputOutput tokens
Cache HitCache hit token count
CostEstimated cost (USD); models without pricing show "Unpriced"
SpeedOutput tokens per second (see below)

Hover to see details such as duration, time to first token and cache writes; click a request row to open the details panel, which shows the source (the routing service with its status code, or a session log), token usage, a cost breakdown and performance info. The status code filter at the top right of the table lets you view only requests with a certain kind of status code.

How Speed Is Calculated

Speed is output tokens per second, measured from the first token to the end. It's only counted for requests that went through local routing and output at least 100 tokens; for models that don't expose their thinking, it's an approximation.

With routing off, speed is estimated from session log timestamps and shown as "≈ xx tok/s": there's no first-token timing and the wait for the first token is included, so it reads low, and only requests with at least 200 output tokens are estimated.

Providers

Statistics grouped by provider: requests, tokens, cost, success rate, speed.

Models

Statistics grouped by model: requests, tokens, cost, average cost, success rate, speed.

Data Sources Panel

Click "Data sources" at the top right of the page to open it:

Pricing Configuration

Open Pricing Configuration

Usage page → Pricing tab

"Pricing Defaults" at the top of the page decides whether each app matches pricing by the "requested model" or the "returned model"; click "Change" to adjust it. It only applies to requests through local routing; usage imported from session logs is priced by the model recorded in the log.

Below it is the "Model Pricing" table. Besides entering prices manually, you can click "Import from models.dev" in the "Add Pricing" / "Edit Pricing" dialog to import public model pricing.

Configure Model Prices

Set prices for each model (per million tokens):

FieldDescription
Model IDModel identifier (e.g., claude-3-sonnet)
Display NameCustom display name
Input PricePrice per million input tokens
Output PricePrice per million output tokens
Cache Read PricePrice per million cache hit tokens
Cache Creation PricePrice per million cache creation tokens

Model ID Normalization Rules

Before matching pricing, CC Switch normalizes the requested model ID:

When adding pricing entries, enter the normalized Model ID rather than the full raw model name from the request.

Raw model nameModel ID to enterNote
stepfun-ai/step-3.5-flashstep-3.5-flashRemoves the provider prefix
moonshotai/kimi-k2-0905:exakimi-k2-0905Removes the prefix and the : suffix
gpt-5.2-codex@lowgpt-5.2-codex-lowReplaces @ with -
OpenAI/GPT-5.5-2026-05-14gpt-5.5Removes the prefix and date suffix
anthropic/claude-opus-4.8claude-opus-4-8Removes the prefix and matches dotted format
global.anthropic.claude-opus-4-8-v1:0claude-opus-4-8Removes wrapper prefix, version suffix, and : suffix
claude-haiku-4-5claude-haiku-4-5-20251001Matches a short ID to versioned pricing

Operations

The Pricing tab also has "Automatic models.dev pricing sync": when on, CC Switch updates the prices of the models you choose from models.dev at startup (at most once every 6 hours). Both built-in and manually set prices for the same model ID are overwritten, so a confirmation appears before you turn it on. You can "Choose models", or let it include common models automatically.

Preset Prices

CC Switch includes preset official prices for common models (per million tokens). v3.13.0 corrects CNY → USD pricing for several models and adds previously missing model definitions; it also fixes MiniMax plan quota math and the 0% → 100% usage progress display, making cost estimates and plan progress more accurate.

Claude Series (USD):

ModelInputOutputCache ReadCache Creation
Claude 4.8 Series
claude-opus-4-8$5$25$0.50$6.25
Claude 4.5 Series
claude-opus-4-5$5$25$0.50$6.25
claude-sonnet-4-5$3$15$0.30$3.75
claude-haiku-4-5$1$5$0.10$1.25
Claude 4 Series
claude-opus-4$15$75$1.50$18.75
claude-opus-4-1$15$75$1.50$18.75
claude-sonnet-4$3$15$0.30$3.75
Claude 3.5 Series
claude-3-5-sonnet$3$15$0.30$3.75
claude-3-5-haiku$0.80$4$0.08$1.00

OpenAI Series / Codex (USD):

ModelInputOutputCache Read
GPT-5.2 Series
gpt-5.2$1.75$14$0.175
GPT-5.1 Series
gpt-5.1$1.25$10$0.125
GPT-5 Series
gpt-5$1.25$10$0.125

Note: Codex presets include low/medium/high variants with prices identical to the base model.

Gemini Series (USD):

ModelInputOutputCache Read
Gemini 3 Series
gemini-3-pro-preview$2$12$0.20
gemini-3-flash-preview$0.50$3$0.05
Gemini 2.5 Series
gemini-2.5-pro$1.25$10$0.125
gemini-2.5-flash$0.30$2.50$0.03

Chinese Provider Models:

Note: Currency follows each provider's official pricing page. StepFun is currently listed in USD.

DeepSeek compatibility: Legacy model IDs deepseek-chat / deepseek-reasoner now alias to deepseek-v4-flash (non-thinking / thinking modes) and are billed at v4-flash rates.

ModelInputOutputCache Read
StepFun
step-3.5-flash$0.10$0.30$0.02
DeepSeek
deepseek-v4-flash¥1.00¥2.00¥0.20
deepseek-v4-pro¥12.00¥24.00¥1.00
Kimi (Moonshot)
kimi-k2-thinking¥4.00¥16.00¥1.00
kimi-k2¥4.00¥16.00¥1.00
kimi-k2-turbo¥8.00¥58.00¥1.00
MiniMax
minimax-m2.1¥2.10¥8.40¥0.21
minimax-m2.1-lightning¥2.10¥16.80¥0.21
Others
glm-4.7¥2.00¥8.00¥0.40
doubao-seed-code¥1.20¥8.00¥0.24
mimo-v2-flashFreeFree-

Custom Prices

If using relay services, prices may differ:

  1. Click the "Edit" button
  2. Modify prices
  3. Save

FAQ

Statistics Data Is Empty

Check:

Cost Estimates Are Inaccurate

Possible causes:

Solutions:

Token Count Differs from Provider

CC Switch uses its own method to estimate token counts, which may slightly differ from the provider's calculation. Refer to the provider's invoice for authoritative numbers.