Gemini (OpenAI Format) - File Analysis
Gemini models support OpenAI request format with extended file analysis capabilities. Supports PDFs, images, audio, and video files.
Supported File Types
Request
Request Body
Content Types for File Analysis
For files over 20MB, use the URL method instead of base64.
Dynamic Thinking Models
When model name ends with thinking-* (e.g. gemini-3.8-flash-thinking-2000), it supports dynamic thinking token limits. The number after thinking- sets the max thinking tokens.
Web Search
Enable web search by either:
- Adding
-search suffix to model name (e.g. gemini-3.8-flash-search)
- Adding
googleSearch tool:
Example Request - Chat
Example Request - File Analysis
Python Example - Web Search
Python Example - Thinking Budget
Response