<!-- Markdown mirror. Canonical: https://empryo.com/docs/concepts/cost-tracking -->

# Cost tracking

> Live USD cost tracking per model and per sub-agent, with built-in pricing for every major provider, cache-aware billing, and a /context breakdown dashboard.

![The wire log does not lie. A tool result is not output. It is a deposit, and it earns negative interest.](https://empryo.com/media/forge-v2-receipt.svg)

*The wire log does not lie. A tool result is not output. It is a deposit, and it earns negative interest.*

Empryo tracks every token spent and prices it in real time. The status bar shows the running total in USD. `/context` opens a dashboard with the per-model breakdown.

## What gets tracked

- **Prompt tokens** (uncached input).
- **Completion tokens** (model output).
- **Cache-write tokens** (billed at a higher rate by most providers).
- **Cache-read tokens** (billed at a discount).
- **Subagent tokens** tracked separately from the main agent.
- **Per-model breakdown** when the task router mixes providers.

## Providers with built-in pricing

Pricing tables ship for the major providers, updated against their public price lists:

| Provider | Notes |
|----------|-------|
| Anthropic | Claude Opus/Sonnet/Haiku with cache-write and cache-read rates |
| OpenAI | GPT-5.4, GPT-4.1, o3, o4-mini |
| Google | Gemini 2.5 Pro/Flash, Gemini 3 Flash/Pro |
| DeepSeek | V4 (pro/flash), V3, R1; `chat` + `reasoner` aliases |
| Groq | Llama 3.3, Llama 4 Scout, Qwen3, GPT-OSS |
| Mistral | Mistral Large/Medium/Small, Codestral, Magistral, Ministral, Pixtral, Devstral |
| Fireworks | Tier-based pricing (Mixtral, Llama 70B+, DeepSeek) |
| GitHub Copilot | Premium-request multiplier-based estimation |
| OpenRouter | Live pricing from the catalog |
| GitHub Models | Per-token via multipliers |
| Ollama, LM Studio, OpenCode free models | $0.00 |

A model missing from those tables is priced from [models.dev](https://models.dev), which publishes per-token rates for 217 providers and is the same catalog the model picker reads for context windows and effort ladders. Only when that lookup also comes back empty does a model fall to Sonnet-tier pricing as a safety floor, so an unknown model reads as expensive rather than free.

## Why it matters

Two tactics cut cost dramatically:

1. **Mix models.** Haiku for spark agents, Sonnet for ember agents, Flash for compaction. A task that would cost $0.25 on Sonnet often runs for $0.05 when the exploration phase routes through Haiku.

2. **Use caching.** Cache reads are 10x cheaper on Anthropic, up to 50% off on Groq/Fireworks. Empryo structures the system prompt and the Genome for maximum cache hits - typical cache-hit rates exceed 60%.

## UI

The status bar shows the running total in USD. Compact mode shows tokens plus a dollar figure. `/context` opens the detailed view: per-model usage, cache ratio, subagent spend, and the compaction history.

`/usage` opens the spend ledger, today, this week, this month, per model, plus a cumulative **prompt-cache hit rate** so you can see caching working across sessions, not just in the current turn. A healthy rate means the cached prefix is holding. A low one means something keeps re-writing it.

Use `/router` to [assign cheap models to cheap tasks](/docs/recipes/task-router).

## Flat-rate plans are measured differently

Everything above prices tokens in dollars. Some routes do not bill per token at all. They spend an allowance, and the only limit that matters is how much of it is left:

- `proxy/*`, a rolling [subscription window](/docs/providers/proxy) through the [proxy add-on](/docs/tools/addons).
- `copilot/*`, a [monthly Copilot allowance](/docs/providers/copilot#usage-and-quota) on your GitHub seat.
- `openrouter/*`, the credit balance on the key.
- Native subscription lanes signed in through `/login`, each reporting whatever windows its vendor exposes.

Those meters sit alongside the dollar figures rather than replacing them, because one session can do both. A gateway lane bills credits while a relay lane burns a weekly cap.

Every window shows a percentage. Where the vendor sends real counts, it also shows what the allowance is measured in: requests, credits, tokens or dollars. That is why a Copilot row can read "412 of 1,500 premium requests" and an OpenRouter row "$3.80 of $20.00", while a Claude row shows a percentage alone.

When a plan allows overage, the window reports what you have spent past the allowance, with a dollar estimate where the vendor publishes a rate. Every surface labels that an estimate. It is not a bill.

Not every vendor exposes a quota endpoint. A lane with no meter shows its dollar spend and nothing else, which is a gap in their API rather than a missing feature here.
