ai-bill-to-focus
A small open-source (MIT) CLI that converts Anthropic and OpenAI billing exports into the FinOps Foundation's FOCUS billing schema, writing one row per day, model and token type with its own SKU, unit price and quantity, and validating output against FOCUS validator rules ported to JS; it works on its own with no account.
What it addresses
Anthropic and OpenAI spend needs to sit next to cloud bills but the exports don't fit together: the Claude Console's Cost export rounds dollars to the cent (cache reads show $0.00) while the Usage export has token counts and no dollars, and the two providers count cached input differently, so merging the exports can double-count or drop cached input.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
ai-bill-to-focus
A small open-source (MIT) CLI that converts Anthropic and OpenAI billing exports into the FinOps Foundation's FOCUS billing schema, writing one row per day, model and token type with its own SKU, unit price and quantity, and validating output against FOCUS validator rules ported to JS; it works on its own with no account.
Problem: Anthropic and OpenAI spend needs to sit next to cloud bills but the exports don't fit together: the Claude Console's Cost export rounds dollars to the cent (cache reads show $0.00) while the Usage export has token counts and no dollars, and the two providers count cached input differently, so merging the exports can double-count or drop cached input.
Posted by @manvshinde · Original source ↗
Story title · @manvshinde · · Source ↗
Show HN: Convert Anthropic and OpenAI bill exports to FinOps FOCUS (open source)
Submitted URL · @manvshinde · · Source ↗
https://github.com/mandarvshinde/ai-bill-to-focus
Source text · @manvshinde · · Source ↗
I needed to put our Anthropic and OpenAI spend next to our cloud bills, and found that the exports don't fit together.
Source text · @manvshinde · · Source ↗
The Cost export has dollars rounded to the cent, so a day of cache reads shows $0.00. The Usage export has token counts and no dollars.
Source text · @manvshinde · · Source ↗
If you merge the two exports without accounting for that, you double-count or drop cached input.
Source text · @manvshinde · · Source ↗
FOCUS is the FinOps Foundation's open billing schema. AWS, GCP and Azure already export it, but the official converters don't cover any AI provider yet. So this is a small MIT CLI:
Source text · @manvshinde · · Source ↗
npx ai-bill-to-focus convert cost.csv usage.csv -o focus.csv --check
Source text · @manvshinde · · Source ↗
It writes one row per day, model and token type, each with its own SKU, unit price and quantity.
Source text · @manvshinde · · Source ↗
check runs theFinOps Foundation's validator rules, which I ported to JS, and exits non-zero on errors, so it can gate CI.
Source text · @manvshinde · · Source ↗
OpenAI and Together AI are built from their documented export formats and haven't been run on a real file yet.
Source text · @manvshinde · · Source ↗
The CLI works on its own with no account.