generate_content
Generate AI content using Gemini with file analysis, code execution, and web search. Process images, videos, audio, PDFs, and documents to create responses, run code, and research information.
Instructions
Generate content using Gemini with optional file inputs, code execution, and Google search. Supports multiple files: images (JPG, PNG, GIF, WebP, SVG, BMP, TIFF), video (MP4, AVI, MOV, WebM, FLV, MPG, WMV), audio (MP3, WAV, AIFF, AAC, OGG, FLAC), documents (PDF), and text files (TXT, MD, JSON, XML, CSV, HTML). MIME type is auto-detected from file extension.
Example usage:
PDF to Markdown conversion:
With Google Search:
With Code Execution:
Combining features with thinking mode:
Input Schema
Name | Required | Description | Default |
---|---|---|---|
enable_code_execution | No | Enable code execution capability for the model | |
enable_google_search | No | Enable Google search capability for the model | |
files | No | Array of files to include in generation (optional). Supports images, video, audio, PDFs, and text files. | |
model | No | Gemini model to use (optional) | gemini-2.5-flash |
system_prompt | No | System prompt to guide the AI behavior (optional) | |
temperature | No | Temperature for generation (0-2, default 0.2) | |
thinking_budget | No | Thinking budget for models that support thinking mode (-1 for unlimited) | |
user_prompt | Yes | User prompt for generation |