concept

Cost attribution

Cost attribution is the FinOps discipline of tracking LLM spend per-user, per-feature, per-tenant, per-model — the foundation for unit economics, abuse detection, and pricing decisions in 2026 AI products.

LLM bills can spike unpredictably: one prompt-injected agent burns $1K in an hour, one viral feature 10×s the bill. Cost attribution tags every LLM call with metadata (user_id, tenant_id, feature, model, session) so the platform can answer: which features cost the most, which users are unprofitable, which tenants need rate-limiting, which models give the best $-per-quality. Implementations: Langfuse / Helicone / Braintrust capture cost metadata; custom proxies (LiteLLM, Portkey, OpenRouter) inject tags; OpenTelemetry attributes. Standard reports: cost per active user, cost per feature, cost by model, top-N spenders, week-over-week deltas. Without cost attribution, AI features hit unit-economics walls when scale arrives.

When to use cost attribution

Common mistakes

FAQ

What is cost attribution?

Cost attribution is the FinOps discipline of tracking LLM spend per-user, per-feature, per-tenant, per-model — the foundation for unit economics, abuse detection, and pricing decisions in 2026 AI products.

When should I use cost attribution?

Any AI product with non-trivial LLM spend. Multi-tenant SaaS — needed for accurate billing.

What are the most common mistakes with cost attribution?

Aggregating at the API key level only — misses per-feature breakdowns. Skipping output token attribution — output dominates cost on Claude / GPT-4-tier models.

Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/cost-attribution.md.