Skip to main content
Guide · AI & LLM

Cost of Adding AI Features to a Mobile App: What It Costs to Run, Per User

What an AI feature costs to run once it ships: the cost components, a per-user formula with a worked example built from OpenAI, Anthropic and Google prices read on October 27, 2026, five ways to cut the bill, and how to stop abuse from inflating it.

Afaq Zahir, author

Afaq Zahir

Flutter mobile product engineer

Published Updated 12 min read

On this page
  1. What does it cost to run an AI feature in a mobile app?
  2. How do you calculate the cost per user?
  3. What does a typical request cost on each model?
  4. How much does an AI feature cost compared with what a user pays?
  5. How do you reduce the running cost?
  6. How do you stop users from running up the bill?
  7. When should you not add an AI feature?
  8. What a developer should give you before you commit to the feature
  9. Frequently Asked Questions

Quick answer

An AI feature in a mobile app costs per request: input tokens times the input price, plus output tokens times the output price, multiplied by requests per user. On official prices read on October 27, 2026, an example request with 1,000 input and 500 output tokens costs $0.00035 on small models and $0.014 on Claude Opus 5.5, or $0.10 to $4.20 per active user per month at 300 requests. Model choice, output length, caching and per-user limits control the bill.

Key takeaways

  • Running cost is per request, not one-off: the example request costs $0.00035 on Claude Haiku 5.5 or gpt-6-luna and $0.014 on Claude Opus 5.5, a 40x spread, using prices read from each vendor's pricing page on October 27, 2026.
  • Output tokens drive the bill: on Claude Sonnet 5.5, whose page lists $2 per million input and $10 per million output tokens, output is 71% of the example request's cost.
  • Chat is stateless, so history is resent: Anthropic's documentation says you always send the full conversational history, which makes input grow with every turn.
  • Caching, shorter answers and batching are documented levers: Anthropic bills cache reads at 0.1x the input price on most models and its Batch API gives a 50% discount, while OpenAI says cached input is discounted up to 95%.
  • Users can run up your bill: OWASP lists unbounded consumption, including Denial of Wallet, as a top LLM risk, and recommends rate limits, user quotas and monitoring.

Adding an AI feature to a mobile app means paying for every request a user makes, for as long as the feature exists. A chatbot, a summary button or a recommendation list is built once, but it is billed by usage, so the cost that surprises founders is the running cost, not the build cost. This guide shows how to estimate it per user, with a worked example built from the official OpenAI, Anthropic and Google pricing pages, then covers the five levers that lower the bill and the limits that stop abuse from raising it. I am a freelance Flutter developer, so I sell AI integration work; where the honest advice is to use a smaller model, run the task on the device or skip the feature, I say so. Prices were read on October 27, 2026 and change often.

What does it cost to run an AI feature in a mobile app?

Running cost is the sum of every request, and each request is billed by tokens: pieces of text the model reads (input) and writes (output). The build cost, which I cover in my Flutter app cost guide, is paid once. The running cost is paid monthly and grows with your users. The table lists what feeds it.

Cost componentWhat drives itWhat to check
Input tokensSystem prompt, user message and conversation historyAnthropic's documentation says the Messages API is stateless and you always send the full conversational history (Anthropic), so every turn re-sends earlier turns
Output tokensLength of the answerPriced higher than input on every model in the table below, for example $10 against $2 per million tokens on Claude Sonnet 5.5
Model tierSmall, mid or flagship modelThe three pricing pages list per-model prices; the spread in the table below is 40x
CachingHow much of the prompt repeats between requestsCached input is billed at a lower rate (see the caching section)
Images and audioMedia input and outputPriced separately; Google's page lists Gemini 2.5 Flash at $0.30 per million tokens for text, image and video input and $1.00 for audio input (Google)
Backend proxyThe server that holds your API key and calls the modelBilled by your cloud provider; I have not priced it here. See the secure proxy guide
Rate limiting and abuse controlPer-user quotas, input limits, monitoringOWASP recommends rate limiting, user quotas and monitoring (OWASP)
Monitoring and supportLogging usage, handling bad answers, updating promptsDeveloper time rather than token fees; I have not priced it here

