Gemini 3.1 Flash Image Preview

Gemini 3.1 Flash Image (Nano Banana 2) is optimized for image understanding and generation and offers a balance of price and performance.

Image generation specifications

Generating images with Gemini 3.1 Flash Image consumes tokens based on output image resolution: 747 tokens for 512p (0.25MP), 1120 tokens for 1K (1MP), 1680 tokens for 2K (4MP), and 2520 tokens for 4K (16MP).

Try in Agent Platform (Preview) Deploy example app

Note: To use the "Deploy example app" feature, you need a Google Cloud project with billing and Agent Platform API enabled.
Model ID gemini-3.1-flash-image-preview
Supported inputs & outputs
  • Inputs:
    Text, Images
  • Outputs:
    Text and image
Token limits
  • Maximum input tokens: 131,072
  • Maximum output tokens: 32,768
Capabilities
Consumption options
See Consumption options for more information.
Input size limit 500 MB
Technical specifications
Images
  • Maximum images per prompt: 14
  • Maximum file size per file for inline data or direct uploads through the console: 7 MB
  • Maximum file size per file from Google Cloud Storage: 30 MB
  • Maximum number of output images per prompt: Limited to 32,768 output tokens
  • Supported aspect ratios: 1:1, 1:4, 1:8, 3:2, 2:3, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, and 21:9
  • Supported MIME types:
    image/png, image/jpeg, image/webp, image/heic, image/heif
Documents
  • Maximum number of files per prompt: As supported by the 128k token context window
  • Maximum number of pages per file: As supported by the 65,536 token context window
  • Maximum file size per file for the API or Cloud Storage imports: 50 MB(application/pdf) or 7 MB(text/plain)
  • Maximum file size per file for direct uploads through the console: 7 MB
  • Supported MIME types:
    application/pdf, text/plain
Parameter defaults
  • Temperature: 0.0-2.0 (default 1.0)
  • topP: 0.0-1.0 (default 0.95)
  • topK: -
  • candidateCount: 1
Supported regions

Model availability

  • Global
    • global
See Deployments and endpoints for more information.
Knowledge cutoff date January 2025
Versions
  • gemini-3.1-flash-image-preview
    • Launch stage: Public preview
    • Release date: February 26, 2026
Supported languages See Supported languages.
Pricing See Pricing.