Skip to content
FluxCDNFluxCDN
esc

Google: Nano Banana 2 (Gemini 3.1 Flash Image)

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.

Input
181,048 Toman/M tokens
Output
1,082,872 Toman/M tokens
Context
131K
Max output
33K
Published
Jun 18, 2026
Maker
Google

Free plan prices, in Toman at today's rate. Plans and prices

Price by plan

Toman per million tokens at today's rate. A plan lowers the price of your usage up to a limit each period.

PlanInputOutput
Free181,0481,082,872
Pro173,6281,038,492
Max166,208994,112

Images and other units

Toman per million tokens of each kind, per plan, at today's rate. A generated 1024×1024 image is usually 1,100–1,300 image tokens on Gemini image models and up to about 6,000 on GPT image models at high quality; the exact count is in each response's usage.

UnitFreeProMax
Generated image tokens21,623,28020,737,08019,850,880

Capabilities

  • Text
  • Vision
  • JSON
  • Reasoning

What it takes and gives

Accepts
  • Text
  • Image
Creates
  • Text
  • Image

Every input listed here works through the API and the playground: images and PDFs as data URLs or https links, audio as base64, video as a data URL or a link the model supports.

This model creates images. The API asks it for images by default (modalities ["image", "text"]); they come back on the message as data URLs. To edit a picture, send it with an instruction.

Call it

Pass google/gemini-3.1-flash-image as the model name, or let router/auto choose for you.

import os

from openai import OpenAI

client = OpenAI(
    base_url="https://ai.fluxcdn.cloud/api/v1",
    api_key=os.environ["FLUXCDN_API_KEY"],
)

resp = client.chat.completions.create(
    model="router/auto",
    messages=[{"role": "user", "content": "Hello"}],
)

print(resp.choices[0].message.content)