Anthropic
Add a feature that sends a request to an Anthropic model and shows the written answer, such as a summary, a suggestion, or a reply. You need an API key from the Anthropic Console.
Connect a key
To connect Anthropic, you must be a project owner. Create an API key in the Anthropic Console under API keys. The key starts with sk-ant-.
- Open Project Settings › Connections.
- Turn on the switch for Anthropic. The Connect Anthropic dialog opens.
- If the dialog lists keys from your other apps, choose one. FlutterFlow connects it, and you’re done.
- If you don’t choose a listed key, click Paste an API key when the dialog shows it. Then paste your key into API key, and click Connect. To open the Anthropic Console’s API keys page, click Find it beside the label.
Anthropic checks the key before FlutterFlow saves it, and FlutterFlow never shows the key again.
Cost and model
Every AI call that your app makes is billed to the provider account that the key belongs to.
Your app’s AI calls use the model and the response length that the feature is built with, and people who use your app can’t change them. Name both in your request:
- Model: each call’s cost depends on the model. To see the models that you can name, ask the agent to list them, and then pick 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.
What to ask
To ask for an Anthropic feature, tell the agent what the feature does, that it uses Anthropic, which model it uses, and how long its answers can be. Replace [model name] with one of the models that the agent lists:
Which models can my connected Anthropic key use?
Add a monthly summary to the budget screen that asks Anthropic to describe my spending in about 150 words. Use [model name].
On each transaction, add a Suggest a note button that asks Anthropic for a short note based on the payee and the amount. Use [model name], and keep each answer to one sentence.
Agent questions
If Anthropic isn’t connected, the agent asks above the message box, with a Connect Anthropic button that opens the same dialog, and Not now. If you aren’t a project owner, ask one to connect Anthropic. 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
- To replace the key or disconnect Anthropic, see Manage connections.
- To see every service that you can connect and its call limits, see Available services.
Troubleshooting
- Anthropic refuses your key: see A service refuses your key.
- The dialog says that your key looks like an OpenAI or OpenRouter key: Anthropic keys start with
sk-ant-. Connect that key as OpenAI or OpenRouter instead, or create an Anthropic key. - Calls stop working after you delete or rotate the key: create a new key in the Anthropic Console, and then replace the key.
- Answers stop in the middle of a sentence: the response length is too short for the answer. Ask the agent for a longer response length, or ask in the prompt for a shorter answer, for example in fewer words. A longer response length takes longer, and a call that runs past the time limit fails.
- Anthropic declines a prompt: change the prompt, then try again.
- A call takes too long and fails: Anthropic answers sooner with a shorter response length. Ask the agent for a shorter one, and try again.
- Calls fail because of rate limits: FlutterFlow 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.