generateContent API with the stable model ID gemini-3.8-flash.
Key capabilities
- 1M token context - Up to 1,048,576 input tokens and 65,536 output tokens
- Multimodal input - Text, image, video, audio, and PDF input; text output
- Long-horizon coding - Designed for complex, multi-file engineering work and iterative verification
- Autonomous agents - Improved multi-step planning, deterministic tool execution, and recovery from failed loops
- Tools - Function calling, code execution, File Search, Google Search, Google Maps, URL context, structured output, and Computer Use (Preview)
- Thinking levels -
low,medium, andhigh; the default ismedium - Caching and processing options - Supports context caching, Batch API, Flex inference, and Priority inference upstream
Model specifications
Quick example
Thinking levels
Choose a thinking level based on latency and task difficulty:Gemini 3.8 Flash may use more reasoning tokens on difficult, long-running tasks because it works in smaller steps, calls tools iteratively, and verifies intermediate results. Use
low for workflows that do not need this level of verification.Removed generation parameters
Do not send these fields with Gemini 3.8 Flash:generationConfig.temperaturegenerationConfig.topPgenerationConfig.topKgenerationConfig.candidateCountgenerationConfig.thinkingConfig.thinkingBudget
generationConfig.thinkingConfig.thinkingLevel to control reasoning effort.
Conversation and tool requirements
- Do not prefill the model response. The final conversation turn must be a non-empty
userturn. - Preserve every
thoughtSignaturereturned by the model when sending conversation history back in a tool workflow. - A
functionResponsemust include both the functionnameand the matching callidreturned by the model. - Keep multimodal assets inside their corresponding content or function-response payload.
Parameters
API Reference
View the interactive API reference for Gemini 3.8 Flash.