Gemini 3.1 Flash Image Preview Now Available
Vercel has released Nano Banana 2 (Gemini 3.1 Flash Image Preview) on AI Gateway, a multimodal model that generates both images and text while maintaining the speed and cost efficiency of flash-tier models.
Key Features
Visual Grounding with Google Image Search: The model can now retrieve live visual data from Google Image Search to ground outputs in real-world imagery. This is particularly useful for rendering lesser-known landmarks and objects with greater accuracy.
Configurable Thinking Levels: Developers can now set thinking levels to either "Minimal" or "High" to control how thoroughly the model reasons through complex prompts before generating responses.
Expanded Format Support: New resolutions and aspect ratios are available, including 512p images with 1:4 and 1:8 aspect ratios, enabling support for more types of creative assets beyond standard dimensions.
How to Use
To integrate Nano Banana 2, set the model to google/gemini-3.1-flash-image-preview in the Vercel AI SDK and use streamText or generateText functions. The model supports multimodal responses by configuring responseModalities to include both TEXT and IMAGE. For advanced reasoning, enable thinkingConfig with includeThoughts: true and set thinkingLevel to 'high'.
Additional Resources
AI Gateway provides a unified API for model access with built-in observability, Bring Your Own Key support, intelligent provider routing, automatic retries, and failover capabilities. Developers can explore available models on the AI Gateway model leaderboard or test the model in Vercel's model playground.