Claude Opus 5.5 is live on SeedRouter
GoogleImage generationAlso known as Nano Banana 2

Gemini 3.1 Flash Image — fast image generation from 512px to 4K

Gemini 3.1 Flash Image is Google's general-purpose image model: 512px drafts to 4K finals, 14 aspect ratios, image, video and PDF references. Keep your generateContent body. From $0.03 per image.

Availableabout $0.05132 /image$0.06843 /image-25%
  • Text to image
  • Image editing
  • 512px to 4K
  • 14 aspect ratios
  • Up to 14 references
  • Video and PDF input
Model ID
gemini-3.1-flash-image
Input
Text, images, video, PDF
Output
One image, 512px to 4K
Also known as
Nano Banana 2

Try Gemini 3.1 Flash Image before you write any code

Run Gemini 3.1 Flash Image with the exact JSON your code will send. Every generateContent field the endpoint takes is here.

Create image task

gemini-3.1-flash-image-official$45.00 / 1M image output tokens

Describe an image, add references if you have them, and submit once. The result appears when the task completes.

57 / 524288

What to create or change. Subject, setting, lighting and style.

References

Images, videos or PDFs the model should read. Files are uploaded and sent as URLs.

0/14 files

Up to 14, sent as fileData URLs.

Default matches your first reference, otherwise 1:1.

Output resolution. 1K is the default.

Image only, or image with a short text reply.

Standing rules for the model, such as a house style.

Blocking threshold for this category.

Greyed-out options relax content filtering. They are available through the API only, not in the playground.

Blocking threshold for this category.

Greyed-out options relax content filtering. They are available through the API only, not in the playground.

Blocking threshold for this category.

Greyed-out options relax content filtering. They are available through the API only, not in the playground.

Blocking threshold for this category.

Greyed-out options relax content filtering. They are available through the API only, not in the playground.

0–2. Leave empty for the model default.

0–1. Leave empty for the model default.

Whole number, 1 or more.

Whole number. Reuse it to reproduce a result more closely.

Caps text and thinking output.

0

One per line, up to 5.

Only 1: one request returns one image.

How many tokens each reference uses. Lower is cheaper.

Return the model's thought summary with the image.

IMAGE_JPEG is the one documented value.

Applies only when aspect ratio above is Default; when both are set, aspect ratio wins.

Applies only when image size above is Default; when both are set, image size wins.

Reference estimate~$0.05132

Estimated at current rates from the image tokens of the selected size plus a measured sample of text and thinking tokens. Reference inputs add a little on Official.

…
Ready
Generated with Gemini 3.1 Flash Image through this API

Try one of these prompts

Generated with Gemini 3.1 Flash Image: a developer desk with printed product shots fanned beside a laptop
Generated with Gemini 3.1 Flash Image: a matte ceramic mug on a pale oak shelf in morning light
Generated with Gemini 3.1 Flash Image: a misty mountain lake at dawn with a small wooden boat

Sample images generated with Gemini 3.1 Flash Image through this API

Gemini 3.1 Flash Image pricing

Two ways to pay for Gemini 3.1 Flash Image. Standard is one flat price per image at any size. Official bills the tokens each render reports, so small images cost less and 4K costs more.

One 1K image1K · 1:1 · short prompt
Official
$0.05132/image
Standard
$0.03/image
Standard is the flat price; Official is the token cost of a typical render.
What $20.00 buys1K images
Official
389images
Standard
666images
About 19–33 images per dollar, depending on the channel.

Both prices come from the rates that bill your account. Failed requests are not charged.

Official estimates use the image tokens Google publishes for each size, plus a measured sample of 405 text and thinking tokens and 27 prompt tokens.

Gemini 3.1 Flash Image cost by image size

Google publishes the image tokens for each Gemini 3.1 Flash Image size, from 747 at 512px to 2,520 at 4K. Official prices below add a measured text and thinking sample.

Image sizeImage tokensPrice · OfficialPrice · Standard
512747$0.03454$0.03
1K1,120$0.05132$0.03
2K1,680$0.07652$0.03
4K2,520$0.11432$0.03

Standard is one flat price per image at every size. Official follows the image tokens, so larger sizes cost more.

Price your own Gemini 3.1 Flash Image request

Pick a size and watch the figure. It is computed from the live rate and the image tokens Google publishes for each size, so it moves when the price does.

Price est.gemini-3.1-flash-image-official
× 1 · real-time

A pre-submit estimate. Standard bills each delivered image; Official bills image output, text and thinking output, and input at their own rates.

