Adding AI to Your App: Keys, Data and Costs
Adding a chatbot or smart search to an existing app has become straightforward at the technical level. A developer can often get a demo working in a day or two. What takes the planning is everything around that demo: who pays when usage grows, where your customers’ data goes, and what happens when the AI is wrong.
Here’s what we’d want a business owner to think through first.
Start with the job
“We should add AI” isn’t a plan. Pick one specific job, and work out how you’ll tell whether it’s working:
- Answering customers’ questions from your own help content
- Summarising long records for staff
- Extracting details from photos or documents
- Drafting replies that a person approves before they go out
Features that help a person work faster are generally safer than features acting alone. They also make a sensible first step.
Never put the key in the app
AI services are accessed with a secret key. If that key sits inside your mobile app, somebody can extract it and spend your money.
The correct setup is simple. The app talks to your own small backend, and only the backend holds the key and talks to the AI provider. That backend is also where you’d:
- Check that the person is a signed-in customer
- Limit how much each person can use
- Stop abuse
- Switch AI providers later without releasing a new app
If your developer proposes shipping the key in the app, even in a “hidden” file, ask them to reconsider.
Costs work differently
Most software costs roughly the same however much a customer uses it. AI is usually charged by how much text or how many images you send and receive, so your costs rise with each use.
Before you launch:
- Estimate cost per active customer based on realistic usage
- Set a hard spending limit with your AI provider
- Limit usage per customer, especially on free plans
- Use a smaller, cheaper model for simple tasks
- Shorten what you send, since long conversation histories add to every request
If you run a subscription business, work out what your heaviest users would cost you. A flat monthly price with unlimited AI is a risky combination.
Your customers’ data
When your app calls an outside AI service, your customers’ words and files go to that company. You need to know:
- What’s sent, and whether you can remove names and other details first
- Whether the provider stores it, for how long, and whether it’s used for training
- Whether your privacy policy says so
- Whether special rules apply. Health, finance, legal and children’s data need extra care, and you should get proper advice.
Apple now requires this to be explicit. Under App Store Guideline 5.1.2(i), apps must clearly disclose when personal data is shared with third parties, including third-party AI, and get explicit permission first. In practice, plan for an in-app permission step. A line in your privacy policy is unlikely to satisfy a reviewer.
Google Play has rules too. Apps that generate content with AI, such as chatbots and image generators, must let users report offensive content from inside the app, and must try to prevent restricted content.
Plan for wrong answers
AI models sometimes state wrong things confidently. That’s manageable if you design for it:
- Limit it to your own content, and show where each answer came from
- Let it say “I don’t know” and pass the question to a person
- Keep a person in charge of anything involving money, health, legal matters or account changes
- Tell people they’re talking to AI
- Test it on awkward questions, including people deliberately trying to trick it
- Save examples of failures, and use them to improve it
Think about what a wrong answer would cost you. A slightly off product suggestion is harmless. A wrong refund promise or medical suggestion is a serious problem.
Questions for your developer
- Where’s the API key stored?
- How do we cap spending per customer and overall?
- What exactly gets sent to the AI provider?
- What happens if the provider is down or slow?
- Can we change provider without releasing a new app?
- How do we measure whether it’s helping?
- What’s the plan for store review?
Start small
A good first release is one feature, for a limited group of customers, with low limits and close attention. You’ll learn what people really ask for, and what it actually costs, before committing to more.
Thinking about what AI could do in your app? Have a read of what SaaS features tend to cost, or tell us what you have in mind. If your app’s already got AI features and they’re misbehaving, we can take a look at those too.