How to Track LLM Costs per User
A capability of the Behest AI Token FinOps platform.
Last updated:
A platform-engineer's guide to per-user, per-team, and per-tenant LLM cost attribution: capture the true cost of every model call as it happens on the request path — not reconstructed from logs after the invoice lands.
The short version
How do I track LLM costs per user?
Track LLM costs per user by metering every model call on the request path, not by scraping logs at month-end. Behest tags each call with user, team, project, and session, rolls it up to cost centers, and exports showback and chargeback, so per-tenant AI costs are accurate as they happen.
Why month-end log-scraping never adds up
The provider invoice bills a key, not a person. So teams try to rebuild per-user cost after the fact — exporting usage logs, joining them to application logs by timestamp, and hoping the sessions line up. They rarely do: retries, shared keys, and batched calls blur the mapping, and the answer arrives weeks after anyone could have acted on it.
The context you need — which user, team, project, and tenant made the call — only exists at the moment the request is made. Behest captures it there, on the request path, so attribution is a fact recorded inline rather than a forensic reconstruction. The number is accurate in real time, and it is early enough to trigger an alert or a budget block before the spend compounds.
Track LLM costs per user in five steps
Each step builds on request-path attribution Behest captures inline — self-serve, in our cloud or yours.
- 1
Tag every model call as it happens
Attribution has to be captured where the call is made, not reconstructed later. Behest meters every request on the path — model, tokens, latency, and cost — and tags it with the user, team, project, and session that triggered it. Because the tag is applied inline, you get per-user cost the moment the call completes, not a best-effort guess pieced together from provider logs weeks later.
- 2
Roll per-call spend up to cost centers
Individual calls are only useful once they aggregate the way finance reports. Map your user, team, and project tags to the cost centers you already budget against, so a single request rolls up into a department, a product line, or a customer. The same per-call truth then answers both an engineer's 'which endpoint is expensive' and a controller's 'which cost center is over.'
- 3
Break out per-tenant cost for multi-tenant SaaS
If you run multi-tenant SaaS, per-user cost is table stakes but per-tenant cost is what protects your margin. Behest attributes spend to each customer tenant, so you can see which accounts are cheap, which are underwater, and which are ready for a usage-based upsell. This is the unit economics platform engineers need to price and defend an AI feature.
- 4
Turn attribution into showback and chargeback exports
Visibility changes behavior once teams see their own number. Export chargeback-ready showback that mirrors how finance already bills shared platform spend, so each team, product, or tenant owns its AI costs. With per-tenant provider keys, the actual model invoice can route to the account that incurred it, removing the internal reconciliation spreadsheet entirely.
- 5
Set alerts and budgets on every unit
Tracking is only half the job — the point is to act before the invoice. Set per-user, per-team, and per-tenant token and dollar budgets that Behest evaluates on the request path, with alerts as a unit approaches its cap and hard enforcement when it crosses. Measurement tells you what happened; budgets stop the overrun while it is still happening.
Size the spend you're about to attribute
Get a quick, directional read on your total AI cost exposure before you break it down by user, team, and tenant.
Run the AI cost exposure calculatorFrequently asked questions
- How do you attribute LLM costs to individual users when the provider invoice is one lump sum?
- The provider invoice is aggregate by design — it bills your account, not your users. Behest recovers the per-user breakdown by metering each call on the request path and tagging it to the user, team, project, and session before it ever reaches the provider. You are not dividing a lump sum after the fact; you are recording the true cost of each call as it happens, then rolling those records up. That is the difference between an estimate and an auditable number.
- Can I track LLM costs per tenant in a multi-tenant application?
- Yes — per-tenant attribution is a first-class dimension, not a workaround. Pass a tenant identifier alongside the user, team, and project tags and Behest rolls spend up per customer, so you can see gross margin by tenant, flag accounts that cost more than they pay, and support usage-based pricing. With per-tenant provider keys, each tenant's model usage can even bill to its own provider account for clean isolation.
- Why not just parse the provider's usage logs or export at month-end?
- Provider logs tell you what a key spent in total, not which of your users, teams, or tenants spent it — that context only exists at the moment your app makes the call. Reconstructing it at month-end means stitching timestamps to sessions after the data you needed is gone, and it is always too late to prevent an overrun. Request-path metering captures the attribution inline and in real time, so the number is both accurate and early enough to act on.
Put a name on every dollar of AI spend
Get a first estimate in minutes, then attribute every model call to a user, team, project, and tenant — with budgets that enforce the number.