Nano Banana 2 (Gemini 3.1 Flash Image Preview)

Gemini 3.1 Flash Image Preview, 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 contextual understanding with fast, cost-efficient inference, making complex image generation and iterative edits significantly more accessible. Aspect ratios can be controlled with the image_config API Parameter

ChatGoogle66k tokens$0.545 / $3.2702 · 1M

google/gemini-3.1-flash-image-preview

Context
66k tokens
Completion cap
65,536
Tools
No
JSON
Yes
Released
2026-02-26

Call it from Geek Hub

Same OpenAI SDK. Change the base URL and the model id.

curl https://api.geekhub.mx/v1/chat/completions \
  -H "Authorization: Bearer $GEEKHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image-preview",
    "messages": [{"role": "user", "content": "Hola"}]
  }'
Get an API key

Frequently asked questions

What is Nano Banana 2 (Gemini 3.1 Flash Image Preview)?
Gemini 3.1 Flash Image Preview, 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 contextual understanding with fast, cost-efficient inference, making complex image generation and iterative edits significantly more accessible. Aspect ratios can be controlled with the image_config API Parameter Nano Banana 2 (Gemini 3.1 Flash Image Preview) runs on the Geek Hub API (OpenAI-compatible). Model id: google/gemini-3.1-flash-image-preview.
Is Nano Banana 2 (Gemini 3.1 Flash Image Preview) free?
No. Input is $0.545 per 1M tokens and output is $3.2702 per 1M tokens on Geek Hub (markup included).
What is the context length of Nano Banana 2 (Gemini 3.1 Flash Image Preview)?
Nano Banana 2 (Gemini 3.1 Flash Image Preview) has a 66k tokens context window. It supports up to 65,536 completion tokens.
Does Nano Banana 2 (Gemini 3.1 Flash Image Preview) support tool calling and structured outputs?
Nano Banana 2 (Gemini 3.1 Flash Image Preview) does not advertise tool calling on this endpoint. It also supports structured outputs via a JSON schema in response_format.
When was Nano Banana 2 (Gemini 3.1 Flash Image Preview) released?
Nano Banana 2 (Gemini 3.1 Flash Image Preview) was released on 2026-02-26.

More models from Google