> ## Documentation Index
> Fetch the complete documentation index at: https://teamcopilot.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Token usage analytics

> Use the token usage dashboard to review estimated cost, token counts, and usage trends over time.

TeamCopilot exposes **token usage analytics** in the web app: estimated spend, token volumes, and how they move day by day. The dashboard is about **usage and cost**, not individual users or org-wide adoption metrics.

## What you can see

In the TeamCopilot web app, open the **Token Usage** tab. You get:

* **Summary metrics** for the selected period:
  * **Estimated cost** — approximate cost from model usage
  * **Total tokens** plus **input**, **output**, and **cached** token counts
  * **Tracked sessions** — how many sessions the aggregates are based on (context for the token totals, not a separate “team” report)
* **Charts over time**:
  * **Estimated cost over time** — daily bars to compare spend across days
  * **Token usage over time** — stacked bars by token type per day on the same timeline

Together, these help you see spikes in cost or tokens, compare one day to another, and see how much traffic is served from **cache** versus fresh **input**/**output** tokens.

The totals are derived from tracked chat sessions in the workspace database.

## How cost is calculated

TeamCopilot calculates estimated cost from the configured model and the token counts recorded for each completed assistant message.

Pricing is applied per million tokens for:

* input tokens
* cached input tokens
* output tokens

In case you are seeing `$0` as the cost, or you are not seeing cost at all, you need to add these pricing env vars to the TeamCopilot setup:

* `TEAMCOPILOT_MODEL_INPUT_PER_MILLION_USD`
* `TEAMCOPILOT_MODEL_CACHED_INPUT_PER_MILLION_USD`
* `TEAMCOPILOT_MODEL_OUTPUT_PER_MILLION_USD`

All three values must be set together. If only one or two are set, TeamCopilot throws an error and will not use the partial override.

These values tell TeamCopilot how to calculate estimated cost for the currently configured `OPENCODE_MODEL`.

If no supported pricing is available for the configured model, the dashboard shows that pricing is unavailable and estimated cost may be `0` for those entries.

## Time ranges

Use the range control at the top (for example **24 hours**, **7 days**, **30 days**, or **90 days**). Summary figures and charts all use that window.

## Accuracy and limitations

Figures are **estimates derived from tracked sessions**. Some activity may be missing from the totals. Use them for trends and rough budgeting, not as an exact bill.

## Screenshot

The **Token Usage** tab, showing cost and token analytics:

<img src="https://mintcdn.com/teamcopilot/oK8kff1FlLJwLJjR/images/token-usage-analytics.png?fit=max&auto=format&n=oK8kff1FlLJwLJjR&q=85&s=bf102406a8d63498310df076da6c0582" alt="Token Usage tab showing estimated cost, token metrics, and cost/token charts over time" width="2584" height="1444" data-path="images/token-usage-analytics.png" />
