Implementation Guide

    Visibility into LLM Spend Across Teams and Providers

    LLM spend visibility depends on attributing each request to an identity, model, token count, pricing basis and application context. Provider invoices rarely carry all of these consistently, so platform teams capture request-level usage at a single point of enforcement and reconcile it against billing data. Dashboards present the result, but attribution quality is set where the data is captured.

    Where each data point can be captured reliably

    1. 1

      Calling application or SDK

      Knows application context and often the user, but depends on every team instrumenting correctly.

    2. 2

      Network or proxy layer

      Sees all routed traffic and responses, but identity must be passed in or inferred.

    3. 3

      Execution path enforcement point

      Sees the authenticated caller, the request, the response and tool calls together.

    4. 4

      Provider response

      Authoritative for model served and token counts as the provider counts them.

    5. 5

      Internal pricing reference

      Holds rates and units by provider, model and effective date.

    1. Can it attach a consistent identity (user, team, application, agent) to every request across all providers?
    2. Does it capture model, token counts and pricing basis per request, including streamed responses?
    3. Can it reconcile request-level totals with provider invoices and report the variance?
    4. Can it detect or close usage that bypasses the central path?
    5. Can rate limits, quotas or spending policies be enforced where usage is recorded?
    6. What evidence is retained per interaction, for how long, and can it be deployed in your own cloud?

    Spend visibility is an attribution problem

    Most enterprises can see a total LLM bill per provider. The harder question is who incurred it: which team, application, user or agent, through which model, and for what purpose. Provider invoices and usage exports answer that question only to the extent that identity and tagging were applied consistently at the time of each request. With several providers, many teams, coding assistants and agents, that consistency is rare.

    Five data points make a request attributable. Identity says who or what made the call. Model says which provider and model served it. Token counts record input and output usage. Pricing basis records the unit and rate that convert usage to cost, and it should be stored with the record because rates change. Application or tool context says which system, coding assistant or agent produced the call.

    If any of the five is missing at capture time, it is difficult to reconstruct later. A dashboard built on incomplete records will show tidy charts that cannot be defended when a team disputes its allocation. The design question is therefore where in the architecture each field can be captured reliably.

    Comparing approaches and their limits

    Each common approach captures part of the picture. The gaps below are structural, and they matter more than the feature list of any one tool.

    • Provider dashboards: Fast to start and authoritative for billed amounts. Each provider uses its own grouping, fields and token accounting, so cross-provider comparison needs normalization, and attribution stops at whatever the provider can group by.
    • API key segmentation: One key per team or application gives coarse attribution without code changes. Key counts grow quickly, keys get shared or copied, and a key identifies a workload rather than a person or agent.
    • Tagging conventions: Metadata on requests carries application and team context where providers accept it. It relies on every caller applying the convention, and untagged calls fall into an unallocated bucket.
    • Proxy-layer capture: Centralizes request and response records for traffic routed through it. Coverage is limited to routed traffic, identity must be propagated to it, and streamed responses need explicit handling.
    • Execution-path capture: Records usage where policy is enforced, with identity, model and tool context per interaction. It still covers only traffic that passes through it, so bypass routes must be closed or detected.

    Reconciling invoices with request-level records

    Treat the two data sets as having different jobs. The provider invoice is authoritative for what was billed. Request-level records are authoritative for who caused the usage. Reconciliation allocates the billed amount using the request-level evidence, and surfaces the difference as a measured variance rather than hiding it.

    A workable routine joins records by provider, model and time window, then compares summed token counts against provider usage reports. Normalize units first, because providers can count tokens differently and price input and output separately. Store the pricing basis used for each record, so a rate change does not rewrite history.

    Streaming responses need a defined rule. If the stream returns final usage figures, capture them. If it does not, or the stream is interrupted, record an estimate and mark it as an estimate. Unmarked estimates erode trust in the whole data set.

    Shadow usage is the remaining gap. Calls made with personal keys, unapproved tools or direct provider access do not appear in central records, but they may appear on an invoice. Spend on the invoice that has no matching request-level records is a useful signal. Review it by key or project, and bring that traffic into the central path or block it.

    Why attribution needs one point of enforcement and identity

    Attribution is only as consistent as the point that produces it. If five teams capture usage five ways, the resulting records are not comparable. A single enforcement point in the request path applies one identity model and one record format to every provider behind it.

    The same point is where controls belong. NIST guidance on API protection describes cost amplification, where a small expenditure by a requester triggers much larger spending by the system. It recommends mitigating this through a combination of rate limiting, quotas and spending policy controls, alongside application or business flow changes. Those controls act on request flow, so they work best where requests are recorded. NIST's work on agent identity similarly expects monitoring of agentic access, with agent-specific metrics, thresholds and policies.

    Trussed enforces policy in the execution path across models, agents, tools, MCP servers and coding assistants. It can allow, redact, block, rate limit or escalate individual interactions and tool calls, and it generates audit-ready evidence from that enforcement. It runs self-managed in the customer cloud, with configurable retention and data residency. In production it applies one policy plane across 100+ models. It is not a billing or finance tool. Its role here is to provide the per-interaction identity and evidence that attribution depends on, and the rate limits that apply at the same point.

    Fields needed to attribute one LLM request

    Identity

    User, team, application or agent that made the request.

    Model

    Provider and model actually served.

    Token counts

    Input and output usage, including streamed responses.

    Pricing basis

    The unit and rate used to turn usage into cost.

    Context

    Application, tool or coding assistant behind the call.

    Establish attributable usage data at the point of enforcement

    Talk through your provider mix, identity model and retention needs with a Trussed expert.

    Talk to an Expert