Your estimate
~$0.05131
Per $20.00
≈ 389images
1K · 1:1 · × 1
List price· saves 25%
~$0.06842
Tokens for this request
Image output tokens1,120
Text input tokens1
Channel
Image size
Aspect ratio
Count
1
Prompt
0 chars · ~1 tokens
ItemHow it is measuredRateBilling
Official · Image outputImage tokens reported for the render$45.00 / 1M$60.00 / 1MCharged from real usage
Official · Text and thinking outputText and thinking tokens reported for the render$2.25 / 1M$3.00 / 1MCharged from real usage
Official · InputPrompt and reference tokens$0.375 / 1M$0.50 / 1MCharged from real usage
Standard · Per imageEach delivered image, any size$0.03 /image$0.04 /imageCharged when the image is delivered
Failed requestsAny task that ends failedFreeNothing is charged

What is Gemini 3.1 Flash Image?

Gemini 3.1 Flash Image is Google's image generation and editing model, sold under the name Nano Banana 2. Google describes it as its most versatile image model, balancing speed with 4K output, world knowledge and reliable text rendering.

On SeedRouter you call Gemini 3.1 Flash Image with Google's own generateContent request body plus a model field. Submit once, keep the task ID, and read a hosted image URL when the task completes.

Model ID: gemini-3.1-flash-image · Token billing ID: gemini-3.1-flash-image-official · Input limit: 131,072 tokens.

Output sizes
512, 1K, 2K, 4K
Aspect ratios
14, from 1:8 to 8:1
References
Up to 14
Reference types
Image, video, PDF

Two ways to use Gemini 3.1 Flash Image

Call the API from your backend, or hand the job to a coding agent.

Backend

Call the API

Best for apps, pipelines and batch work

Send the Gemini 3.1 Flash Image request from your server, keep the task ID, and read the finished image from the task.

  1. 1Create an API key
  2. 2POST the request body
  3. 3Poll the task until it completes
Agent

Let an agent do it

Best for one-off assets and prototypes

Copy a ready prompt into Claude Code, Codex or Cursor. It asks before spending and downloads the result.

  1. 1Copy the prompt
  2. 2Fill in what you want
  3. 3Approve the request

Why developers pick Gemini 3.1 Flash Image

The default Gemini image model: quick, flexible and cheap to draft with.

Google's request body

Gemini 3.1 Flash Image takes the same contents and generationConfig you would send to Google. Add a model field and you are done.

Four output sizes

Draft at 512px and finish at 4K with the same Gemini 3.1 Flash Image request.

Extreme ratios

Gemini 3.1 Flash Image adds 1:4, 4:1, 1:8 and 8:1 for banners and tall formats.

Video and PDF references

Point Gemini 3.1 Flash Image at a clip or a product sheet, not just photos.

14 references

Combine up to 14 references in one Gemini 3.1 Flash Image request, passed as fileData URLs.

Task-based

Gemini 3.1 Flash Image renders never hold your connection open. You poll a task and get a URL.

What teams build with Gemini 3.1 Flash Image

Catalogue images

Gemini 3.1 Flash Image cleans up product photos at volume.

Social formats

Square, vertical and wide Gemini 3.1 Flash Image versions from one prompt.

Banners

Gemini 3.1 Flash Image fills 8:1 and 1:8 layouts without cropping.

Cheap drafts

Iterate with Gemini 3.1 Flash Image at 512px, then render the keeper at 4K.

From documents

Turn a PDF brief into a visual with Gemini 3.1 Flash Image.

Edits

Change a background, a color or an object with Gemini 3.1 Flash Image and keep the rest.

Start with Gemini 3.1 Flash Image in four steps

  1. 01

    Create a key

    Sign in, top up any amount, and create an API key. Credits never expire.

  2. 02

    Send one request

    POST the Gemini 3.1 Flash Image body to /v1/images/generations with your prompt and any reference URLs.

  3. 03

    Poll the task

    Keep the task ID and check it every few seconds until the status is completed.

  4. 04

    Download the image

    Save the hosted image URL from the task output to your own storage.

Create your API key

Gemini 3.1 Flash Image at a glance

The facts that decide whether Gemini 3.1 Flash Image fits the job.

FeatureGemini 3.1 Flash Image
Model IDgemini-3.1-flash-image
Output sizes512, 1K, 2K, 4K
Aspect ratios14 (1:8 to 8:1)
ReferencesUp to 14
Reference typesImage, video, PDF
BillingPer image (Standard) or per token (Official)

