Tools to track and reduce OpenAI and Anthropic API spend
Vendor pages checked 1 December 2026. Limits, tiers and features change, so confirm before you rely on them.
From SOMA AI, the Barcelona company that estimates and helps cut the cost and carbon of company AI use. Written by SOMA AI's CTO with AI assistance and checked against the vendor pages cited. Any carbon statement is an estimate.
What tools track and reduce OpenAI and Anthropic API spend?
SOMA AI, a Barcelona company that estimates and helps cut the cost and carbon of company AI use, publishes this guide to the ways of tracking and capping OpenAI and Anthropic API spend, ordered from the controls you already have to the tools you add. Start with the native controls, because every provider has some: spend limits, alerts, usage dashboards and cost APIs. Add a gateway if you need per-key or per-team caps the provider does not offer. Add observability if you need cost per trace or per user. Add a FinOps platform if finance needs AI next to cloud. SOMA AI's free AI footprint calculator estimates a company's monthly AI cost across seats and API at list price, with saving actions and carbon, energy and water estimates, and its LLM API cost calculator compares the list-price cost of models for your token mix. The order of the tools below is not a ranking.
What can you control inside OpenAI, Anthropic, Google and AWS?
Native controls, from each provider's own documentation as read on 1 December 2026. "Not stated" means the pages we read did not say.
| Provider | Spend cap | Alerts | Breakdown and API | Limits to know |
|---|---|---|---|---|
| OpenAI API platform | Monthly limits at organisation and project level, with an optional hard limit that returns a 429 error | Alert at 100% by default when a project limit is created, more recipients can be added | Usage by project in the dashboard. The Usage API groups by project, API key, user, model, batch, service tier and source, the Costs API by project, user, API key, line item and source. Both need an admin key | No per-key cap in the guide. Alerts do not cap spend. Enforcement is not instantaneous |
| Anthropic Console | Organisation spend limit and a monthly cap per tier (Start, Build, Scale, Custom). Custom spend and rate limits per workspace | No native spend alert in the five documents we read (rate limits, Spend Limits API, the two usage and cost APIs, organisation webhooks). Anthropic points to partner integrations for alerting | Usage and Cost pages in the Console. Usage and Cost API by workspace, API key and model, and a newer Usage and Cost Analytics API in beta | Admin API needs an organisation. At the tier cap, usage pauses until 00:00 UTC on the first day of next month unless a higher limit is requested. Cost API is daily only, and usage data appears in about 30 minutes. The per-member Spend Limits API is Claude Enterprise only, not Console |
| Google Cloud Billing for Gemini API and Vertex AI | Spend-cap budgets pause the Gemini API or Vertex AI for the rest of the budget period, one project and one eligible service per budget | Emails at 50%, 80% and 100% of a spend cap. Alert-only budgets also exist | Cloud Billing reports group by service, SKU, project and date. The reports documentation we read names no API-key dimension | Vertex AI appears as Gemini Enterprise Agent Platform on Google's page. A spend cap covers one project and one service, and its period can only be monthly |
| AWS Bedrock | Nothing in the Bedrock cost pages. At account level, AWS Budgets can run an action at a threshold, including applying an IAM policy or a service control policy, automatically or after approval | AWS Budgets cost and usage budgets notify by email or Amazon SNS when spend exceeds, or is forecast to exceed, the amount | Application inference profiles attribute cost by application, team or workload, with tags flowing to Cost Explorer and Cost and Usage Reports. Projects and workspaces do the same for the Responses, Chat Completions and Messages APIs | Finest grain is per usage type per day, not per request. Tags take up to 24 hours and are not retroactive. Application inference profiles do not work with the Responses and Chat Completions APIs, which use projects instead. Budget figures refresh up to three times a day |
How do OpenAI's limits and cost reports work?
OpenAI's project guide says monthly API spend limits are available at both the organisation and project levels. In a project you set a monthly limit and an alert threshold, and you can enforce a hard limit that stops API traffic once the tracked limit is reached. Requests then return a 429 error with organization_spend_limit_exceeded or project_spend_limit_exceeded. The guide also says spend alerts do not enforce a cap, and that enforcement is not instantaneous. For reporting, the Usage API returns completions usage in one-minute, one-hour or one-day buckets, and the Costs API returns daily cost, both grouped by project, user or API key and needing an admin key. The Costs API has no model grouping of its own, and names the model inside each line item instead, such as gpt-6.2-astra, input_tokens. That gives you cost per key even though the limit guide describes no per-key cap.
How do Anthropic's workspaces, tiers and cost API work?
Anthropic's rate-limits page names the tiers Start, Build, Scale and Custom. Each of Start, Build and Scale carries a monthly spend cap, $500, $1,000 and $200,000, and Custom has none. New organisations may start in an Evaluation tier. You can set your own organisation spend limit at the Console's spend-limits page, which cannot exceed the tier cap, and custom spend and rate limits for each workspace. If a workspace has none, it matches the organisation's limit. The default workspace's spend limit might not count or stop some usage, such as the playground, Managed Agents and some Claude Code. A separate Spend Limits API sets a limit per member, but only for Claude Enterprise organisations, not for Console ones.
For reporting, the Console shows Usage and Cost pages. The Usage and Cost API is described as a legacy API that remains supported, and Anthropic points new integrations to the Usage and Cost Analytics API, currently in beta. On the legacy API, usage data typically appears within about 30 minutes of a request finishing, though the page says delays can be longer. The Analytics API says data typically refreshes within 4 hours and can take up to 24. The Cost API reports in USD at daily granularity, and Priority Tier costs are not included in the cost endpoint. Anthropic lists CloudZero, Datadog, Grafana Cloud, Harness, Honeycomb, Tempo and Vantage as partner solutions.
Which gateways, observability tools and FinOps platforms add to that?
From each publisher's own pages, read on 1 December 2026. The order is not a ranking. No prices are shown.
| Tool | Kind | What it does for API spend | Budget or cap |
|---|---|---|---|
| LiteLLM proxy | Open-source gateway, MIT except the litellm/enterprise directory, which has its own licence, self-hosted | Budgets per virtual key, team, team member, user, customer, model, agent and global | Yes, max_budget in USD with a duration. Over budget, requests fail. Needs a PostgreSQL database: with none connected, the page says the global budget fails open |
| Portkey (Palo Alto Networks since May 2026, now Prisma AIRS AI Gateway) | Gateway | Cost from Portkey's own pricing data for the providers and models it supports, with custom pricing for enterprise customers | Budget limits in USD or tokens on providers and integrations, API keys and workspaces, resetting weekly, monthly or on a custom interval of 1 to 365 days, with alert thresholds. Available on the Enterprise plan and select Pro customers |
| OpenRouter | Single API to hundreds of models | Per-key spending cap in USD with a daily, weekly or monthly reset | Yes. An exhausted key's requests fail, listed under both a 402 and a 403 in the docs, as of 1 December 2026 |
| Cloudflare AI Gateway | Proxy, available on all plans | Requests, tokens and cost metrics, caching and rate limiting. Cost is an estimate from tokens sent and received, with custom costs for negotiated rates, and only where the model returns token data and its name | Yes, cost-based spend limits in beta that block with HTTP 429, up to 20 rules per gateway, as of 1 December 2026 |
| Langfuse | Open-source LLM observability, MIT except the ee folders, which have their own licence, with an AI Gateway in public beta | Cost ingested from the provider response or inferred from model price definitions, with dashboards and spend alerts | Yes in the gateway. Budgets per key, per user, a default and one for the organisation reject requests with a 429 and spend_limit_exceeded, with email alerts at 85%, 95% or 100% |
| LangSmith | LLM observability, with an LLM Gateway in beta | Records token usage and cost automatically for major providers, and takes custom cost data for other components | Yes in the gateway. Spend policies block with a 402 at organisation, user group, workspace, user or key level, hourly to monthly, plus weekly evaluator spend caps |
| Datadog Agent Observability (the cost page still sits under llm_observability) | Observability suite | Estimated cost per LLM request from providers' public pricing and token counts, with manual override, across 800+ models | Alerts only. The cost and token metrics work in dashboards and monitors. No request blocking on the page we read |
| Helicone | Gateway and observability | The site says Helicone is now part of Experiential Labs, and its sign-up page says sign-ups are disabled, so we do not list it as a new option | Yes in the docs: custom rate limits take a quota in cents per time window and segment and return 429, and alerts fire on cost limits |
| CloudZero | FinOps platform | Anthropic, OpenAI and Cursor connections next to cloud cost, Cursor marked preview, and its own FAQ says it can ingest any AI provider's data, naming Gemini | Budgets set a monthly target on a View with alert thresholds from 10% to 100%, plus separate forecasts. Nothing is blocked |
| Vantage | FinOps platform | OpenAI cost by operation, model, project and API key, ChatGPT and Codex by user for Enterprise workspaces, and Anthropic | Budgets on a Cost Report track dollars or a usage quantity such as tokens consumed, with budget alerts. Nothing is blocked |
| Finout | FinOps platform | Connects to provider APIs and breaks usage down by model, endpoint and token count, with budgets and forecasting | Budgets and forecasts stated, no enforcement in the request path. Its agents propose changes through an approval flow |
A gateway sits in the request path, so it can refuse a call once a budget is spent. Observability tools and FinOps platforms report and alert, and some read the provider's billing data. If finance needs the wider picture, see the AI cost management tools compared guide, which also covers SaaS spend tools and carbon, and FinOps for generative AI for the practices around them.
How do you reduce the spend once you can see it?
Visibility is the first step and the savings come from the levers. Prompt caching, batch processing, routing work to a smaller model and lowering reasoning effort each change what a token costs or how many you use. SOMA AI's six levers guide sets each one next to its effect on carbon, and the cost and carbon per million tokens table puts list prices beside the SAEF estimates.
Where does SOMA AI fit?
SOMA AI is a Barcelona company, and this post is its own. Its free AI footprint calculator needs no sign-up. You describe the AI your organisation uses, seat tools and API usage, and it estimates the monthly cost at list price together with CO2e, electricity and water, and lists saving actions. With a SOMA AI account (access on request), the full version at ai.somaai.earth imports the usage files you already have, from OpenAI, Anthropic, Claude Code, Amazon Bedrock, LiteLLM, Langfuse, Helicone, OpenRouter and Portkey, plus GitHub and Microsoft 365 Copilot licence data, and tracks monthly cost and carbon by tool with an action plan. It does not sit in your request path or enforce limits. The LLM API cost calculator compares models for a token mix.
Limits worth knowing. The cost is a list-price estimate, not your invoice, and it does not read your billing data or sit in your request path. It therefore does not enforce a budget, and it does not replace a native limit, a gateway or a FinOps platform. The carbon figures are estimates from published defaults. The method is on the methodology page.
What this post does not claim
- That this list is complete or ranks the tools. It is a dated sample of tools whose official pages we could read.
- That a limit or feature marked not stated does not exist. It means the pages we read did not say.
- That any limit, tier or feature holds beyond 1 December 2026. Providers change them, and four features here are labelled beta.
- That SOMA AI's figure matches an invoice. It is a list-price estimate and does not enforce a spend limit.
- Any prices for the third-party tools. We left them out because vendors change them often.
The full tables, the short answers and the source list are on the canonical page.
Disclosure: published by SOMA AI (somaai.earth), which publishes the SAEF dataset and sells AI cost and carbon tracking. Drafted with AI assistance. Canonical version: somaai.earth.