← Back
Vercel
Vercel adds Gemini 3.1 Flash Image Preview to AI Gateway with web search and configurable thinking
Vercel AI SDKVercel · featureapimodelintegration · vercel.com ↗

Gemini 3.1 Flash Image Preview Now Available

Google's Gemini 3.1 Flash Image Preview (Nano Banana 2) is now live on Vercel's AI Gateway, bringing multimodal capabilities that combine text and image generation in a single model call.

Key Features

  • Web Search Integration: The model can use Google Image Search to ground outputs in real-world imagery, improving accuracy when rendering lesser-known landmarks and objects by fetching live visual data
  • Configurable Thinking Levels: Developers can enable Minimal or High thinking modes, allowing the model to reason through complex prompts before generating responses
  • Expanded Resolution Support: New 512p resolution with 1:4 and 1:8 aspect ratios join existing options, supporting a wider variety of creative asset types

How to Use

Set the model identifier to google/gemini-3.1-flash-image-preview in the AI SDK and use streamText or generateText for multimodal outputs:

const result = streamText({
  model: 'google/gemini-3.1-flash-image-preview',
  providerOptions: {
    google: { responseModalities: ['TEXT', 'IMAGE'] },
  },
  prompt: 'Generate an image of the 2026 Super Bowl at golden hour',
});

Enable advanced reasoning with the thinkingConfig:

providerOptions: {
  google: {
    responseModalities: ['TEXT', 'IMAGE'],
    thinkingConfig: {
      includeThoughts: true,
      thinkingLevel: 'high',
    },
  },
}

Broader AI Gateway Benefits

Nano Banana 2 joins Vercel's unified API platform, which provides usage tracking, cost management, intelligent provider routing, automatic retries, and built-in observability—with no additional infrastructure required.