Skip to content

Cost and FinOpsGuide

AI feature unit economics: cost per user and gross margin

SaaS margins were built on software that costs almost nothing to run per extra user. AI features break that: every use has a provider bill. Here is how to measure cost per user, why the average lies, and which levers actually move the margin.

By INFRO Editorial

Published

6 min read

Amber glass columns on a dark ground, most short and a few very tall, representing the skew of AI cost across a customer base

In short

An AI feature's unit economics come down to cost per use times uses per customer, compared with what that customer pays. Average cost per user is usually small, but usage is skewed, so a few heavy users and any agent-style feature can cost more than their subscription. Measure cost per end customer from day one, price with an included allowance and a limit, and use model tier, output length, caching and batch processing to move cost per use.

Key takeaways

  • Cost per customer is cost per use times uses per customer; measure both, per end customer, from the first release.
  • Averages hide the problem. A small group of heavy users can cost more than their subscription while the average looks healthy.
  • Agent features multiply cost per use by the number of steps, so they need a per-task budget and usually a usage-based price.
  • The levers are model tier, output length, caching, batch processing for background work, and a limit per plan.
  • Price changes from providers move your margin without a deploy; review unit economics whenever a rate changes.

What does an AI feature cost per user? Multiply the provider cost of one use by the number of uses each customer makes in a month. For most features the average comes out small. The trouble is that AI usage is skewed: a few heavy users, and any feature that runs an agent, can cost more than their subscription while the average still looks fine. This guide sets out the formula, a worked example of the skew, and the levers that move the margin.

Why AI features change SaaS margins

Classic SaaS gross margins rest on software whose cost per extra user is close to zero: the hundredth customer barely moves the hosting bill. An AI feature does not work that way. Every use sends tokens to a model provider, and the provider bills for every one of them. The cost of revenue now scales with how much customers use the product, not just how many customers there are.

That has three consequences:

  1. Cost depends on behaviour you do not control. The same plan can cost you a few cents for one customer and many dollars for another.
  2. Cost can change without a deploy. When a provider changes a rate, your margin changes. Google's pricing page already lists Gemini 3.8 Flash doubling from $0.75 and $3.75 to $1.50 and $7.50 per million tokens on 1 January 20271.
  3. New feature types multiply cost per use. An agent that runs twenty model calls to finish a task costs twenty times what a single answer does.

The formula

AI unit economics per customer, per month
cost_per_use      = Σ over calls (input_tokens × input_rate
                                  + cached_tokens × cached_rate
                                  + output_tokens × output_rate)
ai_cost_customer  = cost_per_use × uses_per_month
ai_margin         = revenue_customer − ai_cost_customer − other_cost_of_revenue

Two notes on the inputs:

  • Use the rate you actually pay. If your company has a negotiated rate with a provider, a list-rate figure is wrong on every request by the size of your discount.
  • Count all the calls behind one use. A "use" of a retrieval-augmented answer can include an embedding call, a rerank call and the answer itself. A use of an agent includes every step.

A worked example of the skew

The example is invented, but its shape is the normal one: a long tail of light users and a small group that uses the feature as a core workflow. A dashboard that shows only the average will report a healthy feature right up to the month a few accounts start automating against it.

Agent features: cost per task, not cost per call

Agent-style features — research assistants, coding agents, workflow automations — run many calls per task, and each call re-sends a growing context. The unit worth measuring is the cost of a finished task.

Two consequences for pricing. Agent features usually need a usage-based component so revenue grows with cost, and every task needs a ceiling: a step limit, a token limit and a spend limit, so one stuck loop cannot cost what a hundred normal tasks do. Bounding AI agent loops covers the limits.

The levers, in order of effect

LeverWhat it changesTypical trade-off
Model tierRate per token, often by 10x or more between tiersQuality on harder requests
Output lengthOutput tokens, usually the most expensive meterAnswer completeness
Prompt cachingInput cost of long, repeated prefixesCache writes cost more than plain input on some models
Batch processingHalf the rate on OpenAI, Anthropic and GeminiResults arrive later
Routing by difficultySends easy requests to a small modelNeeds a classifier or rules, and evaluation
Limits per planCaps the cost of the heaviest customersSome customers hit a wall

The rates behind the table are on each provider's page: Batch is half the standard rate on OpenAI's text models, on Anthropic's Batch API and on Gemini's Batch tier231. Background work — summarising yesterday's tickets, tagging documents, generating reports — is the first thing to move.

Output length deserves more attention than it gets. On most current models output costs five times input per token, so an assistant that answers in 300 tokens instead of 900 has cut most of its per-use cost without touching the model. Measure cost per successful task when you change a lever: a smaller model that needs two attempts is not a saving.

