Cost
Cost answers three questions: what did this period cost, where did the spend go, and why did it change? Every figure is an estimate. It applies API list prices to the tokens in your transcripts, except for Grok, whose requests use the cost Grok reported; it is not a bill. See Cost estimates for what the estimate includes and leaves out, and Supported agents for how the agents differ.
The page follows the filters in the scope bar under the navigation. Every figure below describes the selected project, time range and source.
Filters
Section titled “Filters”| Control | Values |
|---|---|
| Project | A searchable list of projects, plus “All projects”. |
| Time range | 7d, 14d, 30d, 90d, All. The default is 30d. |
| Source | All, Claude Code, Codex, Grok. |
| Include automated sessions | On or off. |
The filters live in the page URL, together with the inspected project and the open session. The project filter changes only through these controls, through a project key in the chart’s legend, or through a “Filter dashboard to” button in a sheet; selecting a project or session elsewhere opens a sheet and leaves the filter alone. See Filters.
Layout
Section titled “Layout”The page reads top to bottom: the heading with the plan gauge beside it, the daily chart, the project table, the cost flow, the insights beside Models and effort, then two drawers (Tokens, Sessions). A drawer is a table folded behind its title. Each section has its own heading; the page has no section index. At 1440×900 the daily chart starts on the first screen.
Panels
Section titled “Panels”Overview
Section titled “Overview”
Shows the heading, which answers “what did this period cost, and how does that compare?” in two figures:
$3,429 estimated cost 17.8× the previous 30 days
Figures
- The estimated cost of the view. With one project selected, the heading adds “on” and the project. With the All range, it adds “since” and the first day with spend.
- The comparison with the previous period of equal length:
- from 2× up, a multiple: “17.8× the previous 30 days”;
- below 2×, a percentage: “+35% vs the previous 30 days” or “−12% vs the previous 30 days”;
- “flat vs the previous 30 days” when the two costs are within half a percent;
- “nothing in the previous 30 days” or “no priced usage in the previous 30 days” when the previous period has no cost to divide by;
- “no priced usage in this period” when no request of the view has a price.
- The All range shows no comparison.
- A line gives the dates of both windows: “Oct 22 – Nov 20, 2026 vs Sep 22 – Oct 21, 2026”. A “thin history” chip marks a previous window with prompts on fewer than half as many days as this one, since its change then says little. For All: “All time” and the dates.
- With no requests in the view, the heading reads “No agent usage in the last 30 days.” (or “yet” for All).
How measured ends the line of dates. It is a toggletip, as on every page (see Data tables). It holds:
- each window’s dates and how many of its days had prompts, and the previous window’s cost;
- the sessions (and projects), the tokens and the requests;
- “Cost is estimated at API list prices” (and “leaves out unpriced models” when some are unpriced);
- how the gauge’s pace and plan multiple are computed, when the gauge shows.
Plan gauge
Section titled “Plan gauge”The gauge sits beside the heading; the filters are in the scope bar above. It measures the calendar month, not the range, so it reads the same for every range, All included.
Figures
- So far: the cost this month up to yesterday, as a solid bar.
- On pace for: the projection for the month, as a lighter bar that extends it. The projection is the cost so far plus the mean daily cost of the last 7 complete days times the days left, today included.
- Plan: a tick at the monthly price of the plans in the view, named in the gauge’s title (“This month vs plan ($200/mo, Claude Max 20x)”).
- N× plan: the pace divided by the plan’s monthly price, as a badge. A multiple below 1 shows as such (“0.6× plan”).
Rules
- The gauge follows the project, source and automated filters.
- Only the agents with a known plan count. When another agent without a plan also spent this month, the gauge says whose use it counts (“Codex use only”).
- Without a known plan, or when no agent with a plan spent this month, the gauge shows the cost so far and the pace of the whole view, with no tick and no multiple.
- The gauge is not shown without 7 complete days of history or without a priced request among them.
- It states no savings. Set plan prices in Configuration.
Banners
Section titled “Banners”- Unpriced models appears when some model has no price. It lists each model with its tokens. Their tokens are counted; their cost is unknown and left out of totals. To price one, add it to the user prices file, whose full path the banner names, in the shape of the packaged
prices.json. The next page load uses it, with no rebuild. A Grok model is never listed: a Grok request costs what Grok reported. See Reported cost. - Prices file ignored appears when the user prices file cannot be used. It names the file and the reason. Packaged prices apply until it is fixed. See Configuration.
A “+?” chip beside a cost means the figure leaves out some requests from unpriced models. A screen reader reads “plus an unknown cost for N requests from unpriced models”, and its hover text shows the count.
Estimated cost per day
Section titled “Estimated cost per day”
Shows the chart of the view, one bar per day. The title reads “Estimated cost per day”, with “ by model” or “ by agent” for those stackings, or “Tokens per day” for the Tokens measure.
Figures
- Cost measure. Each bar is stacked by the chosen Stack by value:
- Project (the default): the projects that have a color of their own (the busiest of all time), by spend in the view, then Other in grey. With one project selected, one series.
- Model: the models that cost the most in the view, up to six series colors, then Other, labeled without the
claude-prefix. - Agent: one series per agent (Claude Code, Codex, Grok), no Other.
- A day’s total is the same in every stacking.
- Tokens measure. Each bar is stacked by token kind: Input, Output, Thinking, Cache read, Cache write 5m, Cache write 1h. In Volume, a bar is the day’s tokens, and cache reads usually dwarf the rest. In Share, every bar fills the plot from 0% to 100%, and each kind’s segment is its share of that day’s tokens, so you can see whether output grew or shrank. The title reads “Token share per day”. Share draws no 7-day average and no peak label, since both describe the day’s total; the tooltip, the screen-reader text and the data table give each kind’s share and the day’s total tokens. A day with no tokens has no bar.
- A 7-day average line, in the Cost measure and in Volume, drawn when the view has 14 or more days. At a day, it is the mean of the 7 complete days ending there; today has none.
- Today’s bar is hatched over each segment’s color, and the legend adds “Today so far”. The tooltip and the label say “so far”.
- A label names the peak, in the Cost measure and in Volume. It stays inside the plot: near an edge it slides in, and a chart narrower than the label draws none.
- The tooltip lists the day’s parts, the total, and the unpriced requests. For Other, it lists the three costliest names inside it, with their cost, and “+ N more” when there are more. A project with no name reads “(no project)”.
Controls
- Stack by (Project, Model, Agent) switches the stacking. It shows only on the Cost measure. The choice is kept in the browser.
- Scale (Volume, Share) switches the Tokens measure between the day’s tokens and each kind’s share of them. Volume is the default. It shows only on the Tokens measure, and the choice is kept in the browser.
- Cost, Tokens switch the measure. Cost is the default. The choice is kept in the browser.
- On the Cost measure, a project key in the legend filters the page to that project, an agent key filters to that agent, and the same key again (shown with ✕) clears the filter. Model keys, Other and the average line only name a series; they do not filter or toggle.
- On the Tokens measure, a legend key hides or shows a kind. The hidden kinds are kept in the browser. When every kind is hidden, a note offers “Show every kind”.
- Select a day, or focus the chart, use the arrow keys (Home and End jump to the ends) and press Enter, to select that day. The Most expensive sessions drawer opens with every session active that day and its cost on that day, costliest first, so the costs add up to the bar.
- Zoom. In a view of 14 days or more, a slider sits under the day labels. Drag it, or its handles, to narrow the days the chart draws. With the chart focused, plus (or
=) halves the days shown and minus doubles them, around the day you are reading, down to 7 days and up to every day. While the chart is zoomed, a Show all days button beside the legend shows every day again and returns focus to the chart. After each change the chart says which days are shown, for a screen reader. The arrow keys, Home and End still reach every day: when one reads a day outside the days shown, they move to include it, and the chart says the day and then the days shown. Views shorter than 14 days have no slider and no zoom keys. Zooming changes nothing else: the range, the totals, the other sections and the URL stay as they are, and the data table still lists every day. The value axis and the 7-day average stay those of the whole view. The zoom resets when the view changes: the range, project, source, Include automated sessions, stacking, measure or scale. The zoom stays on its days when the view’s first day moves, because a range moves on a day at midnight or older days arrive; the day you are reading stays read, and the focus stays on Show all days. A zoom at the old end of a range loses the day that leaves. A zoom that has no day left, or now holds every day, ends, and the chart says “Showing all 30 days.” once, with the count of the view. The zoom also stays when new data arrives and when you hide or show a token kind; the day you are reading stays read too. A screen reader hears that day again only when you read it with the keyboard and its figures changed. - Show data table opens a named table: one row per day, one column per series of the current stacking, and a total. It is closed on every page load.
Project spend and change
Section titled “Project spend and change”
Shows one row per project used in the view or in the previous period. The count beside the title is the number of all projects. The table is left out of a one-project view.
Columns
| Column | Shows |
|---|---|
| Project | The project. A row opens the project sheet. |
| Trend | The project’s daily cost over the view, as a line in its color. |
| Spend | The estimated cost, with a bar and its share of the view’s cost. A “+?” chip marks a cost that leaves out unpriced requests. |
| Δ vs prev N d | The change against the previous period, as a bar on either side of a center line, all on one scale, then the change with its sign. A “new” chip marks a project with no usage before. A project used only in the previous period shows $0 spend and its whole previous cost as a decrease. Left out for the All range. |
| Cost / commit | Estimated cost over commits, or “n/a” with no commits. |
| Cache hit | Cache read tokens over all prompt tokens. |
On a phone, the table keeps Project, Spend and the change.
Rules
- Every column sorts, by click or keyboard; the sorted header carries
aria-sort. The default is Spend, highest first. Trend sorts by the cost of the view’s last 7 days. A project with no value in a column comes last in either direction. The sort resets when the view changes. - With 3 or more big projects, the Cost / commit and Cache hit cells are tinted against the median project, with a ▲ or ▼ mark and a key above the table. Cost / commit is tinted from 1.5 times the median; cache hit from 10 points away. The median covers the projects with at least 2% of the view’s cost or at least 10 prompts; Cost / commit also needs 3 or more commits. Hover a tinted cell for how far.
- Projects too small to compare (outside that set) fold into one row, “Small projects (N)”, after the big projects, whatever the sort. A project whose change is at least 2% of the view’s cost never folds, so a large drop stays in view. The row sums their spend, share and change; the change is unknown when one of theirs is. Folding needs at least 3 small projects and at least 1 big one. Show N small projects (and Hide small projects) toggles them. A project ringed by Compare projects is never hidden. The fold resets with the view.
- When the previous window is thin, a note above the table says to read a change as “more than before”.
Controls
- Download CSV and Copy export the table. The export holds, per project: estimated cost, tokens, cache hit, 1h writes, subagent cost share, commits, cost per commit, cost per prompt and the change. It holds every row in the order shown, small projects included even when folded, with costs and shares rounded to 4 decimals. Copy puts tab-separated text on the clipboard. The file is named
ai-ledger-cost-projects-<date>.csv, dated today. A text cell that starts with=,+,-,@, a tab or a carriage return is prefixed with an apostrophe; numbers are not. - From Compare projects, a note says “Sorted by cost per commit, highest first.”, gives the outlier’s cost per commit and its multiple of the median, and offers “Sort by cost again”, which sorts by Spend and moves focus to its header.
- Every sort says what it did to a screen reader: “Sorted by spend, highest first”. That includes Compare projects, Sort by cost again, the same sort twice and the reset a new range makes.
Where the cost goes
Section titled “Where the cost goes”
Shows the estimated cost of the view followed from project to model to token kind, in three columns of nodes joined by bands. A band is the estimated cost that went from one node to the next, and its width is that cost, never tokens. The graph sits after the project table; with one project selected it follows the daily chart. The hint beside the title says “From project to model to token kind, each band as wide as its cost; small ones in Other. Arrow keys follow the bands.”
Figures
- Columns. Project, Model and Token kind. Each column adds up to the page’s estimated cost, and a band is as wide at both ends. A node’s label shows its name and, when the node is tall enough, its cost. A model’s name drops the
claude-prefix. - One project selected. The graph has two columns, Model and Token kind, since the heading already names the project. The hint and the label say “on” and the project.
- Token kinds. Input, Output + thinking, Cache write (both lifetimes) and Cache read, as the Tokens and cache drawer bills them. A kind with no cost has no node.
- Reported. A fifth kind, for the cost an agent reported with no split by kind, as Grok does. It holds each model’s reported costs, however small: a Grok request of one USD tick ($0.0000000001) still has its band. A view of Grok alone goes from its models to Reported alone.
- A model with no name. Grok stores a turn with no breakdown by model with no model name. Its node is “(no model name)”, and its cost goes to Reported.
- Other. A column keeps its five costliest names that hold at least 1% of the cost; the rest go to one grey node, “Other (N)”. Other always holds two names or more: a lone name that would fold keeps its own node. Its tooltip and sentence list its three costliest names, then “and N more”. A name that costs $0.00 has no node.
- Colors. A band takes its source’s color. A project has its color from the daily chart, or grey. A model has its color from the daily chart stacked by model. Kinds and Reported are neutral. Every node has a label, or a name in the key, so color is never alone.
- Labels and key. When a column has no room for labels, its nodes are named in a key under the graph, each with a swatch and its cost. A label that would overlap a costlier one is left out, and its node is still read by the pointer and the keys. A name too long for its room ends with “…”.
- Unpriced models. Their requests are not drawn, since their cost is unknown. A line under the graph names the models and the number of requests, and the “+?” chip follows the total in How measured.
- Empty views. The section says so in place of the graph: “No usage in this view, so no cost to follow.”, “No request in this view is priced, so there is no cost to follow.” (with the unpriced line), or “The priced requests in this view cost $0.00, so there is no cost to follow.”
- Costs below zero. A price below zero in
prices.jsongives costs below zero, and no band can be drawn for them. The section then says so in place of the graph and keeps Show data table, with every cost and its sign (“−$1.00”); each step of the table adds up to the heading’s estimated cost.
Controls
-
Pointer or touch. Move over a node or a band to read it. A tooltip gives a node’s cost and share with its three largest bands (or Other’s names), and a band’s source, target, cost, share of the cost and share of its source. The tooltip stays inside the graph: on a narrow screen a long name wraps, and each figure keeps its line. A project’s node shows a hand cursor. Leaving the graph ends the reading.
-
Keys, with the graph focused:
Key On a node On a band Nothing read Down, Up Next, previous node of the column Next, previous band of the node it was entered from Down: first node of the first column; Up: first node of the last column Right The node’s top band out The band’s target node The first node of the first column Left The node’s top band in The band’s source node The first node of the last column Home, End First, last node of the column First, last band of the node it was entered from First, last node of the first column A key stops at the ends of a list. Right on the last column and Left on the first column say the item again. Up and Down do not scroll the page. A key with Alt, Ctrl, Meta or Shift is left to the browser.
-
Enter on a named project, or a click on it, opens that project’s sheet and leaves the filter alone. On Other, “(no project)”, a model, a kind or a band, nothing happens and the reading stays. With one project selected, nothing opens a sheet.
-
Esc ends a reading, also when the pointer opened it and the focus is elsewhere. A reading also ends when the focus leaves the graph, which includes opening a project’s sheet, and when the pointer leaves it.
-
A screen reader hears one sentence per item, for example “Project atlas-api: $60, 28.6% of $210. To opus-4-5 $24, sonnet-4-5 $18, gpt-5.1-codex $12 and 1 more.” or “atlas-api to opus-4-5: $24, 11.4% of $210 and 40.0% of atlas-api.”
-
Show data table opens a table named “Estimated cost from project to model to token kind”, closed on every page load. One row per flow, not folded: every project and model pair, including $0.00 ones, then every model and kind, Reported included, each step costliest first. Columns: Step, From, To, Est. cost (to the cent) and Share of cost. With one project selected it has only the second step, and its name says the project: “Estimated cost on atlas-api from model to token kind”.
Rules
- Newer data keeps the item you read, and a key’s reading is said again when its figures change. The reading ends when its item is gone or the view changes (range, project, source, Include automated sessions).
- The drawing never animates, in any setting: a band does not grow or move when the figures change. When new figures land for a view change, after Refresh or after a failed load, the section fades in like the page’s other panels, unless your system asks for reduced motion. Figures an ingest brings in the background swap in without a fade. In forced-colors modes, nodes and labels use the text color, bands are outlines, and the mark on the item read uses the highlight color.
- The graph’s total equals the heading’s estimated cost, as every column adds up to it. The page reads all its figures in one snapshot of the store, so an ingest that lands while the page loads cannot set them apart.
What stands out
Section titled “What stands out”
Shows up to two findings, each with one action, beside Models and effort. They are the findings the heading, the gauge and the project table do not already show. The most severe leads, in a wide card; among equal severity, the finding with more money at stake leads. A card is marked “✓ Good”, “▲ Watch” or “● Act”, or has no mark.
| Finding | Figure | Mark | Action |
|---|---|---|---|
| Cost per commit (titled “Cost-per-commit outlier” when a project or session is an outlier) | The median cost per commit and the view’s cost per commit. | Good when no project is an outlier. Watch for an outlier, Act when the outlier is four times the median or more. | Compare projects. With one project selected: Open the priciest session when there is no outlier, else Open session. |
| Peak day | The costliest day, as a multiple of the median day with spend and as a share of the range. | Watch when 5 or more days have spend and the peak is 3 or more times the median. | Show that day’s sessions. |
Rules
- An outlier costs more than twice the median per commit and holds at least 2% of the view’s spend. With one project selected, the same test runs over its sessions that have 2 or more commits.
- The median covers the projects big enough to compare, as in the project table. With fewer than 3 such projects with commits, the card says “Too few projects with commits to compare against a median.”
- With no commits, the Cost per commit card reads “No commits” and its action is “See cost per prompt”.
- Compare projects sorts the project table by cost per commit, scrolls to the outlier, rings it and focuses it.
Models and effort
Section titled “Models and effort”
Shows the share of estimated cost of each model and effort level, costliest first. A row is named model · effort, with · fast for fast-mode requests, which form their own rows. A share above zero that rounds to 0% reads “<1%”. A model with no price shows “–” and an “unpriced” chip.
Controls The top 8 rows show. Show all N shows the rest.
Drawers
Section titled “Drawers”Each drawer title carries a count.
Tokens and cache
Section titled “Tokens and cache”The count is the view’s tokens.
Shows four figures:
- Cache hit: the share of input tokens that came from cache, and the share of cache writes that use the 1-hour lifetime.
- Subagent cost: the share of estimated cost that came from subagents, with the amount, and the share of tokens. It leaves Grok out: a Grok subagent’s tokens are part of its parent’s turn.
- Per prompt: estimated cost per prompt, and tokens per prompt.
- Per commit: estimated cost per commit, and tokens per commit, or “n/a” with no commits.

