imageunverifiedAuto lesson

Google

Nano Banana 2 (Gemini 3.1 Flash Image)

google/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. It combines advanced...

RoleMakes or edits images.

$0.500

In / M

$3

Out / M

131K

Context

AA intelligence index
Not on listing
Inputs
image, text
Outputs
image, text
Tools
Not listed
Structured output
Listed
Reasoning
Listed
Weights
Not verified
Listed
Jun 18, 2026
Live from the OpenRouter listing ↗

01 · What it's good at

Use it for this.

Three jobs this model is built for, and the ones to give to something else.

01

Pictures, edits, and design drafts

Skip it for

  • An essay about a picture. That is a chat model with vision.

02 · Example tasks

What you'd actually send it.

Real inputs, not a benchmark. Paste one into the snippet below to try it.

You send

A ceramic mug on a linen cloth, morning light, no text.

Why this model

Text-to-image.

03 · Your stack

Where it sits: Draw, speak, listen.

Image models take a prompt, and sometimes a source image, and return pixels. Price is often per image rather than per token of prose.

04 · Wire it up

One request. Paste and run.

Uses OpenRouter, so one key works for every model on this site. Set OPENROUTER_API_KEY and swap the prompt for one of the tasks above.

import { writeFile } from "node:fs/promises";

const res = await fetch("https://openrouter.ai/api/v1/images", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPENROUTER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "google/gemini-3.1-flash-image",
    "prompt": "A ceramic mug on a linen cloth, morning light, no text",
    "aspect_ratio": "1:1"
  }),
});
const result = await res.json();
// Images come back base64-encoded.
await writeFile("out.png", Buffer.from(result.data[0].b64_json, "base64"));

05 · Watch out for

Gotchas.

  • This lesson is generated from the model type and the live listing. It has not been hand-reviewed yet.

  • Check the listing for supported parameters before you rely on tools or structured output.

Sources

Lessons are written from each model's listing and the linked docs. We don't publish our own benchmark numbers; the index above is Artificial Analysis, as shown on OpenRouter.