Skip to main content
Gemini logo
  • Category: artificial intelligence
  • Auth: NO_AUTH, API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 8
  • Triggers: 0
  • Slug: GEMINI
  • Version: 20261101_00
  • Instant: Supported on the latest version. Support varies by tool.

Frequently Asked Questions

Gemini no-auth toolkit calls use Composio-managed Gemini credentials at execution time, so provider quota is shared across usage on that runtime key. If you see Gemini 429 or RESOURCE_EXHAUSTED errors, reduce concurrency and retry with exponential backoff.Bring-your-own-key or custom-key quota isolation is not currently supported for this Gemini no-auth path. Support for custom Gemini API keys is being worked on.
Gemini no-auth toolkit calls are logged like other toolkit calls and can be tracked in Composio tool logs. Treat Gemini usage as regular toolkit usage based on tool calls.

Tools

Slug: GEMINI_COUNT_TOKENSCounts the number of tokens in text using Gemini tokenization. Useful for estimating costs, checking input limits, and optimizing prompts before making API calls.

Input Parameters

string
required
Text to count tokens for
string
Model to use for token counting. Must be a model that supports the countTokens method. Use the ListModels action to see available models and their supported methods.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GEMINI_EMBED_CONTENTGenerates text embeddings using Gemini embedding models. Converts text into numerical vectors for semantic search, similarity comparison, clustering, and classification tasks.

Input Parameters

string
required
The text content to generate embeddings for.
string
Embedding model to use. Options: ‘text-embedding-004’ (768 dimensions, default), ‘gemini-embedding-001’ (3072 dimensions, latest).
string
Optional title for the content. Use with task_type=‘RETRIEVAL_DOCUMENT’ to improve embedding quality for document search.
string
Specifies the intended use case to optimize the embedding. Options: ‘RETRIEVAL_QUERY’ (search queries), ‘RETRIEVAL_DOCUMENT’ (documents to be searched), ‘SEMANTIC_SIMILARITY’ (text similarity), ‘CLASSIFICATION’ (categorization), ‘CLUSTERING’ (grouping), ‘QUESTION_ANSWERING’ (question-document matching). Note: Some task types like ‘CODE_RETRIEVAL_QUERY’ may only be supported by certain models.
integer
Truncate the embedding to this number of dimensions. Only supported by ‘gemini-embedding-001’ model. Recommended values: 768, 1536, or 3072. Lower dimensions reduce storage but may affect quality.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GEMINI_GENERATE_CONTENTGenerates text content or speech audio from prompts using Gemini models. Supports text generation models (Gemini Flash, Pro) and text-to-speech models with configurable parameters. Generated text is nested at results[i].response.data.text. Output may be wrapped in markdown fences (e.g., html...) or preceded by explanatory prose; strip these before file writing or rendering.

Input Parameters

string
Model to use for generation. Text generation models: ‘gemini-2.5-flash’ (default, fast & efficient), ‘gemini-2.5-pro’ (advanced reasoning), ‘gemini-2.0-flash’ (previous generation), ‘gemini-2.0-flash-lite’ (cost-optimized). Text-to-speech models: ‘gemini-2.5-flash-preview-tts’ (low latency), ‘gemini-2.5-pro-preview-tts’ (high quality). Note: TTS models require voice_name parameter and return audio data instead of text.
integer
Top-k sampling parameter
number
Nucleus sampling parameter (0.0 to 1.0)
string
required
REQUIRED. The text prompt for content generation. This field must be provided. Example: ‘Write a short poem about the ocean’ or ‘Explain quantum computing in simple terms’. For TTS models, include style instructions in the prompt (e.g., ‘Say cheerfully: Hello!’).
string ("Achernar" | "Achird" | "Algenib" | "Algieba" | "Alnilam" | "Aoede" | "Autonoe" | "Callirrhoe" | "Charon" | "Despina" | "Enceladus" | "Erinome" | "Fenrir" | "Gacrux" | "Iapetus" | "Kore" | "Laomedeia" | "Leda" | "Orus" | "Puck" | "Pulcherrima" | "Rasalgethi" | "Sadachbia" | "Sadaltager" | "Schedar" | "Sulafat" | "Umbriel" | "Vindemiatrix" | "Zephyr" | "Zubenelgenubi")
Available prebuilt voices for text-to-speech generation. Complete list of 30 official Gemini TTS voices as documented at: https://ai.google.dev/gemini-api/docs/speech-generation
number
Controls randomness (0.0 to 2.0)
array
Sequences where generation should stop
array
Safety filter settings
integer
Maximum number of tokens to generate If response finishReason=‘MAX_TOKENS’, output was truncated; narrow prompt scope or increase this value and regenerate.
string
System instruction to guide the model’s behavior

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GEMINI_GENERATE_IMAGEGenerates a downloadable image from a text prompt, defaulting to Nano Banana 2 Lite on managed connections and Gemini 3 Pro Image Preview on other connections. Managed requests require a 1–1000 character prompt and default 1K square settings; a timeout can leave the provider outcome unknown.Instant: Supported on the latest version.Instant pricing: $0.033 per 1K image, plus $0.25/1M input and $1.5/1M output tokens.

Input Parameters

