LLM Cost Chargeback by Team and Agent
TL;DR: Tetrate Agent Router Enterprise records tokens per team, agent, and project at the egress gateway, so finance can post AI spend to the right budget.
Your finance team cannot charge back AI spend until token counts tie to a team or agent at the point where traffic leaves. Token attribution at the egress point makes chargeback exact, because the gateway sees each call, the caller key, the model, and the token count in one record.
The usual failure starts with one provider account. Every team calls the provider through shared keys or through team keys with no project record. The invoice names models and totals. Finance asks which team drove the growth. Your platform team rebuilds an answer from logs, and the answer arrives weeks late with gaps.
Tetrate Agent Router Enterprise records each outbound call with the team, agent, and project from the gateway key and tags on the call. Finance gets a spend statement for a closed period. AI ingress vs. AI egress explains why the egress point sees the calls that create the invoice.
Chargeback Needs Attribution at the Point Where Traffic Leaves
A provider invoice reports account totals by model. The invoice has no field for your team names or your agent names. Your internal cost centers exist in your finance system, and the provider has no record of the cost centers.
The egress gateway sits between your agents and the provider. The gateway can attach your identity model to each call before the provider sees the call. The gateway key names the project. Tags can name the app and the project in finer detail. The docs on cost attribution with tags cover tag-based attribution.
Attribution must happen on the call. A monthly log rebuild guesses which key served which workload. A gateway record made during the call names the key, the model, the input tokens, and the output tokens. Finance can defend the number in a budget review.
Chargeback has clear ownership. Finance decides cost centers and posting rules. The platform team makes calls attributable. The gateway produces the spend statement. Finance reconciles the statement against the provider invoice and posts the allocation. The Tetrate docs on splitting the AI bill across teams set out the steps and the owners.
A Worked Chargeback Table Shows the Output Finance Needs
Effective cost per million tokens means the total gateway-calculated spend for a team in a period, divided by the total tokens for the team in the period, multiplied by one million. The metric lets finance compare teams that use different model mixes. A team on a premium model shows a higher effective cost per million tokens than a team on a small model.
Example numbers. The table below uses invented numbers for one month. The numbers show the report format and do not describe a real customer.
| Team | Agent | Input tokens (M) | Output tokens (M) | Spend | Effective cost per million tokens |
|---|---|---|---|---|---|
| Support | Ticket triage agent | 40 | 10 | $180 | $3.60 |
| Support | Answer draft agent | 25 | 15 | $220 | $5.50 |
| Engineering | Code review agent | 60 | 20 | $640 | $8.00 |
| Engineering | Test writer agent | 30 | 8 | $190 | $5.00 |
| Sales | Research agent | 12 | 4 | $96 | $6.00 |
The math for one row: the ticket triage agent used 50 million total tokens and spent $180. $180 divided by 50 gives $3.60 per million tokens. Finance can post $400 to Support and $830 to Engineering and $96 to Sales for the month in the example. Finance can also ask Engineering why the code review agent runs at $8.00 per million tokens while the test writer agent runs at $5.00.
Two limits. Gateway spend is calculated from token counts and model prices, and the provider invoice is the billed record. The two records can differ under committed-use discounts, free tiers, and provider credits. Finance should reconcile the gateway statement against the invoice each period and post the invoice total with the gateway split as the allocation basis.
Budgets and Token Limits Keep Chargeback From Becoming a Surprise
Chargeback reports the past. Budgets guard the present. A team with a monthly budget can see burn during the month and act before the period closes. The docs on setting a budget and tracking spend cover budget setup by team, user, and key.
Token limits add a hard stop. A looping agent can spend a team budget in a weekend. A token limit per agent stops the calls at the limit. Claude API spend governance covers provider caps and gateway token limits for Claude traffic. The token brokering announcement explains request-path token checks.
Per-agent records matter during incidents. A team total shows a spike. An agent record names the workload. Your platform team can pause one agent and keep the rest of the team running. AI cost visibility by team, user, and customer covers day-to-day visibility, and the chargeback statement covers the closed-period finance record.
The Finance Workflow Runs on a Closed Period
Close the period in the gateway console. Pick the dimension for the statement: user, team, or project. Export the statement for finance. Finance reconciles the statement against the provider invoice. Finance posts the allocation to cost centers or sends showback reports to team leads.
Map gateway projects and tags to cost centers before the period starts. A project with no cost center mapping becomes manual work at close. Your platform team and finance should keep the mapping in one document and review the mapping when teams create new projects.
Agent Router Enterprise reports spend a few minutes behind live traffic for operational views. The closed-period statement gives finance the stable record. Keep both views in their lanes: live views for operators, closed statements for posting. Kubernetes egress for AI agents shows where the gateway sits in the cluster.
Agent Router Enterprise
The AI gateway glossary defines chargeback and token terms. AI gateway vs. API gateway explains how token attribution differs from web API metering. The AI gateway performance benchmarks publish gateway overhead, best enterprise AI gateway compares current options, and who created Envoy AI Gateway covers the open source data plane project.
Availability and How to Get Started
Tetrate Agent Router Enterprise is available now with per-user, per-team, and per-project spend statements and export for chargeback or showback. Start with the docs on splitting the AI bill across teams and cost attribution with tags. Book a demo to build a chargeback statement from your own traffic.
Frequently Asked Questions
What Is LLM Cost Chargeback?
LLM cost chargeback posts AI spend to the budgets of the teams that caused the spend. Chargeback needs token records tied to a team, agent, or project for each call.
How Does an Egress Gateway Make Chargeback Exact?
The gateway sees each outbound call with the caller key, the model, and the token count. The gateway records the team, agent, and project at call time, so finance gets a split made from call records.
What Is Effective Cost per Million Tokens?
Effective cost per million tokens means total spend for a team in a period divided by total tokens for the team in the period, multiplied by one million. The metric compares teams with different model mixes.
Why Does the Gateway Statement Differ From the Provider Invoice?
The gateway calculates spend from token counts and model prices. The provider invoice reflects billed charges, discounts, credits, and account terms. Finance reconciles the two records and posts the invoice total with the gateway split.
Can Chargeback Work With One Shared Provider Account?
Yes. Teams call through the gateway with separate gateway keys. The gateway attributes each call to a team, agent, and project even when every call lands on one provider account.
What Is the Difference Between Showback and Chargeback?
Showback reports spend to the teams that caused the spend. Chargeback posts spend to team budgets. Both models use the same gateway attribution records.
Sources
- Split the AI bill across the teams that caused it, Tetrate docs
- Know what every app and project costs, Tetrate docs
- Set a budget and track spend against it, Tetrate docs
Related: AI cost visibility by developer, team, and customer, on day-to-day spend views before the finance close.