Gemini 3.1 Flash Image Preview API

Nano Banana 2: fast Gemini image generation and editing

google/gemini-3.1-flash-image-preview
GooglePicture

About this model

Gemini 3.1 Flash Image Preview is the preview name of Nano Banana 2, Google’s Flash-tier image generation and editing model. Google released it in February 2026 as a way to bring Pro-level image quality to the Flash architecture.

Google’s documentation lists up to 14 reference images per request, resolutions from 0.5K upward, extra aspect ratios such as 1:4 and 8:1, and grounding with Google Search and Image Search. In this catalog image editing is enabled.

Pick it as the balanced choice: richer than Gemini 3.1 Flash-Lite Image, lighter than Gemini 3 Pro Image.

Use cases

  • Editing photos with reference images
  • Generating images with readable text
  • Fast concept art and marketing visuals

Input and output

Input
Text and images
Output
Images
Developer
Google
Type
Picture
Capabilities
Image editing

Gemini 3.1 Flash Image Preview request example

Use https://gatelum.com/v1 as the base URL and pass google/gemini-3.1-flash-image-preview in the model field. You create the key in your account after signing up.

curl --silent --show-error --fail-with-body \
  --header 'Authorization: Bearer glt_YOUR_KEY' \
  'https://gatelum.com/v1/images/generations' \
  --header "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "google/gemini-3.1-flash-image-preview",
  "prompt": "A lighthouse on a rocky shore at sunset, watercolor",
  "n": 1
}
JSON