How do you calculate the cost per user?

Cost per request equals input tokens times the input price, plus output tokens times the output price, each divided by one million. Multiply by requests per user per month, then by the number of users who use the feature. Three inputs decide the answer: average input tokens, average output tokens and requests per active user. Estimates are only as good as those three numbers, so measure them on a prototype.

cost_per_request = (input_tokens x input_price + output_tokens x output_price) / 1,000,000
cost_per_user_month = cost_per_request x requests_per_user_month
monthly_bill = cost_per_user_month x monthly_active_users x share_who_use_the_AI_feature

To measure real token counts, Anthropic offers a token counting endpoint that is free to use but subject to rate limits, and its counts are an estimate that can differ by a small amount from billing (Anthropic). The same page warns that Claude 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text, and tells you to recount prompts against the model you plan to use. Token counts are not portable between models.

What does a typical request cost on each model?

The example below uses my assumptions, not measured data: each request has 1,000 input tokens (system prompt, history and the new message) and 500 output tokens, and an active user sends 10 requests a day, or 300 a month. Prices are the standard-tier text prices from each vendor's pricing page on October 27, 2026, with model names exactly as listed. The right-hand column assumes 10,000 monthly active users with 20% using the feature, which is 600,000 requests.

Model (as listed)Input / output per 1M tokensPer requestPer active user per month (300 requests)600,000 requests per month
Claude Haiku 5.5 (prompts up to 100,000 tokens)$0.10 / $0.50$0.00035$0.10$210
gpt-6-luna$0.10 / $0.50$0.00035$0.10$210
Gemini 3.5 Flash-Lite$0.30 / $2.50$0.00155$0.46$930
gpt-6.1-terra$1.00 / $5.00$0.0035$1.05$2,100
Claude Sonnet 5.5$2 / $10$0.007$2.10$4,200
gpt-6.1-sol$2.00 / $10.00$0.007$2.10$4,200
Gemini 3.1 Pro Preview (up to 200k tokens)$2.00 / $12.00$0.008$2.40$4,800
Claude Opus 5.5$4 / $20$0.014$4.20$8,400

Sources: OpenAI, Anthropic and Google pricing pages, read October 27, 2026. The arithmetic is mine. This is a price comparison, not a quality comparison: a small model that fails the task costs more than a larger model that gets it right.

Three things stand out. The spread from the cheapest to the most expensive row is 40x for the same request. Output is the largest share of the bill: on Claude Sonnet 5.5, 500 output tokens cost $0.005 of the $0.007 total, which is 71%. And prices move. Anthropic's page notes that Claude Sonnet 5's $2 and $10 pricing, announced as introductory through August 31, 2026, is now the standard price. Google's page shows price changes scheduled for some models, with dates. Treat every number here as dated, and re-read the pages before you commit a budget.

How much does an AI feature cost compared with what a user pays?

Compare cost per active user with revenue per user. RevenueCat's analysis of AI in subscription apps uses an example of $6.00 monthly revenue per user and notes that a $0.18 AI cost is about 3% of revenue, while on $3.50 revenue a $0.60 AI cost is about 17%, which it calls a structural margin problem (RevenueCat). Using the same $6.00 figure, the $2.10 per active user from the table above would be 35% of revenue, and $0.10 would be under 2%.

The same article makes a point worth copying: treat AI usage like paid media spend. It recommends tracking cost per monthly active user, per AI-active user and per paying user, and defining before launch the expected lift, the projected cost per user and the usage level at which gross margin becomes unacceptable. Its calculation inputs are not consistent about the price per token, so I use only its ratios and recommendations here. A feature that costs money but does not move conversion or retention is a cost, not an investment.

How do you reduce the running cost?

Five levers, in the order I would try them. Each one is tied to a source, and the savings in my examples are arithmetic on the table above, not benchmarks.

