Connect to Google Gemini
Connect to Google Gemini and use their models for AI-powered apps and automations in Retool.
Google Gemini provides advanced AI models for text, image, audio, and video understanding through the Gemini API. You can create a Google Gemini resource so you can build AI-powered apps and workflows that leverage advanced multimodal processing, long context windows, and Google's AI infrastructure.
What you can do with Google Gemini in Retool
After you create a Google Gemini resource in Retool, you can:
- Generate, summarize, classify, and extract information from text using Gemini's language models.
- Build conversational, multi-turn chat experiences with context-aware responses.
- Analyze images to generate captions, extract entities, or answer questions about visual content.
- Generate images from text descriptions using Gemini's image models.
- Process long documents or large datasets using Gemini's extended context windows.
Supported models
Google Gemini resources require you to bring your own key for authentication. Retool-managed keys aren't available for Google Gemini.
The following models are available with your own API key:
| Model | Resource queries | Agent support |
|---|---|---|
| Gemini 2.0 Flash | ||
| Gemini 2.5 Flash | ||
| Gemini 2.5 Pro | ||
| Gemini 3 Flash (Preview) | ||
| Gemini 3 Pro Image | ||
| Gemini 3.1 Flash Image | ||
| Gemini 3.1 Flash-Lite (Preview) | ||
| Gemini 3.1 Pro (Preview) | ||
| Gemini 3.5 Flash | ||
| Gemini 3.6 Flash | ||
| Gemini 3.8 Flash | ||
| Gemini 4 Argon |
Specify the model ID in your queries. Refer to Google's Gemini documentation for the complete list of available model versions.
To limit which models this resource can query, refer to Restrict available models.
Before you begin
Before creating a Google Gemini resource, you need:
- Retool permissions: Ability to create and manage resources in your Retool organization.
- Google AI API key: An API key from Google AI Studio.
- Enabled Gemini API: The Gemini API enabled in your Google Cloud project.
Create a Google Gemini resource
Create a resource to connect Retool to Google Gemini and configure authentication. Once connected, you can then select it when writing queries to make use of its available models.
Follow these steps to create a Google Gemini resource in Retool.
Create a new resource
Navigate to Resources in the main navigation and click Create new > Resource and search for Google Gemini. Then, click the Google Gemini tile to create a new resource.
Configure connection settings
Specify a name for the resource that identifies it within your organization. Include a description that can provide more context to users about how to use the resource.
Configure authentication
This resource requires you to provide your own API key. Retool-managed keys are not available for Google Gemini.
Google Gemini resources require an API key and a connection mode.
Connection
Choose Direct to connect to Google's default Gemini API endpoint, or Proxy or custom endpoint to route requests through a proxy server or a custom Gemini-compatible endpoint.
Base URL
Available only when Connection is set to Proxy or custom endpoint, and required in that mode. The endpoint Retool sends requests to.
https://your-proxy.example.com