Skip to content

Envoy AI Gateway becomes Agent Router and joins the Agentic AI Foundation

Learn more

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. You get that visibility when every AI request passes through one gateway. The gateway records who sent the request, which model served the request, and how many tokens the request used. The gateway multiplies tokens by the model price and groups the result by user, team, API key, model, provider, or tag.

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. Inference spend comes from many places at once. Sources include direct provider APIs and cloud marketplaces such as Bedrock and Vertex AI. Sources also include subscription seats for tools like Claude Code, SaaS products with AI features, and self-hosted models on your own GPUs. Each source bills in different units and on a different cycle. Tetrate’s post on how to report AI ROI to leadership counts about eight separate systems in a typical enterprise.

The result is a monthly total that no one can split by team. The token optimization post makes the point with real figures from Tetrate’s own deployment. One organization spent $642.50 across 767.8 million tokens in 24 hours. On one team, the effective cost ranged from $0.36 to $2.00 per million tokens across five models. A single total does not show that cost range.

An AI gateway gives AI cost visibility by recording four facts per request

Every request that passes through Tetrate Agent Router Enterprise carries four facts:

FactWhere the fact comes from
Who sent the requestThe API key, which belongs to one user and one team
What the request was forTags on the API key, such as cost-center=acme or env=prod
Which model and provider served the requestThe routing decision the gateway made
How many tokens the request usedInput, cache creation, cache read, and output token counts from the provider response

The Usage Analytics page in the Admin Console shows the cost by user, team, model, API key, or provider, and exports the result as CSV.

Attribution by developer and team depends on one API key per purpose

The gateway attributes 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. No one can report what the team spent. 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. In Agent Router Enterprise, each user belongs to exactly one team, and teams are created under Directory → Teams in the Admin Console. 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.

Once keys and teams are in place, the Analytics page shows up to 50 users or teams side by side. A “No team assigned” row shows spend that still has no owner.

Attribution by customer uses tags on the API key

The gateway has no built-in “customer” object. Customer attribution uses one of two methods:

MethodHow the method worksBest for
One API key per customerEach customer tenant gets a scoped key; group Analytics by API keyA small number of large customers
Tags on API keysAttach customer=acme or cost-center=1234 to each key; filter Analytics by tagMany customers, or cost that crosses teams

Tags are approved key-value pairs kept in a list 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. The guide to attributing cost with tags recommends agreeing on the tag categories with finance before anyone issues keys. A request carries user, team, and tag at once, so you can report by every field from the same data.

Chargeback and showback use the same export

Chargeback charges cost to each 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 across teams 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 export contains the consumer identifier, cost in USD, token totals, and the reporting period.

In the docs’ example, four teams produce a calculated total of $10,000 for the month. The provider invoice reads $10,600. The 6% gap comes from committed spend that the gateway cannot see per token. Each team’s share of the total is still correct, so finance applies the shares to the real invoice.

Why the gateway cost total differs from the provider invoice

The gateway computes spend from tokens and published list prices. The budgets architecture page lists three reasons the gateway total will not match the invoice:

  1. Negotiated discounts are not on the published price list. You must enter per-model price overrides.
  2. Provisioned throughput, committed spend, and subscription seats are not billed per token. The gateway cannot convert them.
  3. Limits take effect a few minutes after the spend happens, because totals come from usage summaries.

Subscription seats need passthrough mode to appear at all

Developers who use Claude Code on a Claude Max subscription do not generate metered API spend. Their usage does not appear in a token-based report unless the traffic passes through the gateway. Agent Router Enterprise supports passthrough for Claude Code, where the subscription still pays and the gateway still logs every request. Passthrough keys and managed keys can run side by side. The token optimization post reports one team whose passthrough usage was worth $13,535 at API prices against $64.33 in pay-per-use spend. Comparing the two figures is the only way to decide who needs a subscription seat.

Visibility comes before limits

The cost and quota management overview describes three stages: understand spend with analytics, monitor spend against a budget, then enforce. Budgets in Agent Router Enterprise offer three actions. The Watch spend action only sends an alert. Hard stop rejects requests at the cap. Degrade gracefully switches one API key to a cheaper model. Tetrate’s post on keeping marketers away from Fable shows why measuring before capping matters. Organizations that cap first often cap the wrong team.

AI cost visibility at the gateway has four limits

  1. The gateway only sees traffic that passes through the gateway. A developer calling OpenAI directly with a personal key does not appear.
  2. Budget enforcement fails open. While totals catch up, the gateway serves the request instead of refusing it.
  3. Tags filter the Cost and Tokens tabs in Analytics. Other tabs do not filter by tag.
  4. Analytics requires the super_admin or billing_admin role.

Now Available

MCP Catalog with verified first-party servers, profile-based configuration, and OpenInference observability are now generally available in Tetrate Agent Router Service. Start building production AI agents today with $5 free credit.

Sign up now

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. You can also say which model and provider served the request. Visibility requires a single point that records identity and token counts for every request.

Why can’t I get cost by team from the provider invoice? Provider invoices report cost per account or per API key, and most organizations share a few keys across many people. The invoice does not list your teams or customers.

How does an AI gateway attribute cost? The gateway records the API key, the user and team who own the key, and any tags on the key. The gateway also records the model that served the request and the token counts. Cost is tokens multiplied by the model’s published price, grouped by any of those fields.

How do I attribute AI cost to a customer? Issue one API key per customer, or attach a governed tag such as customer=acme to each key. Then filter or group the usage report by that key or tag.

Why does the gateway total differ from my invoice? The gateway uses published list prices and per-token math. Negotiated discounts, committed spend, and subscription seats do not appear at the same unit. Use the gateway for percentages and the invoice for the total.

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. They do not appear in the gateway report.

Can I see spend from developers on a Claude Max subscription? Spend from developers on a Claude Max subscription appears only if their Claude Code traffic passes through the gateway in passthrough mode. The subscription still pays, and the gateway logs the tokens so you can compare the seat cost against the equivalent API cost.

What is the difference between AI chargeback and showback? 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 usage export is the same in both cases.

Who can see AI cost analytics in the gateway? The Usage Analytics page requires the super_admin or billing_admin role in the Admin Console.


MCP Catalog with verified first-party servers, profile-based configuration, and OpenInference observability are now generally available in Tetrate Agent Router Service . Start building production AI agents today.

Decorative CTA background pattern background background
Tetrate logo in the CTA section Tetrate logo in the CTA section for mobile

Ready to enhance your
network

with more
intelligence?