noburn.dev
← BlogJoin waitlist
llm cost attributioncost trackingopenaiengineering

How to Track LLM Costs Per Product Feature (Not Just Per API Key)

A single OpenAI API key can fund five different product features with no visibility into which one is driving costs. Here is how to add feature-level attribution without changing your LLM provider.

nb
noburn.dev·2026-06-16

Use a fixed vocabulary for feature. Free-text feature names drift ("summary", "summarize", "thread-summary") and fragment your aggregates. A TypeScript union or an enum forces the names to stay consistent:

Where noburn fits

The tools compared in this article handle observability, routing, or evaluation — all of which operate after the LLM call completes. noburn operates before it. It wraps your existing openai client, estimates the token cost of each call, and blocks it if the calling user or project has exceeded their budget. Nothing in this comparison does that at a self-serve price point.

Per-user metering lets you enforce separate limits per end-customer, and Stripe passthrough lets you bill them for their LLM usage without writing a billing layer yourself. The free tier covers 100 requests per month. Documentation and SDKs are at noburn.dev/docs.