How to add AI to an app, or integrate ChatGPT into one

By Glassly · 7 November 2026 · 5 min read

How to add AI to an app, or integrate ChatGPT into it: the safe way to hold the API key, what it costs, the store rules, and the one-sentence way on Glassly.

Build your own app with Glassly: $2.99 (£1.99 in the UK), paid once, is usually enough for your app, sign-in and database setup included.

Build my app
A laptop, a phone and a small succulent on a white desk, seen from above
Photograph via Unsplash

There are two ways to add AI to an app: call an AI provider such as OpenAI from a server you run, or use AI built into the platform the app is made on. In an app made with Glassly, adding AI is one sentence in the app’s chat, such as “add a helper that answers questions in my app”, and the app gets Glassly AI with no key to handle. Here is each way, with what it needs.

Adding AI to a Glassly app

  1. Open the app and say what the AI should do, for example “add a helper that answers questions in my app” or “let people photograph a receipt and fill in the total”.
  2. The change turns Glassly AI on for the app, and the chat says so, with a link to the app’s AI settings.
  3. Try it in the live preview. Your own tries there are free each day, up to a daily amount.
  4. In the AI settings, choose how much each person can use a day and the app’s monthly budget.
  5. The copy on your own phone follows the change; testers and the stores get it with your next build.

It works the same in any app made with Glassly, templates included. You pay from your credits as people use it.

What AI can add

  • Writes: Chats, answers, plans and quizzes, in each person’s language. Ask, for example: “Add a chat with a cooking assistant who suggests recipes.”
  • Reads photos: Receipts, labels, handwriting and what’s in the picture. Ask, for example: “Let people photograph a receipt and fill in the shop, the date and the total.”
  • Draws: Pictures from a sentence, or a change to someone’s photo. Ask, for example: “Add a sticker maker that draws a sticker from a sentence.”

Integrating ChatGPT into an app yourself

ChatGPT is OpenAI’s own app; what goes into yours is one of OpenAI’s models, through its API. Doing it safely takes three parts.

  • A server of your own that holds the API key. OpenAI’s documentation says not to expose a key in client-side code such as browsers or apps, because anyone who copies it out can spend your money.
  • Rules on that server that check who is asking and cap how much each person can use. The provider charges by the token, and there is no ceiling unless you set one.
  • The screens in the app: the chat, a way to stop an answer, a way to report one, and a note that the answers come from AI.

How to make an AI app like ChatGPT without an API key explains the key problem in more detail.

Your own AI provider in a Glassly app

Glassly AI is built in. If you would rather use another AI provider, add it as an integration once you are signed in, then ask in chat to use it. That provider bills you directly, and Glassly charges nothing for the AI it runs.

What it costs

Every 25 credits you buy comes with free Glassly AI for your apps: 140 replies and 5 pictures. Your apps use it before credits. A photo read counts as one reply. After that, one credit covers about 48 replies, 33 photo reads or 1 picture. Adding AI is a change in chat, priced by the work like any other.

The store rules

  • Apple’s guideline 5.1.2(i): say clearly when personal data will be shared with a third party, third-party AI included, and get explicit permission first.
  • Apple’s guideline 1.2: AI content creation apps need a filter for objectionable material, a way to report, a way to block abusive users and published contact details.
  • Google Play: apps that generate content with AI must let people report or flag offensive content without leaving the app.

Glassly AI adds the Report button, the note that answers are written by AI, and blocking from the app’s AI page. Your contact details and the permission screen are yours to add: ask for the screen in chat. The rules were read on Apple’s and Google’s pages on 7 November 2026.

How to make an AI app without coding covers starting a new AI app from an idea.

Quick answers

How do I add AI to my app?
In an app made with Glassly, ask for it in the app’s chat, for example “add a helper that answers questions in my app”, and Glassly AI is turned on with no key to set up. In an app built elsewhere, call an AI provider from a server you run, which holds the key and caps how much each person uses.
Can you integrate ChatGPT into an app?
Yes, through OpenAI’s API: the app talks to a server you run, and the server calls OpenAI with your key, which never goes in the app itself. In a Glassly app you can add OpenAI as an integration and ask in chat to use it, or use the built-in Glassly AI with no key at all.
How much does it cost to add AI to an app?
Adding it is a change in chat, priced by the work like any other. Every 25 credits you buy comes with free Glassly AI for your apps: 140 replies and 5 pictures. After that, one credit covers about 48 replies, 33 photo reads or 1 picture.
Can I add AI to a template app?
Yes. Templates come without AI, and any of them can have it: ask in the app’s chat for what the AI should do, and the change turns Glassly AI on.