Pattern 21 · Cost & limits

Showing AI cost

AI features have a real cost per use, hidden until the invoice — so buyers hesitate and teams cannot optimise.

By Aleksey StepikinUpdated October 20263 min readLive demo
Live demo · try it

An interactive mock built in plain HTML, CSS and JavaScript. Data is fictional; no model is called.

FitWhen to use it — and when not

Use it when

  • Usage-based or credit-based pricing
  • Expensive runs: long documents, agents, image and video
  • Admin and team-lead views of AI spend

Skip it when

  • Flat-rate consumer plans where cost per message would only create anxiety

AnatomyThe parts of the pattern

  1. EstimateBefore running: rough cost and time.
  2. Model choiceCheaper/faster vs better, with the trade-off.
  3. ActualAfter running: what it really cost.
  4. Budget meterSpend vs budget for the period.
  5. BreakdownBy model, feature, agent, user.

GuidelinesDo & don’t

Do

  • Show the estimate where the decision is made — next to Run.
  • Translate tokens into money or credits.
  • Warn before a run would exceed the budget.

Don’t

  • Make users do token maths.
  • Surprise with a cost far above the estimate without explaining why.
  • Hide spend from the people who approve the budget.

In productionHow it looks in a shipped product

AI usage and billing dashboard: month-to-date spend, forecast, cost per run and breakdown by agent, model and tool
In production — Atlas usage: spend by agent, model and tool, with an end-of-month forecast and cost per run. See the Atlas case

In the wildReal-world examples

OpenAI and Anthropic consolesCursorReplit AgentLovable

Products named for reference only — no affiliation, and the demo above is an original illustration, not a copy of their UI.

For engineersImplementation notes

  • Estimate input tokens exactly (tokenizer) and output tokens from historical p50/p90 per task type.
  • Record usage per request (model, input, output, cached tokens) with user, feature and run ids — breakdowns are just GROUP BY.
  • Enforce budgets server-side; the UI meter is a mirror, not the control.

Cost & limitsRelated patterns

All 26 LLM UX patterns

Building an AI product?

I design and ship AI products end to end — LLM interfaces, agents, RAG, billing — from concept to a live product in weeks, not quarters. Tell me what you are building and get a fixed estimate.

Get an estimateBook a call

Create bold.
Deliver better.

See our workGet in touch