Lead · 8 chapters
Unit economics
Cost per task, user and tenant; gross margin; pricing models; the margin trap of flat-rate pricing over variable-cost inference
Skipping this turns technical adoption into accidental subsidy when a few high-usage customers consume more inference cost than their contracts recover.
Read these first
What you will know
Calculate cost per task and per tenant
Separating GPU, provider, storage, support, and shared-platform costs prevents a low apparent unit cost from hiding subsidized tenants.
Model gross margin for a feature at scale
Volume discounts, utilization, failure and retry rates, and fixed-cost allocation can reverse the margin conclusion.
Run a sensitivity analysis showing when flat-rate pricing loses money under variable inference cost
Long prompts, retries, tool calls, and low cache hit rates can make a small cohort consume the contribution margin.
Recommend a pricing model with the reasoning
Usage limits, overages, tiers, or committed capacity each shift billing complexity, predictability, and exposure to expensive workloads.
Identify the customer whose usage destroys the margin
The dangerous account is often not the largest logo but the workflow with unbounded automation or unusually expensive context.
Chapters
- 1
Retrieved context and system prompt, not the question, set input cost
In a RAG product the user's question is a few dozen tokens while the request is a few thousand: system prompt, tool definitions, few-shot examples and the retrieved passages wrapped around it. Input cost therefore tracks retrieval breadth and prompt design, both of which are your choices, rather than what users type. Counting tokens by component is where any credible per-task cost figure begins.
- 2
Each turn resends the transcript, and caching needs an identical prefix
An eight-turn session averaging 12,000 tokens of context costs far more than eight single turns, because every turn resends what came before and input grows quadratically with conversation length. Prompt caching is the obvious remedy and fails quietly whenever anything at the top of the prompt varies: a timestamp, a user name, a reordered tool list. Cache hit rate belongs on the cost dashboard next to token counts.
- 3
Model spend is one line item, not the cost per task
$0.31 per session in model spend becomes a unit cost only once you add abandoned and failed sessions, retries, embedding and vector storage, the human review or annotation the feature relies on, and the support contacts it generates. Attribution matters as much: shared platform cost split evenly across tenants conceals the ones being subsidised. You will build a per-task and per-tenant number that survives a finance review.
- 4
A 70% margin on model spend is a claim about one input
Gross margin at scale moves on quantities absent from request-level arithmetic: volume discounts and committed spend, utilisation of reserved capacity, retry and failure rates, and how fixed platform and support costs are allocated. When a CFO asks for the number, the answer worth giving names which parts are metered, which are estimated, and which would reverse the conclusion if they were wrong by a factor of two.
- 5
The median seat is not the seat that costs you money
A median model cost of $2.10 per seat against a $29 price looks comfortable until you read the rest of the distribution: $14 at p95, $61 at p99, $340 at the maximum. Flat pricing over variable inference cost is a bet that this tail stays small, so run the sensitivity: how far must the tail grow, or context lengthen, before that cohort consumes the contribution margin?
- 6
Automation, not headcount, creates the account that breaks you
The dangerous customer is rarely the largest logo. It is the mid-sized account that wired your API into a nightly batch job, or the workflow that pastes a 200-page document into every request, because human usage has a natural ceiling and automated usage does not. Finding them means ranking tenants by cost per seat and per contract dollar, then inspecting request shape rather than revenue.
- 7
Tiers with an included allowance price the tail without scaring buyers
Pure usage pricing tracks cost faithfully and produces bills enterprise buyers cannot forecast; pure flat pricing forecasts beautifully and is structurally unsafe under a heavy tail. Tiers with a generous allowance plus priced overage sit between the two, and committed capacity fits when throughput can be bought in advance. Every option relocates billing complexity, revenue predictability and exposure, and your recommendation has to say where.
- 8
A 60% provider price cut changes what you build, not just the margin
Banking the saving is the smallest available response. A cut that size moves the frontier: features previously rejected on cost become viable, a stronger model may now fit the budget where a distilled one was chosen, and every competitor received the same discount, so it buys no durable advantage. What it does not fix is a flat price that a heavy usage tail can still exceed.
External resources
- Claude Platform Pricingplatform.claude.com
The real per-token inputs to any cost-per-task model, including cache and batch rates
- AI Unit Economics: Pricing & Margins for AI Servicesdigitalapplied.com
This is a substantive, hands-on explainer covering inference COGS, gross-margin mechanics, caching and routing levers, pricing-model stress tests, and the risks of flat-rate pricing over variable usage.
- Pricing AI Features: The Unit Economics Framework Engineering Teams Skiptianpan.co
Cost per task to gross margin, and why flat-rate pricing over inference bleeds
- How "GPT Wrappers" Earn Millions: It’s the Business Model, Not the AI ModelProf Tavakol
Pricing models that survive variable inference cost, with real product examples
- Calculating the Cost and ROI of Generative AI | Amazon Web ServicesAmazon Web Services
Builds a per-user and per-tenant cost model you can copy into a spreadsheet