Skip to content

AI services

Add a feature that sends a request to OpenAI, Anthropic, or Google Gemini and shows the written answer, such as a summary, a suggestion, or a reply. Your app calls the service with your own key.

Who pays

Every AI call that your app makes is billed to the provider account that the key belongs to.

Connect a key

Each service needs one API key:

Service The key starts with Where to create it
OpenAI sk- The OpenAI dashboard, under API keys. A project key works.
Anthropic sk-ant- The Anthropic Console, under API keys.
Google Gemini AQ. or AIza Google AI Studio, under API keys.

A project owner connects the key:

  1. Open Project Settings › Connections.
  2. Turn on the switch for OpenAI, Anthropic, or Google Gemini. The Connect service dialog opens.
  3. Paste your key into API key.
  4. Click Connect.

The service checks the key before FlutterFlow saves it, and FlutterFlow never shows the key again.

Model and response length

Your app’s AI calls use the model and the response length that the agent sets when it adds the feature, and people who use your app can’t change them. Only people who are signed in to your app can use an AI feature.

If your request names neither, the app uses a default model and a default response length, which these docs don’t list. So name both in your request:

  • Model: each call’s cost depends on the model. To see the models that your provider lists for your key, ask the agent to list them, and then name one.
  • Response length: the longest answer that each call pays for. When an answer reaches it, the service stops, even in the middle of a sentence. Some models think before they answer and count that thinking toward the length, so give them a longer response length.

What to ask

To ask for an AI feature, tell the agent what the feature does, which service and model it uses, and how long its answers can be. Replace [model name] with a model from your list:

Example request

“Which models can my connected OpenAI key use?”

Example request

“On each transaction, add a Suggest a category button that asks Google Gemini for a category based on the payee and the amount. Use [model name], and keep each answer to a few words.”

Example request

“Add a monthly summary to the budget screen that asks Anthropic to describe my spending in about 150 words. Use [model name].”

Agent questions

If the service isn’t connected, the agent shows a Connect ask above the message box, with a button such as Connect OpenAI. A project owner connects the service through that ask; anyone else is asked to get an owner to connect it. For more information, see Connect a service.

Review

After the agent finishes, read the turn’s Summary and review its Changes. Check the affected screens in Screens, and try the change in Preview. If the change uses records or sign-in, test it with the thread’s own data in Data.

After you push a backend change, check the result in Backend.

Try the feature in the preview a few times and read the answers. If an answer stops early, ask the agent for a longer response length.

Push

After you test the feature, push the changes to your app.

Next steps

Troubleshooting

  • The service refuses your key: see A service refuses your key.
  • Answers stop in the middle of a sentence: the response length is too short for the model. Ask the agent for a longer response length.
  • A call fails without any answer: a model that thinks first can use up the response length before it writes anything. Ask the agent for a longer response length.
  • A call takes too long and fails: the service answers sooner with a shorter response length. Ask the agent for a shorter one, and try again.
  • Calls fail because of rate limits or credit: check your account’s limits and balance with the provider, and try again later. FlutterFlow also limits how often one connection can be called each minute, so wait a minute and try again.
  • Your app shows a message about the service: see Messages shown in your app.