FlutterFlow now offers a native integration with Google Gemini AI — and the best part? You don’t need to write any API code to use it!
In this blog, I’ll walk you through how to use Gemini directly inside FlutterFlow to generate AI-powered text, analyze images, and more — all using built-in actions.
What is Gemini?
Gemini is Google’s advanced AI model that can understand and generate human-like text, summarize content, analyze images, and even chat intelligently.
With FlutterFlow’s Gemini integration, you can:
- Create smart chat features
- Summarize or rewrite text
- Generate image captions
- And more — with just a few clicks
Step-by-Step: Set Up Gemini in FlutterFlow
1. Get Your Gemini API Key
To use Gemini, you need a key from Google:
- Go to Google AI Studio
- Sign in with your Google account
- Create a new API key and copy it
2. Enable Gemini in FlutterFlow
- Open your project in FlutterFlow
- Go to Settings → Integrations
- Find Gemini, toggle it ON
- Paste your API key
That’s it! Gemini is now ready to use.
3. Add Gemini Actions to Your App
You can now use Gemini as a built-in action on any widget (like a Button):
- Select your widget (e.g. a Button)
- Go to the Actions tab → + Add Action
- Choose Gemini under Integrations
You’ll see 3 Gemini actions:
- Generate Text – Use this to get AI-generated responses
- Count Tokens – Useful if you want to measure text length
- Text from Image – Send an image and get a description
4. Configure the Prompt
For Generate Text, you’ll need to provide a prompt (this is what Gemini will respond to). Example: Give me 3 fun facts about space.
You can make this dynamic by using a TextField input as the prompt.
Then, choose an Output Variable — this will hold Gemini’s response.
5. Display the AI Response
Once the action runs, use the Output Variable to show the result in a Text widget.