TemplatesGet a demo →Book a meeting
Blog
AI EconomicsGovernance

AI Cost Management: How to Attribute LLM Spend by Team, Agent and Use Case

In short

AI cost management is the practice of measuring, attributing and controlling AI spend by team, user, agent, use case and model, then tying it to the value it produces. It covers model usage, AI subscriptions and embedded AI features, and works only when attribution happens at the moment of each call, not after the invoice arrives.

Key takeaways

  • AI cost management means seeing every AI tool and model call, attributing each to an owner, and controlling spend where calls happen.
  • AI spend is hard to see because it arrives through many purchase paths, includes shadow AI, is metered in tokens, and grows when agents call models in loops.
  • Attribute spend by team, user, agent, use case and model, plus run ID and outcome, captured automatically through one gateway.
  • The main levers are routing each step to the right model, caching, sending less context, setting limits, retiring unused tools and keeping arithmetic out of the model.
  • Tie cost to value with cost per outcome and a fully loaded ROI calculation, so you know what to grow and what to retire.

AI cost management is the practice of measuring, attributing and controlling what an organization spends on AI, by team, user, agent, use case and model, and tying that spend to the value it produces. It covers model usage, AI software subscriptions and the AI features inside tools you already own, and it gives finance a line it can read and engineering levers it can pull.

Most organizations cannot yet answer a simple question: what did AI cost us last month, and what did we get for it? The bill arrives in pieces. One invoice per model provider, a stack of software subscriptions, AI add-ons switched on inside existing SaaS, and expense claims for tools nobody approved. None of those documents says which team, which agent or which business outcome the spend belonged to. This guide covers why AI spend is hard to see, what to attribute it to, the levers that reduce waste, and how to connect the numbers to value.

What is AI cost management?

AI cost management, sometimes called FinOps for AI or AI spend management, applies the discipline of cloud cost management to AI workloads. It has three parts:

  • Visibility. An inventory of every AI tool and every model call, sanctioned or not.
  • Attribution. Each unit of spend assigned to an owner: a team, a user, an agent, a use case and the model that served it.
  • Control. Budgets, alerts, limits and routing rules that keep spend proportionate to value, enforced where the calls happen rather than discovered on the invoice.

The goal is not the smallest possible bill. It is a bill where every line has an owner and a reason, so you can decide what to grow and what to retire.

Why is AI spend so hard to see?

Too many purchase paths

AI enters a company through model APIs bought by engineering, assistants bought per department, AI features bundled into suites, and freemium tools added one person at a time. Each arrives on a different budget line, so no single report shows the total.

Shadow AI

Tools used without approval do not appear in procurement at all, only in expense reports and card statements. Shadow AI is a data-protection problem first, but it is also why IT's count of AI tools and finance's count never match.

Usage-based consumption

Model usage is metered in tokens, so cost depends on behavior rather than headcount. A longer prompt, a larger retrieved context or a more verbose answer all change the number, and the same feature can cost very different amounts depending on how people use it.

Agents call models in loops

A single agent run can retrieve, reason, call a tool, retry, and call the model again. A retry policy written for reliability can multiply usage silently, and an agent stuck in a loop can run up spend with nobody watching. The OWASP Top 10 for LLM Applications lists unbounded consumption as a risk in its own right, including "denial of wallet" attacks, and recommends rate limits, quotas and monitoring as mitigations.

Why it matters

You cannot manage AI spend from the invoice. By the time a provider bill arrives, the call that caused it has no owner attached. Attribution has to happen at the moment of the call, or it does not happen at all.

What should you attribute AI spend to?

Attribute at the finest grain you can capture cheaply, then roll up. Five dimensions answer most questions finance, engineering and risk will ask.

Dimension Question it answers What to capture on each call Main user
Team or department Who should carry this spend? Cost center from the user's directory record Finance
User Is usage concentrated, or broad? Authenticated identity, not a shared key Finance, security
Agent or application Which build is driving cost? Agent or app identifier and version Engineering
Use case or workflow Is this spend tied to a business outcome? Workflow or process tag Business owner
Model Are we using the right model for the job? Model name, provider, tokens in and out Engineering

Two more fields earn their place: the session or run ID, so a single expensive agent run can be traced step by step, and the outcome, such as resolved, escalated or refused, so cost can be divided by results rather than requests. If you already collect telemetry, the OpenTelemetry project maintains semantic conventions for generative AI covering spans and metrics for model calls, which makes these fields portable across tools. The wider question of what to log for every call is covered in our guide to LLM observability.

How to set up AI cost attribution in six steps

  1. Inventory everything. Cross-reference procurement, expense reports, card statements and identity logs to list every AI tool and API key in use. Expect the real number to exceed IT's list.
  2. Route model calls through one gateway. Attribution is only reliable when calls pass a single point that can see identity, agent and model. Direct API keys scattered across teams make it guesswork.
  3. Tag every call. Team, user, agent, use case, model and run ID, captured automatically from identity and context rather than typed by developers.
  4. Meter per run, not just per month. Record cost and latency for each agent run and each evaluation, so a regression in cost is caught like a regression in quality.
  5. Set budgets and alerts by owner. Give each team or agent a budget, alert before it is reached, and decide in advance whether reaching it blocks, throttles or simply notifies.
  6. Publish showback, then chargeback. Start by showing each team its spend. Move to charging it back once the numbers are trusted.

What are the levers for LLM cost optimization?

Attribution tells you where spend goes. These levers change it, without making the product worse.

