I needed to put our Anthropic and OpenAI spend next to our cloud bills, and found that the exports don't fit together. The Claude Console gives you two CSVs. The Cost export has dollars rounded to the cent, so a day…
I needed to put our Anthropic and OpenAI spend next to our cloud bills, and found that the exports don't fit together. The Claude Console gives you two CSVs. 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. Anthropic also counts input in four parts that don't overlap: uncached, cache reads, 5-minute cache writes and 1-hour cache writes, priced at 1×, 0.1×, 1.25× and 2× input. OpenAI does it differently: input_tokens already includes cached tokens. If you merge the two exports without accounting for that, you double-count or drop cached input. 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: npx ai-bill-to-focus convert cost.csv usage.csv -o focus.csv --check It writes one row per day, model and token type, each with its own SKU, unit price and quantity. The dollar column is always the provider's own figure. For Anthropic, a row gets the exact token-priced amount only if that rounds to the Cost export's cents; otherwise it keep and a column says which. check runs theFinOps Foundation's validator rules, which I ported to JS, and exits non-zero on errors, so it can gate CI. Rulecan't evaluate are counted and reported, n Status: Anthropic is tested on real Consolhe cent. OpenAI and Together AI are built from their documented export formats and haven't been run on a real file yet. If you have one and it breaks, theheader row alone is enough for me to fix i Network: convert downloads a public model the request contains nothing from your files. --offline skips it, and --prices lets you supply your own list. There's also an in-browser version that doesn't upload anything: https://www.cognocient.co I work on Cognocient AI, which does this kequest (by feature, team or agent run)through a proxy. The CLI works on its own with no account. I'd especially like feedback from anyone already loading FOCUS data into a warehouse.
讨论这个产品