Calls to Anthropic Claude models are recorded in the ledger with their token counts and cost. For other models, the connection and the connection test work, and a call to a model with no price is recorded with its cost shown as unknown until a price is set. The pages and routes below only read that record. None of them writes to the ledger, changes a budget or switches a model. Limits are in Budgets.
Prerequisites
Section titled “Prerequisites”- A running server and an account or API token with the
readpermission (Accounts and roles). - At least one finished run in the organization’s ledger. With no calls recorded the totals are empty.
- For the savings command: the team folder on this machine.
- Read what was spent, by role, provider or model: Spend.
- Ask for a cost range before a run: A cost range before a run.
- Divide the spend by the accepted results: Cost per accepted result.
- Read what the prompt cache saved: Token savings.
- See whether a cheaper model would have passed the same gates: The downgrade report.
Money rules
Section titled “Money rules”- Amounts are decimal strings such as
"<amount>", never floating-point numbers. The currency is stated in each answer. - Prices are versioned data. A call to a model with no known price is recorded with an unknown cost. It is shown as unknown and left out of the totals, and a total that leaves calls out says so. A price is never guessed. To allow such a model on purpose, see Price overrides; costs computed with one are marked provisional.
- All of these routes need the read permission and are scoped to the server’s organization. They are in the API reference.
GET /v1/costs/spend?group_by=modelGET /v1/costs/calls?bucket=acceptedGET /v1/costs/spendneedsgroup_by(role,providerormodel). Addseries=dayorseries=monthfor one answer per period.fromandtoare UTC instants with an offset (for exampleZ);as_ofignores anything recorded after that instant. A bad instant is 422invalid_request, and a range with too many periods is 422range_too_large.GET /v1/costs/callslists the calls behind the totals, a page at a time (limit,after).bucketis one ofaccepted,rejected,pendingorunattributed: spend that ended in a result a gate accepted, spend on work that was rejected, spend on work not finished, and spend that belongs to no task.
A cost range before a run
Section titled “A cost range before a run”POST /v1/costs/quote body: {"tasks": [{"role": "...", "provider": "...", "model": "..."}]}The body lists one entry per task you intend to run. The answer is a range (low, median, high)
taken from comparable past runs: same roles, same models, finished cleanly, all prices known, and
the price version still current. With too little history, status is not_enough_history and
the range is empty; the answer also reports the sample_size and how many runs were left out and
why. A quote is advice only: it writes nothing and is never an input to a budget check.
Cost per accepted result
Section titled “Cost per accepted result”GET /v1/costs/per-result?group_by=roleThis divides the money spent on accepted work by the number of accepted results, optionally per
role, provider or model. When some of that spend has an unknown price, the figure is
reported as per_result_at_least, a lower bound, instead of per_result.
Token savings
Section titled “Token savings”nuramesh savings tokens --team .nuramesh savings tokens --team . --group-by modelnuramesh savings tokens shows tokens by kind (input, output, cached input, cache write), the
cache hit rate, what the cache saved, the write premium and the net saving. GET /v1/savings/tokens
gives the same answer. It takes --from, --to and --as-of (UTC instants) and --group-by
(none, provider, model or role). A call with no usage record, or with an unknown saving, is
counted and named rather than estimated. The command only reads; it makes no network call and
has no apply step. Prompt caching itself is switched with nuramesh org prompt-cache.
The downgrade report
Section titled “The downgrade report”GET /v1/reports/downgrade?min_sample=30For each role, the report puts each model’s gate and verifier pass rates next to its cost per task. Where the evidence is strong enough, it names one cheaper model as a recommendation.
min_sampleis the number of results needed before a recommendation (1 to 10000, default 30). The period defaults to the current month;from,toandas_ofwork as above.- A model with an unknown price is never recommended and never compared with.
- The report never switches a model. A person changes the team configuration.
- The app shows it as the downgrade report page.
Check it worked
Section titled “Check it worked”nuramesh savings tokens --team .It prints the tokens by kind and the net saving, and names any call it could not count. Over the API,
GET /v1/costs/spend?group_by=model returns one total per model with its currency. Compare the total with
the budget lines of nuramesh report for the same run: both are read from the same ledger.
Troubleshooting
Section titled “Troubleshooting”| You see | Do this |
|---|---|
422 invalid_request |
An instant is not a UTC time with an offset. Write it like 2026-11-01T00:00:00Z |
422 range_too_large |
The range has too many periods for series. Shorten it, or use series=month |
status is not_enough_history on a quote |
Too few comparable past runs. The range is empty on purpose; run more, or decide without a quote |
per_result_at_least instead of per_result |
Some of the spend has an unknown price, so the figure is a lower bound. Set the price |
| A cost shows as unknown | The model has no price in effect. Add one, or a price override |
Next steps
Section titled “Next steps”- Dashboards: pass rates, verifier results, cost and latency.
- Set a hard budget: the limit, where this page is the reading.
- Budgets and the API reference.
Was this page helpful?