Under them, a two-sided chart compares each billed kind’s share of tokens with its share of estimated cost: Input, Output + thinking (thinking is billed as output), Cache write (the 5-minute and 1-hour lifetimes together) and Cache read, biggest cost first. The cost side covers only requests priced from the price table, so it leaves Grok’s reported cost out. The share of tokens is a bar to the left of the kind’s name, the share of estimated cost a bar to the right. Each side has its own 0 to 100% scale, and both shares are also written next to their bars. A share of 0% has an empty bar. When the chart is narrow (a phone, a Project column, large text), each kind’s name goes above its two bars. A sentence above the chart names the kind where the two shares differ most, however small the gap, for example that cache reads are most of the tokens and a small part of the cost. When no request is priced, the sentence says so, and the cost shares read “–” and have no bar, not zero. When the priced requests cost $0.00 (models priced at zero rates), the sentence says so, and each kind’s cost reads $0.00 with a share of 0.0%. Show data table opens the exact figures: each kind’s full token count, share of tokens (one decimal), estimated cost (to the cent) and share of cost (one decimal), with the thinking tokens and each cache write lifetime under their kind. A last line gives the requests and how many came from the main thread.
Most expensive sessions
Section titled “Most expensive sessions”The count is the number of sessions listed: the most expensive sessions of the view (up to 50), or with a day selected, every session active that day.
Columns Session (title or id, with start time and branch under it), Project, Active (pauses over 20 minutes left out), Prompts, Commits, Cost / commit, Est. cost.
Controls
- A day chip, “Active on day”, shows when a day is selected. Its ✕ shows the most expensive sessions of the view again.
- Download CSV and Copy export the table, as for the project table. The file is named
ai-ledger-cost-sessions-<date>.csv, dated today, or with the selected day’s date when a day is selected. - A row opens the session sheet.
Sheets
Section titled “Sheets”A sheet opens beside the page and does not change the filters. See Sheets.
- Project sheet: a project’s cost, with its change against the previous period and its most expensive sessions. See Project sheet and the Project page.
- Session sheet: the whole session, with a Copy button for its resume command. See Session sheet.
Playbooks that start here
Section titled “Playbooks that start here”- Spend less for the same output: the model mix, the cache hit and the most expensive sessions.
- Stop hitting plan limits: how the cost compares with your plan.
- Weekly 15-minute review: a pass over Cost and the other pages.
- Retro on one project: cost per commit and per prompt by project.
- Compare Claude Code, Codex and Grok: the Agent stacking and the Source filter.
- Separate automated sessions from yours: the Include automated sessions toggle.