Every request to a model is priced the moment it is written down, from a dated price table. So a turn's cost is a sum you can check yourself, never a guess.
The ledger writes one line for every request to a model, in a file for each month. Every host writes it the same way, so the totals agree wherever you read them.
usage-YYYY-MM.jsonl
A file a month in the log folder, one line for every request to a model.the tokens
Each kind on its own, in, out, read from the cache and written to it, so the sum is plain.the cost
Worked out as the line is written, and kept in US dollars, as it was charged.null
A model the price table doesn't list costs null, unknown, never nought.The price table says what a million tokens cost, model by model. Each price is copied from the provider's own page, and the table keeps the date it was copied.
prices.json
The price of a million tokens of each kind, for each model, with the date it was copied.as_of
A record keeps the prices it was written with, so a change of price never rewrites history.long_prompt
A higher price for the whole request once its prompt is over a number of tokens.llamaqwen
Local models through Ollama cost nothing to run, so they are priced at nought on purpose.The ledger keeps what was charged, in US dollars. A page shows it in your own currency, at the day's rate. Here is one request, worked through step by step.
claude-haiku-5-5, 2,000 tokens in and 500 out.prices.json of 2026-11-19, $0.10 a million in and $0.50 a million out.rates.json of 2026-11-19, it is R0.0078. Live rates are used when they answer, and the file when they don't.The evals are being rebuilt from scratch, and this is what the plan builds. An eval will be one file of conversations, each turn with a few facts code can check for free and plain criteria a model judge marks yes or no. The aim is that someone new writes one in five minutes.
The plan gives each run one page you understand at a glance. Where you disagree with the judge's mark, you flip it, and your flip counts as the answer from then on. Your flips also show how often the judge agrees with you. A replay of a recorded run costs nothing.