Skip to content
mentoor

Topic 3 of 5 · 4 min read

Inference costs that move under you

Goal: Estimate gross margin per customer from usage and token prices and find the usage pattern that makes it negative.

In an AI product, every use costs money, so gross margin depends on how much each customer uses it, not only on how many customers you have. A plan that is profitable for the average user can lose money on the heaviest ones.

Check yourself · 1 of 3

Why can an AI product lose money on its heaviest users even if the average user is profitable?

Choose one answer

Why it matters

Normal software costs almost nothing to serve one more user. A model call does cost something: providers charge per token, where a token is roughly a short word or word piece, and they charge for input and output separately. Long documents, long chats and agents that make many calls add up. Check each provider's current price page, because prices and model names change often.

How to estimate margin per customer

  1. Count tokens per task. Measure real tasks, not guesses: input (your prompt, the documents, the chat history) and output. Chat history is easy to miss, since it is re-sent on every turn.
  2. Multiply by calls per task. An agent that plans, searches, reads and retries might make 10 to 30 calls for one request.
  3. Price it. Use the provider's price per million tokens for input and for output.
  4. Add the other costs. Search or tool fees, storage, support, payment fees and the human review you promise.
  5. Compare with revenue per customer. Make a table with light, typical and heavy users.

Before and after

Before: "Each answer costs about a cent, and we charge 20 dollars a month. Margin is fine."

After: a table:

User type Tasks per month Cost per task Monthly cost Revenue Margin
Light 40 0.01 0.40 20 positive
Typical 300 0.02 6.00 20 positive
Heavy agent user 4,000 0.15 600 20 very negative

The numbers are an example, but the shape is real. One heavy user with a long agent loop can cost more than many light users earn.

What to do about it

  • Set limits or usage-based pricing for the heavy end. Add spend caps and loop limits in the product.
  • Use a smaller, cheaper model for easy steps and the large model only where needed, and test that quality holds.
  • Cache repeated work and trim the history you re-send.
  • Expect prices to fall over time, but do not build a plan that only works if they do. Cheaper models are also used by your rivals, so savings tend to be competed away.

What goes wrong

  • Pricing on the average. The tail decides your margin.
  • Unbounded agents. A loop that retries forever turns one request into a large bill.
  • Forgetting growth in context. Costs per task rise as chats and documents get longer.

Examples

Finding the negative-margin user

A note-taking tool charges 15 dollars a month. Typical users cost about 4 dollars in model calls. A few users upload hour-long recordings every day and cost about 40 dollars. The founder adds a monthly processing allowance and a paid top-up, and the heavy users stop losing money.

Cheaper model for easy steps

A support tool sorts each ticket with a small model, and only drafts replies with the large model for tickets that need them. The team runs its test set to confirm sorting accuracy did not drop, then cuts model cost per ticket.

Key points

  • Each model call has a cost, so margin depends on usage per customer.
  • Measure real tokens per task, calls per task and the other costs, then compare with revenue.
  • Model light, typical and heavy users separately, because the heavy tail can make margin negative.
  • Agent loops and growing chat history are common sources of surprise cost.
  • Do not rely on future price cuts, since competitors benefit from them too.

Common mistakes

  • Setting price from the average user and ignoring the heaviest ones.
  • Letting agents retry or loop with no spending limit.
  • Forgetting that the whole chat history is re-sent on each turn.
  • Planning around token prices that have not fallen yet.

Check yourself · 2 of 3

Which cost is easy to forget when estimating tokens for a chat feature?

Choose one answer

Check yourself · 3 of 3

A founder plans: "Token prices keep falling, so margin will fix itself." What is the main flaw?

Choose one answer

Practice items, not counted towards your mastery.

Start here