Skip to contentx402 is live on Robinhood Chain: agents can now pay for any model, per call, in USDG →
OmniRail
← All models

Google · Language + Image model

Nano Banana 2 (Gemini 3.1 Flash Image)

google/gemini-3.1-flash-image
  • Language
  • Image
Released Jun 18, 2026

Gemini 3.1 Flash Image, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines advanced...

As a language model

Specifications

Context window
131,072 tokens
Max output
32,768 tokens
Input
image, text
Output
image, text
Reasoning effort
high, minimal
Tokenizer
Gemini

Supported parameters

Accepted by the model and forwarded as-is by the gateway.

  • max_tokens
  • reasoning
  • reasoning_effort
  • response_format
  • seed
  • structured_outputs
  • temperature
  • top_p

Use it

POST /api/v1/chat/completions · MCP chat · full reference

curl https://omnirail.org/api/v1/chat/completions \
  -H "Authorization: Bearer $OMNIRAIL_KEY" -H "Content-Type: application/json" \
  -d '{"model":"google/gemini-3.1-flash-image","messages":[{"role":"user","content":"Hello"}],"max_tokens":300}'

As an image model

Specifications

Input
image, text
Output
image, text
Editing
yes, up to 14 reference images
Images per call
1
Served by
Google AI Studio, Google Vertex

Request options

Validated against these values; anything else returns 400 with the allowed list.

resolution
512, 1K, 2K, 4K
aspect_ratio
1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9

Use it

POST /api/v1/images · /images/edits · MCP generate_image · edit_image · full reference

curl https://omnirail.org/api/v1/images \
  -H "Authorization: Bearer $OMNIRAIL_KEY" -H "Content-Type: application/json" \
  -d '{"model":"google/gemini-3.1-flash-image","prompt":"a lighthouse at dawn, 35mm film","aspect_ratio":"1:1"}'