Efficient generation and editing · Currently available · Lifecycle follows official notices ● Available

Nano Banana 2 API

Nano Banana 2 maps to gemini-3.1-flash-image for efficient image generation and editing. Roko currently offers async 1K at $0.02, 2K at $0.024, and 4K at $0.03. Google’s current deprecations page announces no shutdown date and lists 2.1 as the recommended replacement.

Public model ID
nano-banana-2
Output tiers
1K / 2K / 4K (1K default)
Billing
Per output by resolution
Endpoint
POST /v1/images/tasks
Catalog snapshot

What is Nano Banana 2?

Nano Banana 2 maps to upstream gemini-3.1-flash-image for efficient generation and editing, including text rendering, subject consistency, and real-world knowledge.

As of 2026-10-07, Google’s current Gemini API deprecations page announces no shutdown date for gemini-3.1-flash-image and lists gemini-nano-banana-2.1 as the recommended replacement. New projects may compare 2.1, but there is no announced forced-migration deadline.

Roko currently exposes 1K, 2K, and 4K plus 14 aspect ratios at $0.02, $0.024, and $0.03 per output through async tasks.

Core capabilities

Efficient-workhorse positioning

Flash-level speed and cost with Pro-tier output quality — formerly the best value tier of Google's image family.

Real-world knowledge

Google pushed Pro-tier real-world knowledge down here: more accurate people, places, and events.

14 aspect ratios

The same 14 ratios as 2.1 (including 1:4, 4:1, 1:8, 8:1 ultra-wide), 1:1 default.

$0.02 per 1K pricing

Below the matching 2.1 tier in the Roko catalog — a low-cost stopgap for existing workflows.

Nano Banana 2 examples

Examples below come from a third-party same-brief review (PicLumen, August 2026 tests, explicitly using Nano Banana 2) and OpenArt's official model page showcase (sources labeled, not Roko-measured); Roko-measured cases will follow once a test key is available.

Nano Banana 2's illustration of Odysseus on a seaside cliff
Output
text-to-imageDemo output (not Roko-measured) · 4:3

Illustrative narrative: Odysseus by the sea

Nano Banana illustration of Odysseus on a seaside cliff beneath an olive tree, mythological scene

Same-brief sample: scene narrative and atmospheric composition in an illustration style — NB2's aesthetic direction.

Third-party same-brief review (PicLumen, Aug 2026) · 2026-10-07 核验
Nano Banana 2's documentary photo of a woman with umbrella and bags on a rainy street
Output
text-to-imageDemo output (not Roko-measured) · 4:3

Documentary photo: rainy street

A woman carrying an umbrella and paper bags on a rain-soaked street at night, documentary photo

Rain-night mood, wet-street reflections, and figure motion — NB2's output from the same-brief test.

Third-party same-brief review (PicLumen, Aug 2026) · 2026-10-07 核验
Nano Banana 2's minimalist red-accent Field Notes Berlin poster
Output
text-to-imageDemo output (not Roko-measured) · 2:3

Typography poster: Field Notes

Minimalist Field Notes Berlin poster with a red accent, clean grid layout

Minimal grid layout with a single accent color — NB2's text rendering and layout control.

Third-party same-brief review (PicLumen, Aug 2026) · 2026-10-07 核验
Nano Banana 2's NOMA perfume product shot
Output
text-to-imageDemo output (not Roko-measured) · 1:1

Product photography: NOMA perfume

NOMA No. 03 perfume product shot with a glass bottle, sliced fruit and ice, studio lighting

Glass textures and prop atmosphere in a still-life treatment — NB2's output from the same-brief test.

Third-party same-brief review (PicLumen, Aug 2026) · 2026-10-07 核验
Nano Banana family's surreal all-banana city scene
Output
text-to-imageDemo output (not Roko-measured) · 16:9

Surreal scene: banana city

A surreal city built entirely from bananas with roads, bridges and construction vehicles, miniature style

OpenArt's realism-and-style showcase: structural consistency at surreal scale with playful materials.

OpenArt official Nano Banana 2 model page showcase · 2026-10-07 核验
Nano Banana family's cinematic neon night-market street scene
Output
text-to-imageDemo output (not Roko-measured) · 16:9

Cinematic scene: neon night market

Two figures walking through a neon-lit night market street, cinematic composition, atmospheric lighting

OpenArt's complex-scene composition showcase: multiple figures, sign text, and layered lighting coexisting.

OpenArt official Nano Banana 2 model page showcase · 2026-10-07 核验

Nano Banana 2 API pricing

Pricing is generated from the current Roko catalog and billed per output at the chosen resolution. Google bills upstream by tokens (1K at $0.067); Roko settles per image at lower prices — this page shows Roko catalog pricing only.

ResolutionPriceBilling unit
1k$0.02per output
2k$0.024per output
4k$0.03per output

