Build a unit-economics model for an AI feature
A step‑by‑step guide for PMs to turn token paths, cache rates and fixed investments into a per‑user price and margin target.

Who this is for: product managers adding a paid AI capability or embedding LLMs into core flows. What you'll have at the end: a repeatable model that ties token paths, cache hit rates, model choices and fixed investments to a per‑user price and margin target.
Step 1 — Measure every token path
Count tokens for every element that hits billing: system messages, prompts, context (few‑shot examples), and model completions. Track both directions. Measure median and tail values, not just averages.
Example fields to capture: transcript tokens, prompt tokens, context tokens, expected summary length in tokens.
Step 2 — Separate marginal call cost from amortized fixed costs
Marginal cost is what each API call consumes: tokens, per‑call overheads, vector reads. Fixed costs are one‑time or infrequent but material: fine‑tunes, embedding index build, storage for vectors, infra licenses. Model them separately and amortize fixed costs over an expected number of customers or months.
Step 3 — Model cache, reuse and fallbacks
Define cache tiers and hit rates. For example: exact match cache, near‑duplicate cache (retrieval + edit), and full generation fallback. For each tier model the cost and latency. A high cache hit rate changes marginal cost dramatically.
Step 4 — Translate cost per call into cost per outcome
Map the unit of billing to the product outcome users care about. A single “summary” may require N calls, embeddings, and retrieval reads. Compute cost_per_outcome = sum(marginal_costs) + amortized_fixed_per_outcome.
Step 5 — Layer pricing
Design pricing layers: free quota to let users learn value, a metered mid tier, and higher SLA or enterprise tiers for heavy use and uptime SLAs. Use quotas and rate limits to protect margins.
Step 6 — Simulate scenarios
Run scenarios that vary: usage distribution (many light users vs few heavy users), cold vs warm requests, and model switching (cheaper model for drafts, larger one for final). Capture p95 outcomes, not only mean.
Step 7 — Set guardrails and monitoring
Put in controls: latency vs cost rules, opt‑outs for expensive ops, automatic downgrades under load, and detailed cost telemetry. Alert on cost per outcome drift.
| Cost type | What to track | How it scales |
|---|---|---|
| Marginal | Tokens per call, vector reads, per‑request infra | Linear with requests; reduced by caching or batching |
| Amortized fixed | Fine‑tune, index build, storage, licensing | Fixed, diluted as users grow |
Track tokens from system messages to completions. Omitting prompt tokens or vector IO hides the true cost.
- Instrument each token source and save distributions.
- Log cache hit reason and latency for each outcome.
- Maintain a separate amortized schedule for fixed investments.
- Simulate at 3 scales: pilot, expected, and 10x unexpected growth.
- Expose cost per outcome to product metrics and billing decisions.
Worked example — paid meeting summary
Goal: set a monthly price per active user that hits 70% gross margin given token paths, cache reuse and fixed investments.
Measured inputs
- Transcript tokens per meeting (median): 12,000 tokens
- Prompt and system messages per summary: 400 tokens
- Expected summary length: 350 tokens
- Embedding chunk size: 1,024 tokens -> 12 chunks, one vector per chunk
- Average repeat summary reuse (exact cache): 10% hit
- Near‑duplicate retrieval hit: 30% of remaining requests
Cost variables (placeholders you must fill)
- P_small = model rate per 1k tokens for cheaper tier
- P_large = model rate per 1k tokens for final, higher‑quality tier
- V_store = vector store $ per GB per month
- V_reads = cost per 1k vector reads
- FT_total = one‑time fine‑tune cost to be amortized across N_customers
Compute marginal cost per summary (symbolic)
- Token cost for full generation: tokens_full = transcript + prompt + summary = 12,000 + 400 + 350 = 12,750 tokens.
- Token cost for retrieval+edit: tokens_rerank = embedding read tokens (negligible from model) + small completion of 600 tokens.
- Marginal_cost_full = (tokens_full / 1,000) * P_large
- Marginal_cost_retrieval = (600 / 1,000) * P_small + (vector reads portion: (expected_vectors_read / 1,000) * V_reads)
- Expected_marginal = cache_hit_rate*0 + retrieval_hit_rate*Marginal_cost_retrieval + fallback_rate*Marginal_cost_full, where fallback_rate = 1 - cache_hit_rate - retrieval_hit_rate.
Amortized fixed per active user
Amortized_fixed_per_month = (FT_total / N_customers_amortized_months) + (vector_index_storage_per_customer * V_store) + infra_baseline_per_customer.
Cost per outcome
Cost_per_summary = Expected_marginal + (Amortized_fixed_per_month / expected_summaries_per_MAU). Use the measured usage distribution to get expected_summaries_per_MAU.
Convert to price with margin target
Required_price_per_summary = Cost_per_summary / (1 - margin_target). For a monthly user price, multiply by expected_summaries_per_MAU and add a base tier fee if desired.
Example threshold tests to run with your numbers: at what cache hit rate does the per‑user monthly price fall below your target price? How many MAUs are needed to amortize FT_total to under X per user?
If you want to model this with a spreadsheet or to explore scale scenarios, export these inputs to a small scenario matrix and test ranges for P_small, P_large, V_store and V_reads. The Capacity planner can help you size fixed investments against expected customer counts.