1. Shorten the output

Because output tokens cost more than input tokens, capping answer length saves the most per token. RevenueCat recommends capping response length and avoiding unnecessary explanation (RevenueCat). In the example, halving the output from 500 to 250 tokens on Claude Sonnet 5.5 lowers the request from $0.007 to $0.0045, which is 36% less. Ask for the format you need in the prompt, and set a maximum output token limit in the API call.

2. Cache the repeated part of the prompt

A system prompt and instructions repeat on every request, and caching bills that repeated prefix at a lower rate. Anthropic lists cache reads at 0.1x the base input price for most models, 0.05x for Claude Opus 5.5 and Claude Sonnet 5.5, with a 5-minute cache write costing 1.25x the base input price (Anthropic). OpenAI says prompt caching is enabled by default for supported models, requires the entire rendered prefix to match, has a 1,024-token minimum on GPT-5.6 and later, and discounts cached input up to 95% (OpenAI). In the example, if 800 of the 1,000 input tokens are a cached prefix on Claude Sonnet 5.5, the request falls from $0.007 to about $0.0055, 22% less, before counting the one-time cache write. Caching helps most when the system prompt is long and requests are frequent. Put the stable text first and the changing text last.

3. Use a smaller model, or route by task

The table shows a 40x spread between rows. RevenueCat's advice is to use the cheapest model that does the job and reserve premium models for complex reasoning (RevenueCat). Test your own prompts on a small model first. If it fails on some kinds of task, route only those tasks to a larger one.

4. Batch work that is not urgent

Anthropic's Batch API gives a 50% discount on input and output tokens for asynchronous requests, and its page says batch and caching discounts can be combined (Anthropic). Google's page states a Batch API with a 50% reduction (Google), and OpenAI lists separate Batch prices, which for the models I checked are half the standard rate (OpenAI). Batching suits overnight jobs such as summarising the day's content, not a chat reply a user is waiting for. On Claude Sonnet 5.5 the example request would cost $0.0035 instead of $0.007.

5. Move simple tasks on-device, and limit the rest per user

Text recognition, classification and some small language tasks can run on the phone with no per-token fee. My Fluently AI case study describes an app that scans text on-device with Google ML Kit and sends pronunciation recordings to the Whisper API, a split between work done on the phone and work sent to an API. The trade-offs, including device and model limits, are in my on-device AI guide. For what stays in the cloud, RevenueCat recommends limiting free-tier AI use, reserving advanced features for paid tiers, setting daily or monthly caps and replacing open-ended free trials with a one-time credit allowance.

How do you stop users from running up the bill?

Put a server between the app and the model, and enforce limits there. OWASP's LLM10:2025 entry, Unbounded Consumption, describes applications that allow "excessive and uncontrolled inferences", leading to denial of service and economic losses. It names a variant called Denial of Wallet: "By initiating a high volume of operations, attackers exploit the cost-per-use model of cloud-based AI services." Its listed mitigations include rate limiting and user quotas, input validation to keep inputs within size limits, continuous monitoring and logging, timeouts and throttling, and graceful degradation (OWASP). The page gives no numeric limits, so you must choose your own.

In a mobile app, that means:

  • Never ship the API key in the app. A key inside the binary lets anyone spend your money. The architecture is in my secure proxy guide.
  • Add a daily or monthly quota per signed-in user, checked on the server before each model call.
  • Limit the size of each input so one request cannot send a huge document.
  • Log tokens per request. Anthropic's responses include a usage object with input and output token counts (Anthropic), which makes cost per user measurable.

If you use Firebase AI Logic, read its quotas page. It describes a default rate limit of 100 requests per minute per user, which the page says is "set quite high by default" to suit any app, and it states there is no way to set the limit for a specific user or group (Firebase). A limit that high protects availability, not your budget, so add your own per-user quota. The same page shows a banner saying Firebase App Check enforcement will be required to use Firebase AI Logic from November 2, 2026, so check the current requirements before launch.

