Skip to content

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

Select AI API provider to configure

In the case of Google Gemini, it looks like this:

Google Gemini configuration screen in 4AI

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
  1. Go to https://aistudio.google.com
  2. Log-in with your Google account, or create an account if you don't have one
  3. Click the Get an API key big blue button
  4. The next screen is the API keys management page. Click the Create an API key button
  5. An API key made of random characters is displayed
  6. Copy the displayed API key
  7. Go to the 4AI Configuration | API providers page and select Google under API provider to configure
  8. 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
  1. Visit OpenAI platform at https://platform.openai.com/
  2. Create an account if you don't have one already
  3. Log-in and click on your avatar in the top-right corner of the page
  4. In the menu that opens, select View API keys
  5. Click on Create new API key and follow the instructions
  6. Copy the displayed API key
  7. 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
  8. Go to the 4AI Configuration | API providers page and select OpenAI under API provider to configure
  9. 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.