features getting-started

LLM Chargeback and Cost Attribution for Engineering Teams

· Updated · 5 min read

LLM chargeback works when each request is tied to a team at the moment it is made. VoidLLM records every proxied request against its key, user, team and org with token counts and an estimated cost, and you can group the totals by team, user, key, model, day or hour and export them as CSV or JSON. It handles attribution and reporting. It does not issue invoices.

ℹCost values are estimates

The cost column is calculated from the per-model prices you configure. It is meant for splitting spend between teams, not for reproducing the provider invoice to the cent. Limits in VoidLLM are in tokens and requests, not currency; see Hard Monthly LLM Budget Caps per Team.

How it works in VoidLLM

1. Model the organization

Attribution follows the key:

CredentialPrefixRolls up to
User keyvl_uk_The user (and their org)
Team keyvl_tk_The team
Service account keyvl_sa_The service account, and its team when the account is bound to one

For a product-line split, create one team per product line, or give each product its own named keys. Bind user keys to a team where you can: usage from a user key that has no team_id appears under an empty team group when you group by team. Name keys after the service or use case (for example search-indexer), because the key is the finest-grained unit in the reports. The usage events also record the service account ID, but the group-by dimensions are org, team, user, key, model, day and hour. See the RBAC docs.

The free Community tier covers 1 organization and 3 teams with unlimited users, which is enough for a small split by key. More teams need Pro or Enterprise; see pricing.

2. Configure prices

models:
  - name: claude-sonnet-4-5       # sent upstream as the model ID
    aliases: [claude-sonnet]
    provider: anthropic
    base_url: https://api.anthropic.com
    api_key: ${ANTHROPIC_KEY}
    pricing:
      input_per_1m: 3.00
      output_per_1m: 15.00
      cached_input_per_1m: 0.30     # price for tokens served from the prompt cache
      cache_write_per_1m: 3.75      # price for tokens written to the prompt cache

The numbers are examples. Use the prices from your contract. If cached_input_per_1m or cache_write_per_1m is not set, those tokens are priced at the normal input rate instead of at zero. A model without any pricing is still tracked in tokens but has no cost estimate. The configuration reference lists all model fields.

3. Read the usage

Each request writes one usage event: key, user, team, org and service account IDs, model, prompt and completion tokens, cached read and cache write tokens, estimated cost, duration, TTFT and tokens per second. Prompts and responses are never stored. See Zero-Knowledge by Architecture.

Query it from the API (org admin required, range of at most 90 days per request):

curl "https://voidllm.example.com/api/v1/orgs/$ORG_ID/usage?from=2026-10-01T00:00:00Z&to=2026-10-31T23:59:59Z&group_by=team" \
  -H "Authorization: Bearer vl_uk_..."

Each row in data has group_key, group_label, total_requests, prompt_tokens, completion_tokens, total_tokens, cached_read_tokens, cache_write_tokens, cost_estimate and avg_duration_ms. Use group_by=key for a per-use-case view or group_by=day for a trend. With group_by=model, rows also include cache_savings, an estimate of what prompt caching saved based on current model prices. The API reference has the endpoint overview.

4. Export for finance

The admin UI Usage page groups by model, team, user, key, day or hour and offers CSV and JSON downloads of the grouped table. The columns are group, name, requests, prompt tokens, cached read tokens, cache write tokens, completion tokens, total tokens, cost and average duration. Open the CSV in a spreadsheet and add the cost-center mapping on your side.

With a Pro or Enterprise license the Cost Reports page adds a cost breakdown by model with cache savings, and a daily cost trend. Only the by-model table can be exported (CSV and JSON).

Example: monthly chargeback

  1. At month end, call the usage API with group_by=team for the first and last day of the month, or use the Usage page with the same grouping.
  2. Export as CSV.
  3. Map each team to a cost center in the spreadsheet, optionally scaling the estimates so the total matches the provider invoice.
  4. Post the charges in your finance system.

Because the group-by dimension can be switched to key, you can break a team’s number down further, for example CI versus interactive use.

Question from financeGroup byWhere
Which team spent how much?teamUsage page, usage API
Which service inside a team?keyUsage page, usage API
Which model drives the cost?modelUsage page, Cost Reports
Is spend trending up?dayUsage page, Cost Reports (view only)
What did one person use?userUsage page

What VoidLLM does not do

Frequently asked questions

How do I implement chargebacks for LLM token consumption across multiple internal engineering teams?

Give each team its own keys, route all traffic through a gateway, and group the recorded usage by team at the end of each period. VoidLLM records tokens and an estimated cost per request against the key, user, team and org. The Usage page and the usage API group by team, and the result can be exported as CSV or JSON for the finance system.

How do you attribute LLM token costs back to individual teams and use cases?

Through the key. Team keys and team-bound service accounts roll up to their team, user keys roll up to their user, and each use case can get its own named key. Group usage by team, user, key or model to see the split.

Finance wants monthly LLM charges split by product line and team. What tooling handles that allocation?

VoidLLM handles the attribution and the export. Model each product line as a team or give each product its own named keys, and export the monthly usage grouped by team or key. It does not create invoices or post to a ledger, so the charge posting itself stays in your finance tooling.

Help me set up LLM cost tracking for my team.

Add your models with per-1M-token prices, create a team and a team key, and send traffic through the proxy with that key. Usage then appears in the admin UI Usage page, grouped by model, team, user, key, day or hour, with an estimated cost column.

Are the cost numbers the same as my provider invoice?

No. They are estimates calculated from the prices you configure per model, including optional prices for cached input and cache writes. They are good for splitting a bill between teams, but the provider invoice remains the source of truth for the total.

Related posts