AI Cost Visibility: How to See What AI Costs by Developer, Team, and Customer
Last updated: September 2026
AI cost visibility means you can say which developer, team, or customer caused each dollar of AI spend, and then set a limit on that spend. You get that visibility when every AI request passes through one gateway. Tetrate Agent Router Enterprise records who sent each request, which model served the request, and how many tokens the request used. The Usage Analytics page shows that spend by team, user, API key, model, and provider. The Budgets page turns a spend ceiling into a rule that alerts, blocks, or switches a workload to a cheaper model.
Most organizations know the AI total but cannot split the total by team
Without one gateway, AI spend is split among provider invoices, cloud bills, and subscription seats, and no one can say which team spent the money. Tetrate’s post on how to report AI ROI to leadership counts about eight separate billing systems in a typical enterprise. The token optimization post shows the range a single total hides. On one team, the effective cost ranged from $0.36 to $2.00 per million tokens across five models.
Usage Analytics shows AI cost by team, user, API key, model, and provider
The Usage Analytics page is at Usage → Analytics in the Admin Console. The page has two measures, Cost in USD and Tokens, and three time ranges: Last 24 hours, Last 7 days, and Last 30 days. Read the two measures together. A rise in cost with flat tokens means a price change or a shift to a more expensive model. A rise in both means more traffic.
| Control | Options | What the control answers |
|---|---|---|
| Grouping | None, By Team, By User, By API Key, By Model, By Provider | Who or what is spending the money |
| Filters | Team, User, with a “No team assigned” option | Spend for one part of the organization, or spend that has no owner |
| Multi-select | Up to 50 users or teams at once | Side-by-side comparison, one bar color per user or team |
| Download CSV | Exports the current filtered view | Data for finance, chargeback, or a spreadsheet |
| Drill-down | Click a bar or a row | Which keys and models sit behind a team’s total |
Filters persist in the page URL, so a manager can share a link to a view of their own team. The multi-select guide shows that when several users are selected with no grouping, bars appear per key, labeled owner · key-name. Analytics requires the super_admin or billing_admin role.
Cost is calculated from tokens and the published model price. The gateway does not read the provider’s bill. Negotiated discounts need a per-model price override, and provisioned or committed capacity cannot be tracked per token.
Attribution by developer and team depends on one API key per purpose
The gateway assigns cost to whoever owns the API key. If ten developers share one organization-wide key, the gateway sees one spender. The cost control guide states the rule: issue one API key per purpose. One key per developer gives per-developer cost. One key per application gives per-application cost.
Coding tools are the common case where one developer has many keys. A developer with four AI extensions in VS Code has four provider keys and four bills. The Tetrate VS Code extension replaces the four keys with one gateway key. That key serves the chat view, agent mode, and GitHub Copilot chat, so every model call from the editor appears in one report.
Teams are defined by your identity provider. Each user belongs to exactly one team, and teams are created under Directory → Teams. If you use Microsoft Entra ID, you can map Entra ID groups to teams and cost centers. Team assignment then matches the company structure with no manual work.
Attribution by customer and application uses tags on the API key
The gateway has no built-in “customer” object. Customer attribution uses one API key per customer, or a tag such as customer=acme on each key. Tags are approved key-value pairs kept under Directory → API Keys → Tags. An operator defines the allowed keys and values, so customer=acme and Customer=ACME cannot both appear and split the report. In Analytics, a selected tag pair filters the Cost and Tokens measures, and the filter is shareable by URL. The guide to attributing cost with tags recommends agreeing on the tag categories with finance before anyone issues keys. SaaS teams that price AI features per customer can follow the full setup in per-customer AI cost for SaaS.
Tags are for reporting. Budgets are set on teams, teammates, and keys, and a tag-scoped budget can no longer be created.
Budgets turn a spend ceiling into a rule
A budget in Agent Router Enterprise has four parts: a scope, a spend limit in USD, a period, and an action. Budgets are created at Usage → Budgets → Add budget. Read the baseline at Usage → Analytics first, because the limit should match what the team already spends.
| Part | Options | Notes |
|---|---|---|
| Scope | Whole team, Each teammate, One API key | Whole team is one pooled ceiling. Each teammate applies the same limit to every member. |
| Spend limit | USD per period | The console suggests $100 to $10,000 monthly and $25 to $2,500 weekly |
| Period | Daily, Weekly, Monthly | Resets at midnight UTC, on Monday, or on the 1st of the month |
| Action | Watch spend, Hard stop, Degrade gracefully | What happens when the limit is hit |
The three actions do different things, and the enforcement guide describes each:
| Action | What happens at the limit | Allowed scopes |
|---|---|---|
| Watch spend | An alert is raised. Nothing is blocked. | Whole team, Each teammate, One API key |
| Hard stop | Requests are rejected with an error that names the exhausted budget, until the period resets | Whole team, One API key |
| Degrade gracefully | Requests are rerouted to a cheaper fallback model | One API key only |
Each-teammate budgets are watch-only. The “New budget” drawer shows a Policy preview panel. The panel lists the scope, the behavior at the limit, and the target’s billed spend over the last six months, so you can see whether the limit is realistic before you save. Several budgets can cover one key, and every one applies. The first exhausted budget stops the request. A key budget survives credential rotation. Enforcing actions have been available since release 0.3.0.
The budget detail page shows used, remaining, days left, and top contributors
Each budget has a detail page. For a whole-team budget, the page shows billed spend against the ceiling, for example $260.75 of $5,000.00 · monthly. Below that are a progress bar, Used as a percentage, Remaining, Days left until the period resets, and Top contributors ranked by share of the spend. For an each-teammate budget, the page shows a count such as 7 of 7 members within limits, split into over, near, and healthy. A sortable Members list shows each cap and the percentage used.
Only billed spend draws down a budget. Passthrough usage from a Claude Max subscription appears as an ≈ figure marked as not counted toward the budget. The figure is the cost at standard API rates if the developer had no subscription.
The docs suggest 80% used with time left in the period as the point to act. Raising the limit is an in-place edit that takes effect at once against the spend already recorded. For a Hard stop or Degrade gracefully budget, raising the limit is what releases the refused or degraded traffic. A Status toggle pauses tracking during a renegotiation. Every edit, pause, and deletion is recorded in the audit trail with the actor and the time.
Degrade gracefully keeps a workload running at a cheaper model
Degrade gracefully is the action for a workload that must not stop. When the key’s budget is exhausted, the gateway reroutes requests to a fallback model you pick, and the workload keeps serving. Three conditions apply. The action is available on One API key budgets only. The fallback model must be served over an OpenAI-compatible API and must stay enabled for the project, or requests fail instead of degrading. And Degrade gracefully does not stop spending by itself. Spend continues at the fallback model’s rate until the period resets. If you need a true ceiling, pair the action with a Hard stop budget at a higher limit on the same key.
Rate limits act in seconds, and budgets act in minutes
Budgets measure money. Rate limits measure throughput. The budgets architecture page explains why both are needed. Budget totals come from usage rollups in the management plane. Enforcement takes effect a few minutes after the spend happens, and the gateway fails open while totals catch up. A runaway loop can spend a lot in those minutes.
A rate limit is checked inline on every request. Today the shipped control is a tokens-per-hour ceiling on an API key or a project, set through the management API. A request over the ceiling gets HTTP 429, and traffic resumes when the window advances. Request-count ceilings, per-minute windows, and an Admin Console screen for rate limits are planned for the 2026 Q4 release. The cost control guide gives the pairing rule. Use hard rate limits for experimental and CI keys. Use budgets plus analytics for production, where a false block costs more than a small overspend.
For a leaked key, a rate limit at the key’s normal traffic level bounds the damage before anyone is paged. Revoke on the API Keys page is immediate and cannot be undone, and the next request is rejected.
Chargeback and showback use the same CSV export
Chargeback charges each team’s AI cost to that team’s budget. Showback leaves the cost central and gives each team a view of what they spent. The guide to splitting the AI bill shows that the export is identical in both cases. Set the time range to a closed period, group by team or tag, sort by cost, and download the CSV. The file contains the consumer identifier, cost in USD, token totals, and the period.
In the docs’ example, four teams produce a calculated total of $10,000 for the month while the provider invoice reads $10,600. The gap comes from committed spend the gateway cannot see per token. Each team’s share is still correct, so finance applies the shares to the real invoice.
Cost spike alerts run in your observability stack
The budget pages raise an alert state on the budget meter. Alerts that page someone run outside the console. The cost spike guide exports per-request telemetry over OpenTelemetry to Grafana, Datadog, or Honeycomb and puts the alert rules there. The OpenTelemetry reference lists gen_ai.client.token.usage with a gen_ai.token.type attribute for input, output, cached input, cache creation, and reasoning tokens, plus tars.user and tars.customer attributes for grouping. Three rules cover most cases: a key’s hourly cost passes a baseline, the traffic shape changes, or aggregate spend approaches a contract ceiling.
For slower drift, the spend drift guide recommends a weekly review at Usage → Analytics, grouped By API Key and sorted by cost. A chatty agent, or a workload that moved to a bigger model, is then caught in weeks instead of on the invoice.
Subscription seats need passthrough mode to appear at all
Developers who use Claude Code on a Claude Max subscription do not generate billed API spend. Their usage is invisible to a token report unless the traffic passes through the gateway. Agent Router Enterprise supports passthrough for Claude Code, where Anthropic still bills the subscription and the request log labels each request as passthrough. The token optimization post reports one team whose passthrough usage was worth $13,535 at API prices against $64.33 in billed spend. That ≈ figure on the budget page is the only way to compare a seat against the same usage at API prices.
Agent Router Enterprise
Frequently asked questions
What is AI cost visibility? AI cost visibility means you can say which person, team, application, or customer caused each dollar of AI spend, and which model and provider served the request. Visibility requires a single point that records identity and token counts for every request.
How does an AI gateway show cost by team? Every request carries the API key, the key’s owner and team, tags on the key, the model, and the token counts. The gateway multiplies tokens by the published model price and groups the result by team, user, API key, model, or provider on the Usage Analytics page.
What budget actions does Agent Router Enterprise offer? Three. Watch spend raises an alert and blocks nothing. Hard stop rejects requests until the period resets. Degrade gracefully reroutes one API key’s requests to a cheaper fallback model.
What is Degrade gracefully? Degrade gracefully is a budget action that switches an API key to a cheaper fallback model once the key’s budget is exhausted. The workload keeps running. Spend continues at the fallback model’s rate, so a Hard stop budget is still needed for a true ceiling.
How often do AI budgets reset? Daily at midnight UTC, weekly on Monday, or monthly on the first of the month. The period is set per budget and can be changed in place.
Does a budget stop spend exactly at the limit? No. Budget totals come from usage rollups, so enforcement takes effect a few minutes after the limit is crossed. The gateway fails open while totals catch up. Use a rate limit for immediate, inline control.
Can I set an AI budget per customer? Not by tag. Budgets are set on a whole team, on each teammate, or on one API key. To cap a customer, issue that customer a dedicated API key and set a budget on the key.
How do I get alerted to an AI cost spike? Export telemetry over OpenTelemetry to Grafana, Datadog, or Honeycomb and set alert rules there, for example on a key’s hourly cost passing a baseline. The console shows an alert state on the budget meter but does not page anyone.
How do I see what GitHub Copilot and Claude Code cost per developer? Route the tools through the gateway with one key per developer. Claude Code connects with the tare CLI, and GitHub Copilot chat and agent mode connect through the Tetrate VS Code extension. Inline Copilot completions stay on GitHub and appear on the GitHub bill.
Who can see AI cost analytics and set budgets?
The Usage Analytics and Budgets pages require the super_admin or billing_admin role in the Admin Console.
Related reading
- Per-Customer AI Cost for SaaS
- AI Model Access Control
- Token Optimization: How Engineering Leaders Control AI Token Costs
- Keeping Marketers Away From Fable, or: How I Learned to Stop Worrying and Love AI Gateways
- Cost and Token Visibility product page
- AI Cost Governance solution page
- About cost and quota management in the docs
- Set a budget and track spend against it in the docs
- Cost control and budgets evaluation scenarios in the docs
Learn more about Tetrate Agent Router Enterprise — enterprise AI agent routing with policy, cost controls, and audit across every gateway.