Gemini Connection
Send prompts to Google's Gemini models and receive AI-generated responses in your flows.
Setup
- Go to aistudio.google.com
- Create an API key
- In Fainflow: Connections → + New Connection → Gemini (Google)
- Paste your API key and click Save
Action: Send Prompt to Gemini
| Input | Type | Description |
|---|---|---|
| model | string | Model name (default gemini-1.5-flash, also gemini-1.5-pro, gemini-2.0-flash) |
| instructions | string | System instruction (optional) |
| input | string | User message |
| Output | Type | Description |
|---|---|---|
| responseText | string | AI response |
| usage | json | Token usage metadata (promptTokenCount, candidatesTokenCount, totalTokenCount) |
Example
- Add Telegram Update event
- Add Send Prompt to Gemini action
- Drag message from event → input
- Set instructions to "You are a helpful assistant"
- Add Send Message action
- Drag responseText → text
Your bot now replies with Gemini-generated responses.
Choosing a model
| Model | When to use |
|---|---|
gemini-1.5-flash | Fast & cheap. Default. Good for chat, short summaries |
gemini-1.5-pro | Higher quality, slower. Long context (up to 2M tokens) |
gemini-2.0-flash | Latest, multimodal capabilities |
See Google's model overview for the full list.
Pricing
Gemini's free tier covers 15 requests/min and 1M tokens/day on gemini-1.5-flash — enough for prototyping. For production usage, see Gemini API pricing.