Pricing patterns that protect margin

  1. Included allowance plus a limit. Each plan includes a monthly amount of AI use sized so the plan's heaviest normal customer stays profitable; beyond it the feature slows, stops, or asks for an upgrade. This keeps pricing simple and caps the tail.
  2. Allowance plus usage price. The same allowance, with metered usage above it at a price that covers provider cost plus your margin. This suits agent features and API products. Metering AI usage for usage-based billing covers the plumbing.
  3. Separate AI add-on. A paid add-on with its own allowance keeps the base plan's margin intact and makes AI cost visible as its own line in revenue.

Whichever you choose, the allowance should be stated in a unit customers understand (answers, tasks, documents, minutes of audio), not in tokens, and converted to provider cost internally.

Measuring it in practice

You cannot manage a per-customer margin you do not measure. Three things make the numbers reliable:

  • Tag every request with an opaque customer id. Send it with the request so cost can be summed per customer later. Anthropic's metadata.user_id and OpenAI's safety_identifier take an opaque id for abuse detection; for your own accounting you need the same id recorded beside the cost.
  • Record cost at the time of the request, at the rate in force then, so last quarter's margin does not change when a rate does.
  • Report percentiles. Median, 90th, 99th and maximum cost per customer per plan, every month. The 99th percentile is where pricing decisions are made.

Then check the total against the provider's invoice once a month. A per-customer figure is always an estimate, because provider cost APIs report organization totals; the total is what reconciles.

Measuring per-customer cost with INFRO

INFRO records each request your application sends with the end-customer id you pass in metadata.user_id or the X-INFRO-User-Id header, and an estimated provider cost at the vendor's list rate or, from the Team plan, your negotiated rate. The console's Customers page lists your most expensive end customers with cost per request and the change against the previous period, on every plan. From the Team plan you can cap what each end customer may spend per day, week or month, refused before the provider is called, and export usage per end customer, project and model to load into your own billing system. INFRO bills you a subscription; it never bills your customers and adds nothing to the provider's rate.

Summary

Work out cost per use for each AI feature, multiply by real usage per customer, and look at the distribution rather than the average. Put a ceiling on every agent task and every plan, move background work to batch rates, keep answers as short as they can usefully be, and review the numbers whenever a provider changes a price.

Questions readers ask

How do I calculate the AI cost per user?
Record the provider cost of every request with the id of the customer it served, then sum per customer per month. Cost per request is input tokens times the input rate plus output tokens times the output rate, adjusted for cached tokens. Report the distribution, not just the average, because a few heavy users usually carry most of the cost.
What gross margin should an AI feature have?
There is no single right number; it depends on your pricing and the rest of your cost of revenue. What matters is that you know the margin per plan and per heavy customer, and that a limit or a usage price stops any customer from costing more than they pay.
Should AI features be priced per seat or per use?
Features whose cost per use is small and whose use is bounded fit inside a seat price with an included allowance. Features whose cost per use is large or unbounded, such as agents that run many steps, usually need a usage-based component so revenue grows with cost.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

  • Spend attribution

    Available with a plan

    Group cost by model, project, key, or an end-user id you attach to the request.

    Read the documentation for Spend attribution
  • End-customer spend caps

    Available with a plan

    One spend cap for every end customer of your product, per organization or per project, with overrides your backend sets through the management API. A refused request returns a 402 with the time the cap resets, for your app to show its user. Caps from the Team plan; the per-customer cost view on every plan.

    Read the documentation for End-customer spend caps
  • Usage per end customer, for billing

    Available with a plan

    Requests, tokens and estimated provider cost for each end customer, by day or month, project and model, as a CSV from the console or JSON from the API — for you to bill your own users from in your billing system. From the Team plan.

  • Usage and cost per request

    Available with a plan

    Every request records its model, latency, token or unit counts, and estimated provider cost, queryable by project and key.

    Read the documentation for Usage and cost per request
  • Negotiated provider rates

    Available with a plan

    Enter the rates your contracts actually carry, per model and optionally per provider, so estimated cost uses them before the vendor's list rate. Included from the Team plan.

    Read the documentation for Negotiated provider rates

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Gemini Developer API pricing (opens in a new tab) — Google. Accessed Oct 20, 2026.
  2. 2.Pricing (opens in a new tab) — OpenAI. Accessed Oct 20, 2026.
  3. 3.Pricing (opens in a new tab) — Anthropic. Accessed Oct 20, 2026.

About this article

The formulas are standard unit-economics arithmetic. Model rates come from OpenAI's, Anthropic's and Google's pricing pages, opened on 2026-10-20. Every customer base and usage figure is an invented, labelled example, not data from any company. Written by the team that builds INFRO.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.