Upload a request log you already have and Nadir replays it through the same router that runs in production, repricing every request on the model it would have picked. No proxy in front of your traffic, no provider key, no code change.
Warning
redact_messages on, and Helicone without body logging all carry model names and token counts but no prompt, and every row of them is skipped as no_prompt_or_messages. If that is your situation, turn body logging on for a day and export that day instead. Nothing else on this page will rescue a prompt-free export.The format
Newline-delimited JSON: one object per line, no wrapping array. Send it to POST /v1/audit/replay as application/x-ndjson, or drop the file on /dashboard/audit.
{"prompt":"Convert this timestamp to ISO 8601: 1712345678","model":"gpt-4o","prompt_tokens":40,"completion_tokens":25,"end_user":"acct_alpha"}
{"messages":[{"role":"system","content":"You are a build assistant."},{"role":"user","content":"Why is my webpack build emitting two copies of react?"}],"model_used":"claude-opus-4-6","input_tokens":900,"output_tokens":700,"user":"acct_alpha"}Fields
Each field accepts more than one spelling, because every gateway names them differently. The first one present wins.
- The prompt.
promptas a string, ormessagesas an OpenAI-shaped array. User turns are joined and the last system message is kept. Required. - The model you ran.
model_usedormodel. Without it there is nothing to compare against, and the row is counted but not priced. - Input tokens.
prompt_tokensorinput_tokens. Missing, they are estimated from the prompt text and the row is held out of the headline. - Output tokens.
completion_tokensoroutput_tokens. A recorded0is believed, because empty completions are real. - Cache tokens, optional.
cache_read_input_tokensandcache_creation_input_tokens, at the top level or undermetadata. Send them if you have them: on cache-heavy traffic they move the answer a lot. - Identity, optional.
end_useror the OpenAI-compatibleuser. An opaque label, stored verbatim and never parsed, so send an internal id rather than an email address.
Turning your export into this
Every mapping below is a starting point. Field names in these products move between versions, so open one line of your own export first and check the names against it.
LiteLLM
The SpendLogs table carries request and response bodies when body logging is on. Export it as JSON and pull the prompt out of the request body.
jq -c '{
messages: (.request_body.messages // []),
model: .model,
prompt_tokens: .prompt_tokens,
completion_tokens: .completion_tokens,
end_user: .end_user
} | select(.messages | length > 0)' spendlogs.json > requests.jsonlHelicone
POST /v1/request/query returns request and response bodies only when body logging is enabled on the key.
jq -c '.data[] | {
messages: (.request_body.messages // []),
model: .request_body.model,
prompt_tokens: .prompt_tokens,
completion_tokens: .completion_tokens
} | select(.messages | length > 0)' helicone.json > requests.jsonlOpenRouter
The activity export carries model, token counts and cost, and no prompt. It cannot be audited. Use your own application log, or proxy a day of traffic through a gateway that records bodies.
Nadir usage logs
If you already send traffic through Nadir, your own usage_logs rows need no mapping. The reader accepts the column names that table uses, model_name, tokens_in and tokens_out, alongside the gateway spellings, and it reads end_user out of the metadata object where we write it. Export the rows as one JSON object per line and upload them as they are. This holds so long as privacy.store_prompts was on when they were written. With it off, the prompt column holds a sha256: digest instead of the text. Those rows are skipped as prompt_hashed and left out of every figure, because a digest is not a prompt and anything classified from one would be a number about nothing.
Calling it directly
curl -X POST "https://api.getnadir.com/v1/audit/replay?source=july-sample" \ -H "Authorization: Bearer $SUPABASE_JWT" \ -H "Content-Type: application/x-ndjson" \ --data-binary @requests.jsonl
Auth is your dashboard session token, not an API key: an audit runs before you have a key. Limits per run are 1,000 lines and 8 MB. Each server process allows 3 runs a minute and 20 a day per account, runs one audit at a time, and holds a daily budget of total replay time, so a busy window can return a 429 that is about the server rather than about you. Oversize uploads are refused rather than truncated, because the first N lines of a log are one time window and one workload, not a smaller sample of the whole.
Reading the result
The report is a COST COUNTERFACTUAL and labels itself one. No model was called, so it makes no quality, accuracy or catastrophic-route claim, and its dollars are never billed.
totals_measuredis the headline. Rows whose token counts had to be estimated are reported separately intotals_estimatedand kept out of it.headline_withheldis a sentence when the run may not publish a savings number, andnullwhen it may. It fires when a model Nadir routes to has no published price, when fewer than half your comparable requests priced on both sides, or when fewer than 20 of them priced at all. Which rows drop out is decided by which model ids have a price, not at random, so the survivors are not a fair sample and their average is not your average. And a percentage over a handful of requests is one workload at one length, not a rate, so a very small log gets its per-request rows and no headline.- When it fires, the four aggregate dollar keys are physically removed from the report, and every row carries
do_not_aggregate. The per-request costs stay: they are the audit trail that lets you check the refusal. - Both floors, the 20 priced requests and the 50% priced share, apply to every
saved_pctin the report, not only the headline one. A per-identity block inby_end_userthat misses either one reports its dollars andnullfor its rate. The share matters most per identity: unpriced model ids cluster by team, so one group on an in-house model can be 5% priced while the run as a whole clears the floor. - Every block also carries its own
rows_tokens_estimated, so an identity whose dollars came from assumed completion lengths says so in its own dict, not only in the run totals. unpriced_modelsnames the ids we could not price. That list is the fix: map an in-house name to the model it actually is and re-run.up_routeslists every request where Nadir would have spent MORE, with the extra cost of each. It is never hidden and never netted away silently.
Info