My Nest AI case study shows this pattern: AI requests never go straight from the app to OpenAI. A Firebase Cloud Functions proxy sanitises each prompt first, and the OpenAI API key lives only on the server. The case study covers privacy and latency, not cost, so I make no cost claim about that app.

When should you not add an AI feature?

Skip it, or delay it, in four cases:

  • You cannot say what it should change. A feature with no target for conversion, retention or time saved is a recurring cost with no measured return.
  • Revenue per user is low and usage is open-ended. The margin examples above show how fast cost per user grows against a small subscription.
  • A rule or a lookup would do. If a fixed rule solves the task, it costs nothing per request.
  • You have not built a limit yet. Do not launch an open endpoint to the public before the quotas are in place.

If you started from a chat with an assistant, my guide on turning an AI-written app plan into a real MVP covers how to check the plan, and the LLM integration guide covers how to build the feature once the numbers work.

What a developer should give you before you commit to the feature

Ask for a one-page cost estimate with four lines: the model and its listed price on a named date, the assumed tokens per request, the assumed requests per user per month, and the resulting cost per active user. Ask what limit stops one user from spending more than you planned, and how usage is logged. If a quote for AI work has no running-cost estimate, ask for one. My pricing is a fixed quote after a scoping call, so ask any developer, me included, to agree these numbers before the build starts; how I work is on my hire page.

Frequently Asked Questions

How much does it cost to add AI features to a mobile app?

There are two costs. The build is a one-off and depends on scope; I do not quote build figures here, and my Flutter app cost guide covers price ranges by app type. The running cost is per request: on prices read October 27, 2026, an example request with 1,000 input and 500 output tokens costs between $0.00035 and $0.014, depending on the model (Anthropic, OpenAI, Google).

How much does a chatbot cost per user per month?

Multiply cost per request by requests per user per month. At 300 requests a month and the example request size, the table above gives $0.10 on the smallest models and $4.20 on Claude Opus 5.5. Your real figure depends on prompt length, answer length and how often users chat, so measure a prototype before you budget.

Which is cheaper, OpenAI, Claude or Gemini?

None is cheaper in general. In the table, Claude Haiku 5.5 and gpt-6-luna are listed at the same $0.10 input and $0.50 output per million tokens, with Gemini 3.5 Flash-Lite at $0.30 and $2.50. The pages also list older, cheaper rows, such as gpt-5-nano at $0.05 and $0.40 (OpenAI). Quality, speed and limits differ, and prices change, so test your own task on two or three models and compare cost per correct answer.

Does prompt caching really save money?

It does when a long prefix repeats. Anthropic bills cache reads at 0.1x the base input price on most models, and OpenAI says cached input is discounted up to 95% (Anthropic, OpenAI). It saves nothing on the output tokens, and my 22% example assumes 800 of 1,000 input tokens are a cached prefix.

Can users run up my AI bill?

Yes, if the endpoint is open. OWASP describes Denial of Wallet, where attackers use high volumes of operations to exploit pay-per-use pricing, and recommends rate limits, user quotas, input limits and monitoring (OWASP). Keep the API key on a server and enforce a per-user quota there, as in the proxy guide.

Is on-device AI free to run?

It has no per-token API fee, but it is not free. You pay in development time, model size and the limits of the phone, and some tasks need a cloud model. My on-device AI guide compares the options.

Should I hire a developer or use a no-code tool for an AI feature?

A no-code tool can suit a prototype. If the feature needs your own server-side limits, a secure key, streaming replies or store release, a developer is the safer route. My pricing is a fixed quote after a scoping call; see my hire page.

Planning an AI feature and want the running cost estimated before you build it? See my Flutter AI and LLM integration service or get in touch with your idea and expected usage.

Afaq Zahir

Written by

Afaq Zahir

Flutter mobile product engineer with 4+ years shipping 20+ apps to the App Store and Google Play. Led Flutter teams at Metasense and Apptex.

GitHub ↗LinkedIn ↗Last reviewed
Book a call