AI Spend Doctor

What your API usage CSV can and cannot tell you about wasted spend

A usage or cost export from Claude or OpenAI tells you where the money went: which model, which day, which kind of token. It cannot tell you whether that money bought good results. This guide covers what you can read from the file, the mistakes that make numbers wrong, and the questions only your own tests can answer.

What the file contains

There are two kinds of export, and they answer different questions.

If you only want to know how much you spent, the cost export is the safer choice. If you want to know how your tokens are made up, you need the usage export.

What you can reliably read

Five common misreadings

1. Cents read as dollars, or the other way round

The Anthropic Cost API returns amount in cents as a decimal string. The OpenAI Costs API returns amount.value in dollars. A column called just amount in some other file could be either. A 100 times error is easy to miss when you look at a total without a reference point.

2. Counting cached tokens twice

In OpenAI usage data, input_tokens already includes cached tokens and cache writes. In Claude usage data, uncached_input_tokens excludes them. Adding cached tokens to OpenAI input, or subtracting them from Claude input, gives the wrong cost.

3. Adding the cache write total to its own breakdown

Claude usage data can have both cache_creation_input_tokens and its split into 5-minute and 1-hour writes. The 1-hour write costs twice the normal input price, the 5-minute write 1.25 times. Use the split when you have it and do not add the total on top.

4. Treating a missing column as zero

If the file has no batch column, you do not know your batch share. It is not 0%. The same goes for cache columns, dates and model names. A report that says "0% batch" on a file that never recorded batch is simply wrong.

5. Comparing models by price per token

A cheaper price per token does not mean a cheaper task. Anthropic notes that Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text. Claude Sonnet 5 is a third cheaper per token than Sonnet 4, but for the same text the difference at list prices is closer to 13%. Output length and quality change it further.

What no CSV can tell you

A quick routine for last month's file

  1. Export the previous full month as CSV, cost export if you can.
  2. Check the total against your invoice. If it is 100 times off, the unit is wrong.
  3. Look at spend by model. Is any older model version still in use?
  4. Look at the daily chart. Pick the highest day and check the logs for it.
  5. If the file has cache and batch columns, note both shares. Low values are questions for the team, not conclusions.
  6. Before changing a model, run a sample of real prompts on both and compare quality and token counts.

The free checkup does steps 2 to 5 in the browser and marks every check as checked, partly checked or not available. You can try it on the demo data first. The columns it reads and the method are on the formats page.

Check your own CSV for free

Questions

Can a usage CSV tell me how much money I wasted?

No. It shows where the money went by model, day and token type. Whether that spend was waste depends on the quality you needed and why a day was expensive, which only your own tests and logs can show.

Is the Anthropic cost export in dollars or cents?

The Anthropic Cost API returns amount in cents as a decimal string. Check your total against the invoice; if it is 100 times off, the unit is wrong.

Does OpenAI input_tokens include cached tokens?

Yes. In the OpenAI Usage API, input_tokens includes cached and cache-write tokens. Uncached input is input_tokens minus input_cached_tokens and cache writes.

List prices checked 27 September 2026 on the official Anthropic and OpenAI price pages. Prices change; check the source before making decisions. Not affiliated with Anthropic or OpenAI. © 2026 Valeriy Danilov. AI Spend Doctor by AgentBridge Labs.