Route each task to the right model

Not every step needs the most capable model. Classification, extraction and routing steps often run well on smaller, faster models, while reasoning over a contract may justify a larger one. The cleanest way to do this is per step: choose the model for each step of a flow and confirm with an evaluation set that quality holds.

Cache what has not changed

Two kinds of caching matter. Data caching avoids re-ingesting and re-embedding content that has not changed since the last sync. Response caching avoids regenerating answers to repeated questions over unchanged sources. Both cut usage without touching quality.

Send less context

Retrieval that returns twenty marginal passages costs more, and can answer worse, than retrieval that returns five good ones. Better ranking and tighter retrieval are a quality improvement and a cost improvement at once.

Put limits where usage can spike

Public-facing agents, batch runs over spreadsheets and scheduled jobs are where spend can run away. Per-user rate limits, daily run caps and monthly cost caps, with refusals recorded, keep a surge from becoming a surprise.

Retire what is not used

Consolidating overlapping assistants and switching off unused AI add-ons is often the quickest saving available, and an inventory is what makes it visible.

Keep arithmetic out of the model

Sums, reconciliations and totals belong in a query or code step. That is more accurate and avoids paying a model to do work a database does better.

Showback or chargeback for AI spend?

Showback reports each team's AI spend to that team without moving budget. Chargeback bills it to the team's cost center. Both depend on the same attribution data; the difference is how much trust the numbers have earned.

Start with showback. It surfaces surprises, such as an agent that costs more per run than anyone expected or a department paying for an assistant nobody opens, without starting a budget dispute on day one. Once teams agree the attribution is fair, move the steady, well-understood workloads to chargeback and keep experiments on a central innovation budget, so charging teams for usage does not discourage the trials you want them to run.

How do you tie AI cost to value?

Cost without value is just a number to cut. The useful metric is cost per outcome: per resolved ticket, per processed invoice, per answered question, compared with what that outcome cost before.

Our method for calculating AI ROI uses (annual value − annual cost) ÷ annual cost, with value drawn from recovered time, cost avoidance and revenue lift, and cost counted fully loaded: licenses, build, run and inference, governance and change management. Usage-based model spend sits in the "run" line, which is exactly why it needs attribution: without it, you cannot assign it to the use case whose value it is meant to deliver.

For knowledge work, the largest value line is usually recovered time, the Context Tax of hours lost searching, re-asking and re-creating work. The ROI Calculator puts a number on it from four inputs.

Who owns AI cost management?

Three groups share it. Engineering owns the levers: routing, caching, context size and limits. Finance owns budgets, showback and chargeback. Risk and compliance own the inventory, because unapproved tools are both a cost leak and a data exposure. The AI governance tools that handle policy and audit are increasingly where cost attribution lives too, since both depend on seeing every call.

How SphereIQ handles AI cost management

In SphereIQ, cost is part of the Governance plane rather than a separate report. AI Economics Intelligence™ meters cost per agent, team and workflow, with ROI attribution in the Executive Console, budget alerts and enforcement, and chargeback exports by user, team or department. The audit log records who asked, which model, tokens in and out, and what it cost for every call. In the AI Factory, each step of a flow can use its own model, and evaluations report pass rate, latency and cost for every run. Published agents carry their own limits: runs per visitor per hour, a daily run cap and a monthly cost cap, with every refused run recorded.

Most teams start with the AI Spend Diagnostic: a fixed-scope engagement that inventories every sanctioned and shadow AI tool, attributes what each costs to teams, and ranks the governance gaps. The report is yours even if you stop there.

Frequently asked questions

What is AI cost management?
AI cost management is the discipline of tracking, attributing and controlling an organization's AI spend, including model usage, AI software subscriptions and AI features embedded in existing tools. It assigns each unit of spend to a team, user, agent, use case and model, enforces budgets and limits where calls happen, and compares cost with business outcomes so leaders can decide what to scale or retire.
What is FinOps for AI?
FinOps for AI applies cloud financial management practices to AI workloads. Engineering, finance and business owners share responsibility for visibility, attribution and optimization of AI spend. The difference from cloud FinOps is that AI usage is metered in tokens and driven by behavior, prompts, retrieved context and agent loops, so attribution must be captured on every call rather than inferred from infrastructure.
How do you track LLM costs by team or agent?
Route model calls through a single gateway that knows who is calling and why. Tag each call automatically with the user's identity and cost center, the agent or application and its version, the use case, the model, and a run ID. Store tokens in and out and the resulting cost per call, then roll up by any dimension for showback and chargeback.
How can you reduce LLM costs without hurting quality?
Route each step to a model sized for it and confirm quality with an evaluation set. Cache unchanged data and repeated answers. Retrieve fewer, better passages instead of large contexts. Set rate limits and cost caps where usage can spike, retire unused AI tools, and move arithmetic into code or queries. Measure quality alongside cost so savings never come from worse answers.
How do you measure the ROI of AI spend?
Use ROI = (annual value − annual cost) ÷ annual cost. Value comes from recovered time, cost avoidance and revenue lift; cost must be fully loaded, including licenses, build, run and inference, governance and change management. Attributing model usage to each use case lets you calculate cost per outcome, such as per resolved ticket, and compare it with the baseline.

Find out where your AI spend actually goes.

The AI Spend Diagnostic is a fixed-scope week that inventories every sanctioned and shadow AI tool, attributes what each costs to teams, and ranks the governance gaps. The report is yours either way.