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−39%
$0.43 / $1.71$0.50 / $3.00
Context
131K
Knowledge cutoff

Capabilities

ReasoningVisionStructured output

Channels

Same weights on every channel. Requests route to the cheapest healthy one; the channel used is printed on each billing line.

Provider
Discount
Input /M
Output /M
Cache Read /M
Cache Create 5m /M
Cache Create 1h /M
Defaultstable
−39%
$0.43
$1.71

Quick Start

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.mirapi.ai/v1",   # changed
    api_key=os.environ["MIRAPI_API_KEY"],   # changed
)

resp = client.chat.completions.create(
    model="google/gemini-3.1-flash-image",
    messages=[{"role": "user", "content": "Hello"}],
)
Wire Nano Banana 2 (Gemini 3.1 Flash Image) into your product

1M free tokens to start · no card · OpenAI-compatible, one base_url change

Start free