# Track usage and cost

Speedwave shows what a project is using and spending in two places: a live strip below the chat composer, and an LLM usage page that aggregates every request the project has made. Both read from the same recorded usage, a JSON Lines file at `<data_dir>/usage/<project>/proxy/usage.jsonl`. See [token and credential paths](/docs/reference/token-paths/) for how the data directory is laid out.

## Check usage for a project

1. During a session, glance at the session stats strip below the chat composer: input tokens (`in`), output tokens (`out`), context window fill (`ctx`), your subscription rate limit if you are on one (`limit`), and project cost so far (`chat`). Hover a field for details.
2. Inside the container, check Claude Code's own CLI statusline for the same data in one line:

   ```text
   claude-opus-4-8 │ feat/docs │ CTX ██░░░ 40% │ 5h ██░░░ 30% reset 16:42 │ 7d █░░░░ 12% reset 14.04 │ $0.1409
   ```

   Rate limits appear only on a Claude subscription, and cost appears only on an API key.
3. For totals and trends, open the LLM usage page. It covers one project at a time rather than rolling several into one total.
4. The cards at the top cover the period: requests, tokens in and out, prompt-cache hit rate, average speed, errors, and cost. Average speed is decode-phase throughput, so it reflects generation speed, not time spent waiting.
5. Below the cards: a daily tokens chart, a tokens-by-provider breakdown, a weekday-by-hour heatmap, and a per-day, per-model table.

Speedwave dedupes usage records by response ID (or, on OpenRouter, its generation ID); the first capture wins. An unparseable log line is skipped and counted, shown as "N records skipped" rather than dropped silently. A project with no usage file yet just shows an empty summary, not an error.
**Live preview vs final number:** While a turn runs, the cost shown is Claude Code's live estimate. Once the request is recorded, the strip settles to the value Speedwave has on file for your provider. Totals are summed only over requests still inside the current usage window, so the footer total always matches the usage page's grand total, even right after old usage logs roll over.

## What drives cost

Cost depends on which provider a project uses, set in **Settings -> LLM providers**. The same figure appears in the strip, the usage page, and the statusline, so switching providers changes what you see in all three at once. See [LLM providers](/docs/features/llm-providers/) for how each one is configured and picked.

- **API key**: Anthropic (API key) shows real cost, priced from the in-repo Anthropic price catalog: prompt, completion, cache read, and cache write tokens each at their own rate. A model id ending in `[1m]` is priced at that model's 1M-context rate instead, falling back to the base rate if the catalog has no 1M price for it.
- **Subscription**: Anthropic (OAuth), your Claude subscription, shows a dash, never `$0`. A subscription is flat-rate, so per-request cost does not apply.
- **Local**: A local model shows a dash, the same as a subscription, not `$0`. Running a model you host costs nothing through Speedwave.
- **OpenRouter**: shows real cost, fetched from its own pricing for the generation. A fresh turn is first recorded with no cost yet deferred, since OpenRouter prices a generation shortly after the stream ends. Speedwave re-checks prices when you open the LLM usage page, so a deferred turn picks up its real cost on a later pass.

A request that fails is never billed, whichever provider you use. Speedwave tracks more cost states internally than these four; see [cost states reference](/docs/reference/cost-states/) for the full list.

For the rest of your day-to-day workflow, see [Guides](/docs/guides/).