LLM Usage is in preview. It works today, and numbers and features may still change as we add more tools.
Overview
AI coding tools already report their usage over OpenTelemetry. Point them at CostOptix and every session shows up on the LLM Usage page within about a minute, tagged with the team you choose. CostOptix answers three questions:- What do we actually pay? From the plans you enter: seats, pay-per-token, or a fixed monthly amount.
- What is the usage worth? The same usage priced at API rates, so you can compare it with what you pay.
- Is each person on the right plan? Idle seats, people who would be better off on a higher or lower tier, and where pay-per-token would be cheaper.
Prompts, responses and email addresses are never stored. People are identified by a pseudonymous key, and admins can give each key a display name.
Connect a tool
Open LLM Usage and click Connect a tool.1
Name the team (optional)
Every event is tagged with this team, so spend is attributed without anyone mapping people to teams. Use one config per team, or leave it blank and tag later.
2
Create a telemetry key
The key can only push usage telemetry. It cannot read cost data or change anything, so it is safe on every developer’s machine. If you are not an admin, ask one to create it.
3
Add the config
Copy the generated settings into the tool. Then run a prompt or two. The page refreshes itself, so usage appears without a reload.
- Claude Code
- Gemini CLI
One developer: add the variables to your shell profile, then start Claude Code as usual.Whole organisation: put the same values in the Spend by repository needs Claude Code 2.1.269 or newer.
env block of the Claude Code managed settings your admins deploy. Every developer is covered without touching their machines.The generated config looks like this:Past usage from local history
The setup command also imports the last 30 days of Claude Code usage from the transcripts Claude Code keeps on each machine, so the page fills in on day one. Only token counts, model, time and session leave the machine. Prompts, responses and code are never read out.- Days CostOptix has already closed, and months whose LLM bill is sealed, are skipped. Closed figures never change.
- Days your organisation already has live telemetry for are skipped too, so an import can only fill gaps. A developer who joins later gets history only for days nobody was sending telemetry.
- Running the command again imports nothing twice. A request sent by both telemetry and the import is stored once.
- Background requests such as session titles are not kept in local history, so imported days read slightly low.
- Gemini CLI history is not imported.
--no-history (macOS and Linux) or -NoHistory (Windows).
Set up your plans
Telemetry does not say which plan anyone is on, so actual cost comes from what you enter in Settings → LLM Plans.Add a plan
Start from a vendor preset or from scratch. Presets are prices we checked on the vendor’s own pricing page, with the date and region shown. Either way you get your own copy to edit. When a vendor changes a preset price, CostOptix offers the new price and you choose whether to use it from today.
Prices are per month. For annual plans, enter the per-month rate. Plans can be in any currency.
Assign plans to people
Within a source, the most specific assignment wins: a person, then their team, then their cost centre, then the whole organisation. Use the pseudonymous user key from the usage page. Email addresses are not accepted.Model prices
Add per-million-token rates (input, output, cache read, cache write) when a tool reports no cost, or to use your contracted rates instead of list prices. A rate applies from its start date until the next one. The page lists any model in the last 90 days that has no price, including new model versions.The LLM Usage page
The cards at the top cover the current calendar month. Everything below covers the range you pick, in UTC.
Days seal after 06:15 UTC the following day. Sealed days are final. Today’s figures are live and can still move.
API-equivalent value is not a charge on seat plans. On a seat plan the usage is included in the seat. The value shows how much the same work would cost at API rates, which is how you judge whether a seat is worth it.
Suggestions only see coding-agent usage. Chat apps and other tools that send no telemetry are not counted, so check with the person before removing a seat.
What it produced
The Overview tab sets the work your tools report against the API-equivalent value of the usage behind it: value per pull request, per commit and per 1,000 lines changed, plus the share of suggested edits people accepted. You can break it down by repository, and admins can also see it by person.
A session’s value counts when the session reported work, or when it started after that person’s first report. Sessions that produced nothing still count, so the figures stay honest. Usage from before metrics were switched on is left out. Machines set up before this feature need the setup command run once more to turn metrics on.
Budgets and alerts
- LLM budgets. Create a budget with the AI / LLM scope to track actual plan cost in USD. See Budgets.
- Runaway sessions. CostOptix alerts when a session’s value over the last hour passes three times your normal hourly rate (the 95th percentile of the last 14 days). Subscribe a webhook to Runaway AI Session to receive it. See Webhooks.
- Plan savings. Idle seats and better-fitting plans appear on the AI plans tab of Recommendations. Two weeks after you mark one done, CostOptix checks that the change held.