For the most complex visual tasks, see Gemini 3 Pro Image. For the lowest cost at 1K, see Gemini 3.1 Flash Lite Image.

Before you move Gemini 3.1 Flash Image code over

The preview ID still works

Google retired gemini-3.1-flash-image-preview on June 25, 2026. Here it still runs, served by gemini-3.1-flash-image.

URLs, not inlineData

Send Gemini 3.1 Flash Image references as fileData URLs. Base64 inlineData is refused before anything is charged.

No Search grounding yet

Gemini 3.1 Flash Image requests with tools are refused for now.

One image per request

candidateCount is 1. Send several Gemini 3.1 Flash Image requests for a batch.

Why run Gemini 3.1 Flash Image on SeedRouter

Two ways to pay

Pick Standard for one flat price per Gemini 3.1 Flash Image image, or Official to pay for the tokens each render reports. Same key, same request body.

Failed requests are free

If a task ends failed, nothing is charged. You only pay for images that are delivered.

Credits never expire

Top up once and use the balance whenever you need it. No subscription.

Hosted results

Finished images come back as URLs on our CDN. Keep a copy of anything you need long term.

One key for every model

The same key and balance work for the other image models in the catalogue.

Other image models on SeedRouter

Same key, same balance, same task API.

GPT Image 2
gpt-image-2-official · gpt-image-2

Create and edit images with GPT Image 2 on SeedRouter. Use text prompts, reference images and transparent backgrounds, with a live playground and usage-based pricing.

View pricing
GPT Image 2.5
gpt-image-2.5-flare · gpt-image-2.5-sunburst · gpt-image-2.5-flare-official · gpt-image-2.5-sunburst-official

Generate and edit images with GPT Image 2.5 Flare or Sunburst on SeedRouter. Six quality steps up to max, transparent backgrounds, a live playground and pay-as-you-go pricing.

View pricing
Gemini 3 Pro Image
gemini-3-pro-image-official · gemini-3-pro-image

Use Gemini 3 Pro Image (gemini-3-pro-image) with Google's generateContent body: 1K to 4K, built-in thinking, 14 references. Pay per image or per token.

View pricing
Gemini 3.1 Flash Lite Image
gemini-3.1-flash-lite-image-official

Use Gemini 3.1 Flash Lite Image (gemini-3.1-flash-lite-image), Google's fastest and cheapest image model, with its generateContent body. 1K output.

View pricing

Gemini 3.1 Flash Image FAQ

Is Gemini 3.1 Flash Image the same as Nano Banana 2?+

Yes. Nano Banana 2 is Google's product name for Gemini 3.1 Flash Image, and the model ID is gemini-3.1-flash-image. The Nano Banana 2 page covers the same model from a product angle.

Is there a Gemini 3 Flash Image?+

No. The Flash image model in the Gemini 3 family is Gemini 3.1 Flash Image, model ID gemini-3.1-flash-image. Searches for Gemini 3 Flash Image usually mean this model.

Is gemini-3.1-flash-image-preview still available?+

Google shut the preview ID down on June 25, 2026. On SeedRouter gemini-3.1-flash-image-preview is still accepted and runs on gemini-3.1-flash-image, so old code keeps working while you switch the ID.

How much does Gemini 3.1 Flash Image cost?+

A 1K image costs $0.03 on Standard, whatever the prompt. On Official you pay for the tokens each render reports; a typical 1K render comes to about $0.05132. The pricing section shows every size at the live rate.

Is Gemini 3.1 Flash Image free?+

Google's pricing page lists no free tier for Gemini 3.1 Flash Image on the Gemini API. On SeedRouter you top up once, credits never expire, and failed requests are not charged.

Do I need to change my Gemini request?+

Keep contents, systemInstruction, safetySettings and generationConfig as they are. Add a model field, send it to /v1/images/generations, and read the Gemini 3.1 Flash Image result from the task.

How do I get an API key for Gemini 3.1 Flash Image?+

Sign in, top up any amount and create a key on the API keys page. The same key works for Gemini 3.1 Flash Image and every other model here.

Gemini 3.1 Flash Image or Gemini 3 Pro Image?+

Start with Gemini 3.1 Flash Image for speed, 512px drafts, extreme ratios and video or PDF references. Move to Gemini 3 Pro Image for complex instructions and professional assets.

Send your first Gemini 3.1 Flash Image request

Try Gemini 3.1 Flash Image in the Playground, then paste the same JSON into your code.