AI in Mobile Apps: On Device vs API Tradeoffs
On device AI runs the model on the phone, with zero network round trips and full privacy. API AI runs the model in the cloud, with more capability but real cost and latency. The right call depends on the feature, the device, and the user expectation. In 2026 the line is moving toward on device faster than most teams expect, but not for every workload.
Written by Yashveer Singh, founder of Yashveer Labs.
What you actually need to know
- On device wins on privacy, latency, and cost for small to medium tasks.
- API wins on capability, recency of model, and consistency across devices.
- The right architecture is a hybrid that picks the path at runtime based on the feature and the device.
- App binary size and battery drain are real costs of on device that founders underestimate.
- In my experience, the strongest 2026 mobile apps run a hybrid by default.
| Workload | On device | API |
|---|---|---|
| Speech recognition | Yes, mature | Yes, slightly more accurate |
| Image classification | Yes, fast | Overkill |
| Short text summarization | Yes, capable | Yes, slightly better quality |
| Long context reasoning | Limited | Required |
| Image generation | Possible on flagship devices | Higher quality, more reliable |
| Multimodal understanding | Limited | Required for now |
The core argument
For five years the default assumption in AI mobile features was that the model lives in the cloud and the phone is the client. The 2025 generation of on device models changed that. Apple Intelligence and Google's on device Gemini both run capable language models locally. iPhones from a few generations back can summarize a long email without a network call. The line that defined which features needed an API is moving.
The architectural implication is that the question is no longer "should we use AI in our mobile app." The question is "where should the AI run for each feature." That is a real decision that shapes cost, privacy, performance, and the user experience.
The answer is usually a hybrid. Workloads where speed and privacy matter most run on device. Workloads where capability and recency matter most run through API. The product code chooses the path at runtime based on the feature, the device, and sometimes the user's settings.
I have shipped both sides on client projects. The on device side wins on speed and customer trust. The API side wins on the cases where you really need the most capable model. The teams that pick a side and never revisit the decision miss the wins they could have had on the other side. The teams that build a clean abstraction can move features between paths as the models and devices evolve.
When on device is the right call
The workload runs frequently enough that API cost would add up. The latency matters to user perception. The data is sensitive and the user notices. The model needed for the task fits in your binary size budget. The target devices are recent enough to run the model with acceptable battery cost.
Specific examples that work well on device today. Live transcription of voice notes. Summarization of selected text. Classification of images for search and tagging. Smart suggestions for short replies. Spelling and grammar refinement. Each of these is a workload where the user runs the feature many times per session, expects fast response, and would not love their data going to a third party.
When API is the right call
The workload is rare enough that cost is manageable. The model needed for the task is too large for on device. The output quality is the dominant constraint. The user is willing to wait a second or two for the response.
Examples that still belong in the cloud. Long context reasoning over hundreds of pages. Image generation at high quality. Complex multi step agentic workflows. Anything where the user types one query and expects the best possible answer, not the fastest.
What it actually costs
| Architecture | Engineering effort | Cost at 100k MAU |
|---|---|---|
| API only, one provider | One to two weeks per feature | 5k to 30k dollars per month depending on usage |
| API only, multi provider | Two to four weeks per feature | Same as above, plus failover engineering |
| On device only | Two to six weeks per feature | App size grows, infrastructure cost near zero |
| Hybrid with runtime selection | Three to eight weeks per feature | Lower than API only, more engineering |
The hybrid path costs more engineering but pays back through lower API spend and better user experience on most workloads. The exact breakeven depends on usage volume.
Features to demand from the architecture
- A clear abstraction at the application layer so the same feature can run either path.
- Runtime detection of device capability. New iPhones get on device, older devices and Android variants get API.
- A way to override the path per user. Privacy conscious users can pin everything to on device.
- Telemetry that separates on device usage from API usage. You need to know which path is doing the work.
- A fallback path when on device is not available. Never tell the user the feature is unsupported when an API path exists.
- A cost dashboard for the API side, broken down by feature.
Expert opinion
The apps that win on AI in 2026 are not the apps with the biggest API bill. They are the apps that picked the right path for each feature. Most users do not care which model is running. They care that the feature feels fast and respects their data.
>
Yashveer Singh, founder of Yashveer Labs
How this plays out in practice
On a client iOS app I shipped last year, the transcription feature ran on device. The summarization of long documents ran through API. Users opened the app dozens of times a day, ran transcription almost every session, and summarization only occasionally. The on device path absorbed ninety percent of the AI workload. The API bill was small. The privacy story was strong. The team did not have to choose between cost and capability.
The opposite story is a competitor app that put every AI feature through API. Their bill at fifty thousand active users was over fifteen thousand dollars a month. Their transcription latency was over two seconds. Privacy conscious users complained. They eventually rebuilt the architecture to support on device, which took more effort than building it that way from the start would have.
For more on the broader mobile architecture decisions, see Flutter vs React Native vs Native in 2026 and Apple Intelligence and Android AI building for the new platforms. For the API cost side, the cost of running LLMs in production covers the economics.
Common mistakes teams make
- Assuming all users have the latest flagship device.
- Picking one path and never revisiting the choice as models and devices evolve.
- Underestimating app binary size growth from on device model weights.
- Underestimating API cost growth when usage scales.
- Building features without telemetry to track which path is running. The team cannot tune what it cannot see.
- Ignoring battery drain from on device inference. Users will notice and complain.
Where to start, a 30 day plan
- Week one. Inventory every AI feature in your app. Tag each as "frequent and small," "rare and large," or "in between."
- Week two. Design the abstraction that lets a feature run either path. Wire the runtime device check.
- Week three. Pick one frequent and small feature. Implement on device. Ship behind a flag.
- Week four. Measure. Latency, battery, customer feedback. Adjust the architecture before adding more features.
For deeper reading, the privacy and data boundary problem in AI integrations covers the legal frame, and AI customer risk covers the segment of users that will actively prefer on device.
Frequently asked
Why this is the work I do
The work in this article is not theoretical for me. It is what I shipped last quarter, last month, and this week. Yashveer Singh, founder of Yashveer Labs. I do not write about things I have not done. I do not pretend to expertise I do not have. If the topic here is the topic you are dealing with, I am the person who has dealt with it. Multiple times. Recently.
Posts that line up with this one.
- Cross Platform and Mobile Development
Apple Intelligence and Android AI: Building for the New Platforms
The two largest mobile platforms now ship local AI as part of the operating system. The opportunity for app developers is real, the constraints are real, and the patterns are still settling. Here is the working version for 2026.
- Cross Platform and Mobile Development
Should You Build for iOS or Android First as a Startup?
The platform you build first will shape your early users, revenue, and product feedback. Choose deliberately.
- Cross Platform and Mobile Development
Deep Linking: A Mobile Engineering Primer
Deep links are how the rest of the world reaches into your mobile app. Done right, they make every email, push, and shared URL land where the user expected. Done wrong, they break in ways the team does not notice until customers complain.
- Cross Platform and Mobile Development
Subscription Apps on iOS: StoreKit 2 in Practice
StoreKit 2 is Apple's modern subscription API and it changes how iOS apps handle purchases, renewals, and entitlements. Here is what actually matters.