image_generate.gemini_3_1_flash_image_edit
google/nano-banana-2/edit

The Nano Banana 2 API edits images (Gemini 3.1 Flash Image) from natural-language prompts. Up to 14 reference inputs, four resolution tiers (0.5K–4K), 14 aspect ratios, PNG or JPEG output — all through one REST endpoint, priced 5% below Google's published rate.

Input
The text prompt sent to the model
Output
Sample edited image — run the model to replace this previewSampleRun the model to replace this preview

Nano Banana 2 API: Image Editing

Use the Nano Banana 2 API to edit images from natural-language prompts.

Nano Banana 2 API edits images (Gemini 3.1 Flash Image) from natural-language prompts. Up to 14 reference inputs, four resolution tiers (0.5K–4K), 14 aspect ratios, PNG or JPEG output — all through one REST endpoint.

Pricing on the Nano Banana 2 API is 5% below Google's published rate, held flat across tiers. Add-on grounding (web/image search) costs $0.014 per request. The Nano Banana 2 API uses one RouterBase key — no provider-specific SDKs.

Why this model

Six reasons teams ship on the Nano Banana 2 API

From identity-locked editing to 5% off official pricing — what the Nano Banana 2 API gets right.

Natural-language editing

Skip masks and layers. Describe the change and the Nano Banana 2 API renders it.

14 reference images

Lock identity, brand, and continuity by passing references in each request.

0.5K to 4K output

Sample at 0.5K, finalise at 4K — switch resolution per call, no code changes.

5% off official

Pay 5% less than Google's published rate; the Nano Banana 2 API discount is flat across tiers.

REST + JSON

One endpoint, one key, no SDK lock-in. Plain JSON in, signed URL out.

Optional grounding

Plug Google web/image search into the Nano Banana 2 API for $0.014 per request.

RouterBase dashboard preview
Quickstart

Get started with the Nano Banana 2 API in 3 steps

From sign-up to your first Nano Banana 2 API call in under 5 minutes.

  1. Create a RouterBase API key

    Sign up and generate sk-rb-… — one key works for the Nano Banana 2 API and 200+ other models.

  2. POST to the Nano Banana 2 API endpoint

    Send a base image, prompt, and optional references in JSON. The Nano Banana 2 API returns a signed URL within seconds.

  3. Inspect the result

    Each Nano Banana 2 API response includes generation metadata for auditing and a render URL ready to embed.

Pricing

Pay only for what you use

RouterBase passes through partner-tier pricing. Compared against the model's official published API rate.

ResolutionRouterBaseOfficialSave
0.5K $0.038$0.045−15%
1K $0.057$0.067−15%
2K $0.086$0.101−15%
4K $0.128$0.151−15%
web_search=true +$0.013+$0.015−15%
image_search=true +$0.013+$0.015−15%

Your request will cost $0.057 per run (1K).With $1 you can run this model approximately 17 times.

Customer stories

What teams build with this image-edit model

Real production loads running on the Nano Banana 2 API and the RouterBase model catalog.

Marcus Reyes
Marcus ReyesCTO, Paradigm AI

We piped product photography through this model and edit cycles dropped from days to minutes.

Priya Lakshmi
Priya LakshmiFounder, Quillo

We swapped three providers through RouterBase in one line of code when OpenAI had its outage. Our users never noticed.

Thomas Beck
Thomas BeckStaff Engineer, Northbeam

Locked character identity across a 200-frame storyboard with the Nano Banana 2 API — references plus prompt, no manual masking.

Aoi Tanaka
Aoi TanakaML Lead, Daybreak Robotics

The Nano Banana 2 API replaced three artist-hours of mask cleanup per shot. Our pipeline barely flinched.

Jonas Keller
Jonas KellerIndie Developer

Plugged the Nano Banana 2 API into my existing OpenAI SDK with one base URL swap — less work than writing this testimonial.

Ethan Nguyen
Ethan NguyenHead of Engineering, Compound Studio

RouterBase puts 200+ models behind one key. Our research team stopped asking for new provider accounts.

Sophia Martín
Sophia MartínCTO, Relay

Background-removal moved to the Nano Banana 2 API — transparent backgrounds and 4K renders behind one REST call.

Lucas Fernandes
Lucas FernandesEngineering Manager, Light

We migrated 42 services to RouterBase over a weekend. The only PR comment we got was 'wait, that's all?'.

David Okonkwo
David OkonkwoCo-founder, Figment

Pricing on the Nano Banana 2 API is 5% below Google's published rate — at our scale that's six figures saved per quarter.

Frequently Asked Questions

Common questions about the Nano Banana 2 API.

The Nano Banana 2 API is RouterBase's pass-through to Google Nano Banana 2 (Gemini 3.1 Flash Image edit). It edits images from natural-language prompts with up to 14 reference inputs, 0.5K to 4K resolution, and PNG/JPEG output.