string ("gemini-2.5-flash-image" | "gemini-3.1-flash-lite-image" | "gemini-3-pro-image-preview" | "gemini-2.0-flash-exp-image-generation")
Gemini models that support native image generation. Models: GEMINI_3_1_FLASH_LITE_IMAGE is the default. Some connections allow only this model; availability of the others depends on Google. - GEMINI_3_1_FLASH_LITE_IMAGE: Nano Banana 2 Lite, 1K only - GEMINI_2_5_FLASH_IMAGE: Legacy Nano Banana image model - GEMINI_3_PRO_IMAGE_PREVIEW: Advanced model (Nano Banana Pro) - 4K resolution, thinking mode - GEMINI_2_0_FLASH_EXP_IMAGE_GENERATION: 2.0 Flash experimental image generation
integer
Top-k sampling parameter
number
Nucleus sampling parameter (0.0 to 1.0)
string
required
Text prompt for image generation Sensitive, trademarked, or explicit content triggers HTTP 400 (PROHIBITED_CONTENT or IMAGE_RECITATION) with no image returned — rephrase into neutral, policy-compliant language rather than retrying identical prompts.
number
Request timeout in seconds. Default is 300 seconds (5 minutes). Increase for complex prompts or high-resolution images. Minimum 120 seconds, maximum 600 seconds.
string ("1K" | "2K" | "4K")
Output resolution. Nano Banana 2 Lite supports only 1K. Pro supports 1K/2K/4K; legacy Flash choices use their default output size.
number
Controls randomness (0.0 to 2.0)
string ("1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9")
Aspect ratio. Values must be supported by the selected model; unsupported values are rejected. Connections limited to Nano Banana 2 Lite accept only ‘1:1’.
array
Safety filter settings. List of objects specifying content categories to filter and threshold levels. Each setting requires ‘category’ (HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, or HARM_CATEGORY_DANGEROUS_CONTENT) and ‘threshold’ (BLOCK_NONE, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, or BLOCK_ONLY_HIGH).
integer
Output token budget; valid limits and image token usage depend on the selected model. Connections limited to Nano Banana 2 Lite require the default, so omit this field there.
string
System instruction to guide image generation behavior

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GEMINI_GENERATE_VIDEOSSubmits a Veo 3.1 Lite video generation request and returns an operation handle for tracking; submission does not mean the video is ready, and a timeout can leave acceptance unknown. Managed requests require a 1–1000 character prompt, 720p and an explicit 4, 6 or 8 second duration.Instant: Supported on the latest version.Instant pricing: $0.20, $0.30 or $0.40 per 4, 6 or 8-second 720p video.

Input Parameters

integer
Seed value for reproducibility. Supported by the Veo 3.1 models.
string ("veo-3.1-lite-generate-preview")
Video model. Only Veo 3.1 Lite (‘veo-3.1-lite-generate-preview’) is supported; omit this field or pass it explicitly. Legacy values ‘veo-3.1-generate-preview’ / ‘veo-3.1-fast-generate-preview’ are coerced to Lite on some connections and rejected on others.
string
required
Text prompt for Veo video generation. Must be a non-empty string describing the video to generate.
string ("720p")
Video resolution. Only 720p is generated, at $0.05 per second. Omit or pass 720p; on some connections legacy 1080p values are normalized to 720p, on others they are rejected.
string ("16:9" | "9:16")
Supported aspect ratios for video generation.
string
Text describing content to avoid in the generated video (e.g., ‘cartoon, drawing, low quality’).
integer ("4" | "6" | "8")
Video duration: integer 4, 6 or 8 seconds. Pass an explicit number; legacy enum names are accepted only on some connections.
string ("allow_all")
Person generation safety setting (Veo 3.1 supports only ALLOW_ALL).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GEMINI_GET_VIDEOS_OPERATIONChecks an existing Veo operation without downloading media. Managed connections return status and next_action while hiding provider media URLs; other connections can return the operation response and video URLs, and the same handle can be reused to check progress or retrieve the video.Instant: Supported on the latest version.Instant pricing: $0 per request

Input Parameters

string
required
Pass the exact operation_name returned by GEMINI_GENERATE_VIDEOS unchanged. On some connections a full Google operation resource name or a bare operation ID (expanded to the default Lite model) is also accepted. Poll this same handle; do not submit another generation merely because the job is pending.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GEMINI_LIST_MODELSLists available Gemini and Veo models with their capabilities and limits. Useful for discovering supported models and their features before making generation requests.

Input Parameters

integer
Maximum number of models to return per page (default 50, max 1000).
string
Token from a previous response’s nextPageToken to retrieve the next page.
string
Filter models by name prefix (client-side). Leave empty to get all models.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GEMINI_WAIT_FOR_VIDEOPolls an existing Veo operation and downloads its MP4 when ready. Each call polls for a bounded time (about 20 seconds on some connections). pending=true with success=null means this call did not retrieve a terminal result; the job may still be running or may already have completed after a poll timeout. Reuse the exact returned operation_name with this action or GEMINI_GET_VIDEOS_OPERATION; do not resubmit a paid generation to continue. success=true includes video_file, while success=false indicates terminal safety filtering. Provider errors fail the call. A new generation is a separate request and can incur another charge.Instant: Supported on the latest version.Instant pricing: $0 per request

Input Parameters

string
required
Pass the exact operation_name returned by GEMINI_GENERATE_VIDEOS unchanged (a signed handle or a full Google resource name models/<model>/operations/<id>). Use the actual returned handle, never a placeholder. A pending result reuses this same handle; do not create a new paid generation to continue polling.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not