Skip to main content
Your app can use AI with no setup. Base44’s built-in integrations generate text and create images without an API key, and use your integration credits. Connect any AI provider with an API, such as OpenAI or Anthropic, when you want a model that isn’t one of the built-in models, or you want your provider to bill you for the AI usage.

What you can do

Bring your own AI provider’s models into your app.

Write and summarize

Draft replies, write descriptions, or summarize long text in your app.

Answer questions

Add an assistant that answers questions about your app’s content.

Sort and extract

Tag records, sort messages by topic, or pull key details out of text.

Create images

Generate images with your provider’s image models.
Example prompts Describe the feature and your provider in the AI chat, and ask it to use your own API key. For example:

Getting your API key

You need an API key from your AI provider. You create it in your provider’s developer portal, and your provider bills you for your app’s AI usage. Most providers need a payment method or prepaid credits before the key works.
Treat your API key like a password. Never paste it into public code, screenshots, or messages to other people.
To create a key, follow your provider’s own guide, such as the OpenAI quickstart or Anthropic’s get started guide. Copy the key when you create it, since some providers only show it once.

Connecting your provider

You connect your provider by asking the AI chat to build a feature that uses it. The AI chat asks you for the key and saves it as a secret, then writes a backend function that calls your provider. The key never appears in your app’s code. To connect your AI provider:
  1. Go to your app editor.
  2. Ask the AI chat to build the feature with your provider and your own API key. For example:
  3. When the AI chat shows Set secrets, paste your key into its field, such as OPENAI_API_KEY, then click Submit Secrets.
    The AI chat's Set secrets card with the OPENAI_API_KEY field outlined and the Submit Secrets button

    Adding your key when the AI chat asks for it

    Don’t have your key yet? Click Skip, and the AI chat builds the rest without it and tells you what won’t work until you add it. When you have your key, add it on your app’s Secrets page with the name the AI chat asked for, such as OPENAI_API_KEY, then ask the AI chat to test the feature before you publish your app.
  4. When the AI chat finishes building the feature, try it in your app’s preview. Then publish your app so your live app gets it too.

FAQs

Any AI provider with an API, such as OpenAI or Anthropic. Name the provider in your request. If the AI chat needs more details, such as a link to the provider’s API documentation, it asks you for them.
Enter your key in the AI chat’s Set secrets card when it asks for it.If the AI chat didn’t ask for your key, or you want to change it later, add it on your app’s Secrets page under the name the AI chat used, such as OPENAI_API_KEY. If the feature isn’t finished yet, tell the AI chat your key is saved so it can finish building it. See Managing app secrets.If your app is already published, publish it again so your live app uses the key.
A little. Your provider bills you for the AI requests themselves. Each time your app calls your provider, it runs a backend function, and 100 runs use about 1 integration credit.
Your AI feature stops working until you add more credits or update your billing settings with the provider.
Yes. Ask the AI chat to switch to the new provider. It asks you for the new key, and you may need to update your prompts so they work with the new provider’s models.
Set a monthly budget or usage limit in your provider’s billing settings, and check your usage in your provider’s dashboard. Each provider’s cost controls work a little differently, so check their help docs.For testing, try shorter prompts or smaller requests.
Make your prompt more specific. Include clear instructions, important context, and examples of what you want, and say what not to include. You can also try a different model if your provider offers one that’s more focused on accuracy.If the problem continues, paste your prompt and the response into the AI chat and ask it to help you troubleshoot step by step.
Yes. Add a key for each provider, and tell the AI chat which provider to use for each feature.