Google: Nano Banana 2 (Gemini 3.1 Flash Image)

Nano Banana 2 is Google's image generation and editing model, released 2026-06, built for fast, cost-efficient inference. It pairs contextual understanding with iterative edits, delivering Pro-level visual quality at Flash speed.

Modalities
inImageinTextoutImage
Price / 1M
$0.47 / $57.00
Context
131K
Released
Jun 18, 2026

Channels

Every channel serves the same model, but they differ in price and stability. On each API key in the Platform, you pick a primary and a backup channel per vendor, and each billing line shows which channel served the request.

Provider
Discount
Input /M
Output /M
Cache read /M
Cache write 5m /M
Cache write 1h /M
Defaultcheap
+1542%
$0.47
$57.00
—
—
—
Officialstable
+1801%
$0.55
$66.00
—
—
—

Context pricing

This model’s price depends on how much input context a request carries. The headline price is the cheapest band, and a longer prompt moves the whole request into a higher one.

Input context
Input /M
Output /M
Defaultcheap
standardBase
$0.47
$57.00
Officialstable
standardBase
$0.55
$66.00

Capabilities

ReasoningVisionStructured output

Parameters

Request parameters this model accepts through the API.

include_reasoningmax_tokensreasoningreasoning_effortresponse_formatseedstructured_outputstemperaturetop_p

Quick start

POST /v1beta/models/{model}:generateContent
curl https://api.mirapi.ai/v1beta/models/gemini-3.1-flash-image:generateContent \
  -H "x-goog-api-key: $MIRAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "A red bicycle leaning on a white wall"}]}],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {"aspectRatio": "1:1"}
    }
  }'
# the image is base64 in candidates[0].content.parts[].inlineData.data
Wire Nano Banana 2 (Gemini 3.1 Flash Image) into your product

1M free tokens to start, no card required. It’s OpenAI-compatible, so you only change the base URL.

Start free