Everything is better when powered by ChatGPT
In Margin Call, a film based on the 2008 financial crisis, Jeremy Irons plays a ruthless CEO.
One of his best lines in the entire movie was about how to get rich:
If you’re looking to integrate an OpenAI model into your Android, iOS or Web-based app, you have two options:
- do it with Zapier (easier), or
- try your hand at a bit of coding (trickier, but with some advantages)
Before we show you how both of these steps work, let’s address some common misconceptions about ‘using ChatGPT in your app’ – and why it doesn’t quite work that way.
Can you use ChatGPT in an app and is it free?
Until recently, the answer to both questions would have been a simple ‘no’.
Today, it’s a bit less straightforward – we asked ChatGPT to answer as an American Idol judge and got this:
To be clear, people saying integrate ‘ChatGPT’ often mean ‘an OpenAI model’ without realizing it.
There are a few OpenAI models and ChatGPT is an example of an app built with one, specifically GPT 3.5.
GPT 3.5 specializes in natural language production and surface-level domain expertise.
Other models like Whisper and the now deprecated Codex specialize in different areas.
If you’re serious about creating an app powered by an OpenAI model, you need to know:
- your use case
- available OpenAI models
- their specializations, and
- their cost – it’s not prohibitively expensive, but it’s not free
You thought Sam Altman would let you hog his servers so you could generate AI pictures of cats?
ChatGPT is free because it’s great advertising for what is at its core a SaaS product.
SaaS products always give diluted free plans.
But get ready to cough up some moolah for the real deal.
|GPT-4||GPT 3.5 on steroids||up to $0.12 / 1K tokens|
|GPT-3.5||understand and generate natural language/code||$0.002 / 1K tokens|
|GPT-3||understand and generate natural language / code||varies based on specific variation of model|
|DALL·E||generate and edit images||up to $0.020 / image|
|Whisper||convert audio to text||$0.006 / minute|
|Embeddings||Convert text to numerical form||$0.0004 / 1K tokens|
The full list keeps changing, but it always boils down to three types of generative AI models:
- Language models
- Image models, and
- Audio models
All of them have their place – the model you choose should match what you need.
So no, you can’t incorporate the actual ChatGPT in your app but you can integrate GPT 3.5 at the price displayed in the table.
Regardless of the OpenAI model, these are the steps to integrate them:
- Get a unique OpenAI API key by signing up with OpenAI – you even get $5 in free credits
- Construct a prompt and a frontend for users to interact with – include necessary instructions and user-defined context
- Evaluate the response and if it’s not quite right, adjust the prompt until you get accurate and reliable results
Steps 1 and 3 are pretty straightforward.
Step 2 is the tricky one – and there are two ways to do this if you’re someone without extensive technical knowledge.
Like a Buddhist monk, let us first travel down the path of least resistance with Zapier.
Option 1: Integrating OpenAI via Zapier
Zapier is a SaaS that simplifies data transfer between other apps.
It has prebuilt connections with thousands of other platforms so users can set up whatever data flows, triggers, and storage they want with zero coding knowledge.
Since I too have zero coding knowledge, I was the perfect guinea pig.
Upstack Studio’s resident boss-man Adrian
forced encouraged me to try it out.
I understand enough about apps to know I needed a simple tech stack:
- OpenAI was my backend / pseudo-database
- Zapier was my server.
- I needed a frontend – so I chose Google Sheets.
Ten minutes later I had a working app, which you can see here.
Though far from pretty, it’s undeniably an app powered by OpenAI’s Davinci.
My app helps fishkeepers learn about African cichlids – a diverse family of fish from Africa that frequently confuse beginners in our hobby.
In Step 1, users manually fill in a common name of an African cichlid under column A.
I’ve set this to trigger Zapier to send a prompt to OpenAI’s Davinci asking for the scientific name of the fish with that common name:
I also set it so Zapier takes the scientific name returned by OpenAI and enters it into column B:
I then set up another two prompts to be sent whenever a new scientific name is entered:
- Zapier asks Davinci for the natural habitat of the fish and enters it in column D.
- Zapier asks Dalle for an image and enters it in column F.
Pick a suitable app builder (or check out our recommended no-code app builders for non-tech founders) and start zapping away.
As convenient as this is, there are a couple of downsides:
- Supporting a full-fledged app with multiple users will require a paid Zapier plan
- Depending on how complex your data flow is, you might bottleneck performance by relying on pre-built API instead of a custom job
If you’re up for a challenge, consider trying your hand at some minimal coding.
Option 2: Integrating OpenAI via Low Code
We’ll need the same components as before – a frontend, backend, and server to connect them.
The OpenAI model is still the backend but without Zapier, you’ll need to manually connect your OpenAI API key.
For this, we’d recommend Locofy’s guide to create a simple OpenAI copywriting app.
We’ve spoken about Locofy before – it’s one of our favourite AI tools for app development.
Locofy’s guide will:
- Give you a simple premade Figma design (pictured above)
- help turn the design into a working user interface
- guide you through exporting and extending the code with ChatGPT
By the end of it, you should have something that works like this:
Again, it looks far from beautiful, but it’s an OpenAI-powered app, and it works.
What the heck – Option 2 is way too difficult
First off, don’t sweat it – even minimal coding is extremely tricky for a non-tech person.
There’s a reason app developers aren’t too worried about AI taking our jobs.
We often see questions like ‘How to Write Code Using ChatGPT?’ coming from non-tech folks hoping that they can now create complex apps unassisted.
For the most part, AI automates and speeds up tasks you already know how to do.
AI can’t turn non-coders into full-fledged developers any more than it can turn non-medically trained people into qualified nurses.
Upstack Studio’s take on incorporating OpenAI into apps
For non-tech founders, we suggest using Zapier to rapidly and cheaply validate any ideas you have.
Once you sign up with OpenAI and get your API key, head over to the OpenAI Playground where you can easily test out different prompts, models, and generate code with your API key.
Then it’s all a matter of finding an app builder that is part of Zapier’s ecosystem.
From there, it becomes an app project like any other – gather user feedback and iterate accordingly.
Once the idea begins to grow a little too big for prebuilt configurations, it might be time for you to get in touch with a trustworthy web and mobile app developer.
Should you build an app with ChatGPT?
For starters, that heading was a test.
We hope by now you know that it’s not ‘ChatGPT’ but an ‘OpenAI model’!
Now, if ever a trend made us think of Jeff Goldblum’s famous Jurassic Park quote, this is it.
Before you build an AI-powered app, ask yourself if the world really needs it.
Users don’t want a monopoly in the SaaS pool – there’s always room for competition.
But we want options, not clones.
This tweet from founder Jon Yong Fook sums up our frustrations perfectly.
And you know what?
We think it could be because the ones creating all these clone apps are developers – not founders.
These are people who have the technical skill to build a SaaS but lack the imagination and life experience needed to build something meaningful.
That’s where you come in, dear non-tech founders.
We don’t need you to learn how to code yourself – any decent mobile app developer can do that, and with AI tools, they do it twice as fast.
We need you for your ideas, vision, and dedication to solving a worthwhile problem – always have and always will.
Hey there stranger, thanks for reading this all the way to the end. Join our mailing list for resources on developing apps with AI and becoming a well-rounded founder. Get a nifty list of questions to ask app developers when you sign up!
Download this template now so you know exactly what to ask App Development Agencies! Let us know where should we send it through the form below.