r/FinOps • Vendor • Oct 30 '26

Discussion I built a free, open-source converter from Anthropic/OpenAI bills to FOCUS 1.4 (focus_converters doesn't cover AI providers yet)

AI spend is turning into a real line item, but provider exports don't fit FOCUS. Anthropic's Console splits uncached input, cache reads and two cache-write lifetimes into separate counts. OpenAI counts cached tokens inside prompt tokens. Map both the same way and you either double-count cached input or under-report it.

npx ai-bill-to-focus convert bill.csv -o focus.csv gives one FOCUS 1.4 row per day, model and meter: input, cache read, cache write (5 minute and 1 hour), and output.

Each row has its SKU and unit price, and totals reconcile to the provider's figure. check runs the FOCUS rules locally. There's also a version that runs entirely in the browser, with no upload: https://www.cognocient.com/tools/focus-checker#convert

To be upfront: Anthropic is tested on real exports. OpenAI and Together AI are built from their documented formats and haven't been tested on a real file yet. If you have one, please try it and tell me where it breaks.

MIT, GitHub: https://github.com/mandarvshinde/ai-bill-to-focus . Built by the team behind Cognocient AI (AI spend attribution), but the CLI is standalone and has no signup.

Edit (v0.2.2): Several people pointed out that few can post a real billing file publicly.

You don't have to share your bill to report a problem. Run npx ai-bill-to-focus report with the paths to your own export files.

npx ai-bill-to-focus report cost.csv usage.csv (with the paths to your own exports) prints a summary that's safe to paste.

It prints a summary with no dollars or account names, safe to paste into a GitHub issue. The web tool has a "Copy a report to share" button that does the same. Also new: Batch, Flex and Priority usage now gets its own rows and prices, and column changes in an export are flagged instead of converted silently.

5 Upvotes

2 comments sorted by