Cost examples

One 1K image1 × $0.02 = $0.02

A low-cost stopgap before migrating existing workflows.

One 4K image1 × $0.03 = $0.03

The highest tier; failed images are not billed.

Parameters and supported scope

These fields come from the current public generation_config. Aspect ratios match 2.1's fourteen (1:1 default); capabilities outside the form follow request validation.

ParameterValuesNotes
prompttextareaDescribe the image to create or the changes to apply to references. · Required
image_urlsurl / base64Reference images may use URL or Base64. State what must stay and what may change. · Optional
aspect_ratio1:1 / 1:4 / 1:8 / 2:3 / 3:2 / 3:4 / 4:1 / 4:3 / 4:5 / 5:4 / 8:1 / 9:16 / 16:9 / 21:9Selects the output aspect ratio; auto lets the model decide from the content. · Default: 1:1 · Optional
resolution1K / 2K / 4KSelects an output resolution tier configured for this model; the value may directly affect price. · Default: 1K · Optional

Call Nano Banana 2 with Roko API

Run the async task flow: submit a task to get a task_id, then poll for the result. Never expose an API key in client-side code.

Submit generation

curl https://api.rokoapi.com/v1/images/tasks \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: YOUR_UNIQUE_REQUEST_ID" \
  -d '{
  "model": "nano-banana-2",
  "prompt": "A quiet mountain lake at dawn, crystal water reflecting snow peaks, documentary photography",
  "aspect_ratio": "16:9",
  "resolution": "2K"
}'

Query recovery task

curl https://api.rokoapi.com/v1/tasks/$TASK_ID \
  -H "Authorization: Bearer $API_KEY"

POST /v1/images/tasks returns 202 with a task_id; once generation completes, query GET /v1/tasks/{task_id} for the result or failure reason. Idempotency-Key must be unique; replays with the same key return the original task without re-billing.

Best-fit scenarios

Keeping existing pipelines running

Existing NB2 workflows can continue while the catalog lists the model, with same-prompt evaluation against 2.1.

Generate a seasonal asset batch with the existing prompt and compare it with 2.1.

Low-cost batch imagery

$0.02 per 1K fits high-volume web and social imagery.

Generate 20 style-consistent header images for a blog series, flat illustration style.

Ultra-wide banners

1:4 and 1:8 ratios cover web banners and panoramic displays.

8:1 panoramic banner: rolling mountains and morning fog, minimal palette, whitespace for text.

4K high-resolution output

Step up to 4K when you need resolution — no external upscaler required.

4K booth key visual: abstract geometric gradients, brand blue and white, generous negative space.

Important limitations

  • Google currently announces no Gemini API shutdown date for gemini-3.1-flash-image; 2.1 is the recommended replacement. Roko availability follows the live catalog.
  • Google list pricing and Roko catalog pricing use different contracts; billing follows Roko’s estimate at submission.
  • A submitted async task is not a successful generation; trust the task result.
  • Text, hands, and fine details can still fail. Review final assets and applicable rights.

Nano Banana 2, 2.1, or Lite?

Nano Banana 2 is currently available, while 2.1 is Google’s recommended replacement. Compare Lite for the lowest-cost 1K output and 2.1 for newer capabilities; decide from the live catalog and measured results.

All models →

Nano Banana 2 FAQ

What model ID should I use for Nano Banana 2?

Use the public Roko API model ID nano-banana-2. Google's upstream ID is gemini-3.1-flash-image.

How much does the Nano Banana 2 API cost?

The current catalog lists $0.02 per 1K output, $0.024 per 2K, and $0.03 per 4K. Prices can change; confirm the console estimate and final settlement.

When does Nano Banana 2 shut down?

Google currently announces no Gemini API shutdown date for gemini-3.1-flash-image; 2.1 is the recommended replacement. Roko availability follows the live catalog.

NB2 vs 2.1 — what's the difference?

2.1 is Google's upgrade of NB2: better quality, prompt adherence, multi-turn consistency, and text rendering, plus new 1:4/4:1/1:8/8:1 ultra-wide ratios at roughly half of NB2's official API price. NB2's 512px tier is unsupported on 2.1.

Which aspect ratios are supported?

Fourteen: 1:1 (default), 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, and 21:9. No auto tier in the form — follow request validation.

Should I migrate straight to 2.1?

Officially, yes: 2.1 is the documented migration target, more capable and cheaper on Google's own pricing. Before switching, compare both generations with your same prompts to confirm quality.

Which endpoint does it use?

Submit async tasks via POST /v1/images/tasks to get a task_id, then poll GET /v1/tasks/{task_id} for the result or failure reason.

Do NB2 outputs carry a watermark?

Google applies SynthID invisible watermarking and other provenance measures to Gemini image products; Roko adds no visible watermark, and outputs follow the live response.