Deep-dive guide
AI Wrapper & LLM Token Margin Stress Test
Executive industry analysis
Software used to have near-zero marginal cost. Once the code was written, serving one more customer cost a few cents of hosting, which is why subscription margins of eighty and ninety percent became the norm and why investors learned to ignore the cost of goods in software. AI products broke that rule. Every request a user makes now triggers a bill from a model provider, and the bill scales with how much the user does, not with what they pay. A customer on a flat twenty-four dollar plan can cost five dollars one month and fifty the next if they discover a workflow that loops the model all day.
This is the central problem of an AI wrapper, a product that adds an interface and workflow on top of someone else's model. Your price is fixed, your cost is variable and your supplier can change its prices or models at any time. The margin that looked healthy in a demo, where one founder tested a handful of requests, can disappear when real users arrive with long documents, large contexts and agents that call the model twenty times to finish one task. The stress test exists to show you how thin that margin is before your invoice arrives.
The domino model follows the money through five stages. First, how much of your token spend goes to users who pay nothing, because a free tier is a marketing budget paid in tokens. Second, how much of revenue the model bill consumes. Third, the gross margin that remains after models and fees. Fourth, whether revenue covers every cost with room to spare. Fifth, profit. A change in one lever, such as agents that retry more often or a longer prompt, moves the first two boxes first and the rest follow, so you can see a margin problem coming a month before it shows in the accounts.
The iceberg shows what a simple model bill hides. Above the waterline sit the model bill for paying users and fixed infrastructure. Below it sit the model bill for free users, tokens burned on retries and agent loops, the moderation, logging and evaluation that every serious product adds, and payment fees. In many AI products the free tier and retries together cost more than the paying users' own usage. Use the simulator to find the price, token count or free-user count at which your margin collapses, then decide whether to cap, cache, route or reprice.
Formula and methodology blueprint
The model works per month. Tokens per user are requests times tokens per request, increased by the retry share. Free users make a quarter of the requests of a paying user. The effective token price is the blended price reduced by the discount on cached tokens. The model bill is tokens in millions times that effective price, with an evaluation overhead on top. Net profit is subscription revenue minus fees, the model bill, overhead and fixed infrastructure.
- Tokens per paying user
- T = requests × tokens per request × (1 + retries)
- The monthly token load one paying user creates, including retries and agent loops.
- Effective token price
- P = blended price × (1 − cache hit × 0.9)
- Cached tokens cost about a tenth, so the hit rate lowers the price you actually pay.
- Model bill
- AI = (paid × T + free × T × 0.25) × P × 1.08
- Paying and free usage priced at the effective rate, plus eight percent for evaluation and logging.
- Net profit
- Net = paid × price − fees − AI − infrastructure
- The monthly result. The breaking point is where this reaches zero.
- Free-tier cost
- F = free × T × 0.25 × P
- What the free users cost in model bills each month without paying anything.
- Gross margin
- GM = (revenue − fees − AI) ÷ revenue
- The share of revenue left after fees and the model bill, before fixed infrastructure.
Cascading elasticity
Tokens per request and the token price multiply directly into the model bill, so they are the most elastic levers: halving either halves the bill. Free users are the next largest factor because they add cost without revenue. Price per user is linear but powerful, since it lifts every paying user at once. Fixed infrastructure acts as a threshold the margin must clear before any profit appears.
Three real-world case studies
Bootstrapped starter
A solo founder's first paying users
A solo founder launches a writing assistant with ninety paying users and six hundred free ones, using a cheap model and short prompts. The numbers are small, hosting is almost free and profit is thin but positive. Load it to see how little room a young product has when a few power users arrive.
Scaling mid-market
A scaled product with smart routing
A product with nine thousand paying users routes most traffic to a cheap model, caches almost half its input and keeps retries low. The model bill is large in absolute terms but a small share of revenue. Load it to see how engineering discipline protects the margin at scale.
Black-swan crisis
A viral agent with a flat price
A product adds an agent that loops the model on every task and a free tier that goes viral. Tokens per request triple, retries explode and the price stays at twelve dollars. Revenue grows while every new user deepens the loss. Load it to see which lever restores the month.
Industry benchmark matrix
| Metric | Danger zone | Industry average | Top 10% elite |
|---|---|---|---|
| AI bill as share of revenue | Above 35% | 15–25% | Below 10% |
| Gross margin after models and fees | Below 50% | 65–75% | Above 80% |
| Share of tokens spent on free users | Above 50% | 20–35% | Below 15% |
| Prompt cache hit rate | Below 10% | 25–40% | Above 60% |
| Retry and agent-loop overhead | Above 40% | 10–20% | Below 8% |
Variables and levers
Paying users
Customers on a paid plan this month.
Lever: Grow paid users only when each one earns more than the model costs them, otherwise growth makes the loss bigger.
Price per user per month
What a paying user is charged each month, after discounts.
Lever: Move to usage-based or tiered pricing so heavy users pay in proportion to the tokens they consume.
Free-tier users
Active users who use the product without paying.
Lever: Cap the free tier by requests, route it to a cheaper model or time-limit it, because free users are the largest hidden cost.
Requests per user per month
How many model calls an active paying user triggers in a month.
Lever: Set fair-use limits per plan and show users their usage, since a small share of heavy users usually drives most of the bill.
Tokens per request
Input plus output tokens for one call, including system prompt and retrieved context.
Lever: Trim prompts, summarise history and retrieve less context, because tokens per request multiplies everything else.
Blended price per million tokens
Average price you pay per million tokens across the models you use.
Lever: Route easy requests to smaller models and reserve the premium model for the hard cases.
Cache hit rate
Share of input tokens served from a cache or a prompt cache at a steep discount.
Lever: Structure prompts so the long static part comes first and can be cached, then measure the hit rate every week.
Retries and agent loops
Extra tokens spent on failed calls, retries, reflection and tool loops.
Lever: Fix the failures that trigger retries and cap agent loops, because every retry is a second bill for the same answer.
Fixed infrastructure and tools
Hosting, vector database, monitoring and the tools around the model.
Lever: Right-size infrastructure to current users, because fixed cost sets how long you survive a bad month.
Payment fee
Percentage kept by your payment provider on subscription revenue.
Lever: Move annual plans to bank transfer or negotiate processor fees once revenue is large enough.
How to use this simulator
- 1Start from the realistic preset or enter your own users, price, tokens and caching rate.
- 2Read the five domino boxes to see whether free users, the model bill or margin turns red first.
- 3Press Find my breaking point to learn which price, token count or user mix pushes profit to zero.
- 4Compare the current plan with the routing and caps plan over 24 months in the Parallel universe tab.
- 5Copy the share link so your team or investors can open the same scenario.
Mistakes to avoid
- Testing margin with a handful of demo requests. Real users send longer inputs and trigger more calls, so measure the average and the heaviest ten percent of users from production data.
- Offering an unlimited plan at a flat price. The users who value unlimited most are usually those who cost the most, which turns your best customers into your largest loss.
- Ignoring the free tier in the unit economics. Free users cost tokens every month and rarely appear next to revenue, so they are the cost most often forgotten.
- Assuming your provider's price will stay put. Prices and model behaviour change, so keep a margin buffer and the ability to switch or route to another model.
Frequently asked questions
Why is margin harder for an AI product than for normal software?
Every request calls a model that you pay for, so cost grows with usage while your price stays flat. Normal software has near-zero cost for one more request.
What is a token?
A token is a piece of text, roughly three quarters of a word in English. Providers bill input and output tokens separately, and this model uses one blended price per million tokens for simplicity.
How does caching lower my cost?
Providers charge much less for tokens they have already processed in a recent request. Putting long, repeated instructions first lets them be cached, which lowers the effective price.
How should I price an AI product?
Include a usage allowance and charge for heavy use, or tier plans by volume. A flat unlimited plan invites the users who cost the most to be the ones who sign up.
Should I drop the free tier?
Not necessarily. Limit it by requests, use a cheaper model for it and measure how many free users convert. A free tier is a marketing cost and should be budgeted like one.
How accurate is this?
It is an educational planning model with stated assumptions, not financial advice. Replace the inputs with your own usage data and your provider's current prices.
This is an educational planning model with stated assumptions. It is not financial, tax or legal advice. Replace the inputs with your own figures and verify important decisions with a qualified professional.