To track AI usage across OpenAI, Anthropic and Gemini, pull each provider's own cost data into one table with the same columns: date, provider, feature and dollars. Each provider splits spend by a different container. OpenAI uses projects and API keys, Anthropic uses workspaces (and API keys in its newer reporting API), and Google reports Gemini cost only by Google Cloud project. Give every feature its own container on every provider, with the same name everywhere, and the three reports line up.
What each provider reports, and where
OpenAI: projects, API keys and the Costs API
OpenAI organizes usage by project, and each project has its own API keys, members and spend limits. The usage dashboard shows cost and activity by project, API key and model, in UTC dates, and exports to CSV. For automation, the Costs API (GET /v1/organization/costs) returns daily dollars grouped by project_id, api_key_id or line_item. The Usage API (GET /v1/organization/usage/completions and its siblings for embeddings, images and audio) returns tokens and request counts by project, key and model, in minute, hour or day buckets. Both need an Admin API key, which only organization owners can create. The Usage and Costs API walkthrough has working requests.
Anthropic: workspaces and the Admin API
Anthropic's equivalent of a project is a workspace. It holds API keys, members and rate limits, and can have its own monthly spend limit and alerts. Organizations get up to 100 workspaces by default. The Default Workspace can't have a spend limit, so keep production features out of it.
There are two reporting APIs, both called with an Admin API key (sk-ant-admin01-) that organization admins create in the Claude Console:
- The Usage and Cost API, which Anthropic now calls legacy but still supports.
/v1/organizations/usage_report/messagesreturns tokens in 1m, 1h or 1d buckets, grouped by API key, workspace, model, service tier and more./v1/organizations/cost_reportreturns daily cost grouped by workspace or description. Data typically appears within 5 minutes. - The Usage and Cost Analytics API, in beta, at
/v1/organizations/analytics/usageand/cost. It can also group cost by API key. Data typically refreshes within 4 hours and can take up to 24, figures can change until about 7 days after month end, and it covers the last 365 days.
Gemini: Google Cloud projects and Cloud Billing
Every Gemini API key belongs to a Google Cloud project, and Google's billing docs say keys have no independent billing settings, so cost is only available per project. You find it in Cloud Billing reports by grouping by project or SKU and filtering the Services column to Gemini API, or programmatically through the BigQuery billing export. Cost details typically appear within a day but can take longer. Request and token counts are on AI Studio's usage dashboard. AI Studio's project spend caps are experimental and can run over by about 10 minutes of billing delay.
OpenAI, Anthropic and Gemini usage reporting compared
| OpenAI | Anthropic | Gemini API | |
|---|---|---|---|
| Splits spend by | Project | Workspace | Google Cloud project |
| Cost per API key | Yes | Analytics API (beta) only | No |
| Cost data | Costs API, daily | Cost report, daily; Analytics API, 1m to 1d | Cloud Billing reports or BigQuery export |
| Token data | Usage API, 1m, 1h or 1d | Usage report, 1m, 1h or 1d | AI Studio usage dashboard |
| Day boundary | UTC | UTC | US Pacific Time in reports |
| Cost units | US dollars | Cents, as decimal strings | The billing account's currency |
| Documented delay | None documented; recent days can change | About 5 minutes (legacy); up to 24 hours (Analytics) | Typically within a day |
| Spend controls | Organization and project limits and alerts | Workspace spend limits and alerts | Experimental project spend caps |
Checked against each provider's documentation in November 2026.
How to set up projects and keys so providers line up
These steps make each provider's containers mean the same thing, so their reports can be joined later.
- Name your AI features once, such as
support-assistantanddoc-pipeline, and use exactly those names on every provider. A feature that drafts with GPT and reviews with Claude then appears under one name in both reports. - Create one container per feature per provider: an OpenAI project, an Anthropic workspace, a Google Cloud project. An environment suffix such as
-prodor-devkeeps test traffic out of production numbers. - Give each deployment its own key inside its feature's container, so a spike traces back to one service and a leaked key can be revoked without breaking anything else. On Gemini, separate keys still help with revocation, but cost only splits by project.
- Keep a register that maps every project, workspace and key ID to a feature and an owner. A key that shows up in the data but not in the register is the first thing to chase.
An illustrative register:
provider,container_id,key_id,feature,owner
openai,proj_7Hq2…,key_Lm9x…,support-assistant,Support team
anthropic,wrkspc_01Jw…,apikey_01Rj…,support-assistant,Support team
google,doc-pipeline-prod,,doc-pipeline,Data teamThe guide to organizing OpenAI projects and keys covers naming, environments and service accounts in more depth, and the layout carries over to Anthropic workspaces.
How to combine the data in one table
A scheduled job, or a spreadsheet to begin with, writes every provider's daily cost into one long table. Illustrative rows:
date,provider,feature,cost_type,amount_usd,source_label,pulled_at
2026-11-02,openai,support-assistant,output,38.40,(line item),2026-11-09
2026-11-02,anthropic,support-assistant,input,12.75,(description),2026-11-09
2026-11-02,google,doc-pipeline,output,6.10,(SKU),2026-11-09Use one day boundary
OpenAI's dashboard and both Anthropic APIs use UTC days. Cloud Billing reports start each day at midnight US Pacific Time, so a Gemini day runs 7 or 8 hours behind the others. Weekly totals barely notice, but on a daily chart, traffic at 6 p.m. Pacific on a Tuesday lands on Tuesday in Google's report and on Wednesday in OpenAI's. The BigQuery export records hourly usage windows, which you can regroup into UTC days.
Convert units before adding
OpenAI's Costs API returns dollars in amount.value. Anthropic's cost endpoints return decimal strings in cents, so "41280.000000" from the Analytics API is $412.80. Cloud Billing uses the billing account's currency, which is fixed when the account is created and isn't always US dollars; the BigQuery export includes the exchange rate.
Map line items to a few cost types
OpenAI splits cost by line item, which names the model and kind of usage. Anthropic uses a description field (legacy) or cost and token types (Analytics), and Google uses SKUs. Map them to a short list, such as input, cached input, cache writes, output and tools, and keep the original label in its own column so the mapping can be checked. Record when you pulled each row, and pull the previous month again once it has settled.
Logging tokens yourself, or using a gateway
Provider cost data only splits as finely as your projects and keys. Cost per customer or per request needs data from your own side.
Log usage on every request
Every response reports its token counts, so your code can store them with the feature, customer and model and multiply by a price table. Fields with similar names count different things across providers:
| OpenAI (Responses API) | Anthropic (Messages API) | Gemini (generateContent) | |
|---|---|---|---|
| Input | usage.input_tokens, includes cached tokens | usage.input_tokens, excludes cache reads and writes | usageMetadata.promptTokenCount, includes cached content |
| Cached input | input_tokens_details.cached_tokens | cache_read_input_tokens | cachedContentTokenCount |
| Output | output_tokens, includes reasoning | output_tokens, includes thinking | candidatesTokenCount, excludes thinking |
| Reasoning | output_tokens_details.reasoning_tokens | output_tokens_details.thinking_tokens | thoughtsTokenCount, billed at the output rate |
Request logs can split cost any way you can tag it, in one schema for every provider. The trade-off is accuracy against the bill. You maintain three price tables, and cache writes, batch discounts, long-context pricing and tool charges all pull the real bill away from tokens times price. Compare monthly totals with each provider's cost data.
Route calls through a gateway
A gateway or proxy, such as LiteLLM's open-source proxy or Cloudflare AI Gateway, sits between your code and the providers. It forwards calls to whichever provider you name and records tokens and estimated cost against virtual keys, teams or tags. You skip writing the logging code. In exchange, every model call depends on one more service, your provider keys sit in one place, and the cost figures are still estimates. Cloudflare's documentation says as much and sends you to the provider's dashboard for exact figures.
Start with provider data split by project or workspace, since it matches what you pay, and add request logging where someone needs per-customer numbers. The post on cost per feature, team or customer compares the approaches in more detail.
Common questions
Is there one dashboard for OpenAI and Anthropic usage?
Not from the providers. Each console shows only its own usage, so a combined view means building a table like the one above, routing calls through a gateway, or using a third-party tool that connects to both.
Can I see Gemini API cost per API key?
No. Gemini API keys have no billing settings of their own, and Cloud Billing reports cost by project and SKU. If two features need separate costs, put them in separate Google Cloud projects.
Which Anthropic API should I use for cost data?
Anthropic recommends the Usage and Cost Analytics API for new integrations. It's in beta, can group cost by API key, and usually refreshes within 4 hours. The legacy Usage and Cost API is fresher, but its cost report only groups by workspace and description.
How do I track LLM cost per customer across providers?
Log token counts on every request with the customer ID and price them from your own table. None of the providers' usage or cost APIs know who your customers are, so check the monthly totals against each provider's cost data.
Where Braid fits
Braid does the provider-data part of this for OpenAI. It connects with a read-only Admin API key and maps OpenAI projects and keys to the features your company names (Braid calls them Implementations), each with an owner, a team and a monthly budget. Keys that aren't mapped show up as unmapped, and every Monday it emails a report of last week's spend by Implementation. It works at project, key and model level, not per request or per customer, and never reads prompts or responses.
The beta currently supports OpenAI API accounts. More provider connections are planned. Until then, Anthropic and Gemini spend needs the setup described above.