API providers configuration
The API providers configuration page lets you enter the secret key required to access your preferred AI API provider service.
4AI currently can work with:
Google Gemini
(makers of, well, Google)OpenAI
(makers of ChatGPT)
Use multiple providers
4AI lets you select which provider (and model) to use for each operation, so you don't have to limit yourself to one single provider. Get access to both and select the one that works best for you in each use case.
Using the configuration page
Start by selecting the provider you want to configure, then enter your secret key
in the dedicate input field
In the case of Google Gemini, it looks like this:
Please read on to learn how to obtain an API key for the supported API providers.
Costs
-
Google Gemini is a paid-for product (pricing here), but it has a generous free-tier: you can make (as of February 2025)
1500 requests per day
for free. This should cover the use of most websites, even when using it heavily.However, there's always a catch: when using the free tier, all data that you send can be used to train Google's models. Only paying users can opt-out of having their data used.
-
OpenAI API access is a fully paid-for product, see OpenAI pricing. The cost is low, but you'll need to provide them with a credit card before you can use their API.
Getting a Google Gemini API key
You won't need a credit card to start using the Google Gemini API. You will need a Google account. That can be any Gmail
account for instance, or your Google Workspace account.
Steps to obtain a Google Gemini API key
- Go to https://aistudio.google.com
- Log-in with your Google account, or create an account if you don't have one
- Click the
Get an API key
big blue button - The next screen is the
API keys
management page. Click theCreate an API key
button - An API key made of random characters is displayed
- Copy the displayed API key
- Go to the 4AI
Configuration | API providers
page and selectGoogle
underAPI provider to configure
- Paste the API key into the
Secret key
input field
That's all you need. If you forget your key, you can come back to that same screen later and view the key again. You can also delete the key, for instance if you mistakenly made it public.
Google Workspace users
If you are a Google Workspace user, access to Google AI Studio must be enabled, either just for you or for your entire organization. This is done in the Google Admin console.
Go to Apps | Additional services
, select AI Studio
and set it to ON
.
Getting an OpenAI API key
4AI uses the OpenAI API. It does not use ChatGPT itself which is not open to external access.
Therefore, you do NOT need a paid ChatGPT plan
to use 4AI.
You will need a valid credit card, and provide its details into your OpenAI account to be able to use the OpenAI API.
Steps to obtain an OpenAI API key
- Visit OpenAI platform at https://platform.openai.com/
- Create an account if you don't have one already
- Log-in and click on your avatar in the top-right corner of the page
- In the menu that opens, select
View API keys
- Click on
Create new API key
and follow the instructions - Copy the displayed API key
- Using the corresponding button on the Billing menu, purchase a number of credits. Start small: $10 should cover several weeks of regular usage at least, although your mileage will vary of course
- Go to the 4AI
Configuration | API providers
page and selectOpenAI
underAPI provider to configure
- Paste the API key into the
Secret key
input field
From March 8, 2024, OpenAI requires that you not only provide them with a credit card but also that you purchase credits in advance. Please read their "What is prepaid billing" help page to learn how credits work.