Skip to content

Nano Banana 2 API

Nano Banana 2 is Google’s fast image model, Gemini 3.1 Flash Image. It is good at editing and at keeping a subject consistent. Use the id nano-banana-2; each image is 12 credits.

Every version

Each API id with its resolutions, quality levels, output formats and price, and whether a refused image is refunded.

nano-banana-2

Nano Banana 2, Google

Official model: Google gemini-3.1-flash-image-preview

  • Failures refunded
  • Refusals refunded
  • No free trial

$0.012/ image

12 credits per image

Resolution
1K / 2K / 4K
Quality
No setting
Output
PNG, JPEG, WebP
Official API
1K $0.067 2K $0.101 4K $0.151 Save 82–92%

nano-banana-2-1k

Nano Banana 2 1K, Google

Official model: Google gemini-3.1-flash-image-preview, stable channel

  • Failures refunded
  • Refusals not refunded
  • No free trial

$0.06/ image

60 credits per image

Resolution
1K
Quality
No setting
Output
PNG, JPEG, WebP
Official API
1K $0.067 Save 10%

nano-banana-2-2k

Nano Banana 2 2K, Google

Official model: Google gemini-3.1-flash-image-preview, stable channel

  • Failures refunded
  • Refusals not refunded
  • No free trial

$0.09/ image

90 credits per image

Resolution
2K
Quality
No setting
Output
PNG, JPEG, WebP
Official API
2K $0.101 Save 10%

nano-banana-2-4k

Nano Banana 2 4K, Google

Official model: Google gemini-3.1-flash-image-preview, stable channel

  • Failures refunded
  • Refusals not refunded
  • No free trial

$0.13/ image

130 credits per image

Resolution
4K
Quality
No setting
Output
PNG, JPEG, WebP
Official API
4K $0.151 Save 13%

Nano Banana 2 API price: $0.012 per image here vs $0.067 on Google’s Gemini API: up to 82% cheaper. Google charges $0.067 for a 1K Nano Banana 2 image on the Gemini API ($0.101 at 2K, $0.151 at 4K), plus input tokens. Here one image is 12 credits: $0.012 in the $100 pack, about $0.021 in the $10 pack.

You call it with the same OpenAI-style request as the GPT models: send model "nano-banana-2" to /v1/images/generations, or add reference images and use /v1/images/edits.

When to pick it: Nano Banana 2 is the cheapest way here to get a 2K or 4K image, since every resolution takes the same 12 credits, and it makes the long formats 4:1, 1:4, 8:1 and 1:8 that the GPT models and Nano Banana Pro do not. It is a common choice for editing with reference images. One timed run of ours on 2026-11-18 (a single 1K square image): nano-banana-2 took 31 seconds. Nano Banana 2.1 costs the same here.

PricingSwitch from the OpenAI APIService status

At a glance

Made by
Google
API model id
nano-banana-2, nano-banana-2-1k, nano-banana-2-2k, nano-banana-2-4k
Official model
Google gemini-3.1-flash-image-preview
Price
nano-banana-2: 12 credits, $0.012–$0.021
Official price
$0.067 per 1K image, $0.101 per 2K, $0.151 per 4K, plus input at $0.50 per 1M tokensSource
Images per request
1 to 10
Prompt length
Up to 32,000 characters
Response
Base64 image (default) or a link kept for 72 hours
Free trial
—
Image editing
Yes, with reference images (no masks)

Example request

Any OpenAI SDK works: set the base URL to our API and use a key from your account.

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.cheapestimagen.com/v1", api_key="YOUR_KEY")
image = client.images.generate(
    model="nano-banana-2",
    prompt="a lighthouse on a cliff at dusk, oil painting",
    size="1024x1536",
)

Node.js

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.cheapestimagen.com/v1", apiKey: "YOUR_KEY" });
const image = await client.images.generate({
  model: "nano-banana-2",
  prompt: "a lighthouse on a cliff at dusk, oil painting",
  size: "1024x1536",
});

curl

curl https://api.cheapestimagen.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "nano-banana-2", "prompt": "a lighthouse on a cliff at dusk", "size": "1024x1536"}'

Questions

How much does the Nano Banana 2 API cost per image?

12 credits: $0.012 in the $100 pack, about $0.014 in the $50 pack and about $0.021 in the $10 pack. The price is the same at 1K, 2K and 4K. Google’s own price is $0.067 at 1K, $0.101 at 2K and $0.151 at 4K.

Do I need a Google account or Gemini API key?

No. Your Cheapest Imagen key is all you need.

Is there a newer version?

Yes: Nano Banana 2.1, with the API id nano-banana-2.1, at the same price here. It has its own page under Models.

Which resolutions can I use?

1K, 2K or 4K, each in ten ratios from 1:1 to 21:9; Nano Banana 2 and 2.1 add the long formats 4:1, 1:4, 8:1 and 1:8. Every resolution costs the same here. Some -1k, -2k and -4k versions make only one or two of these; each version’s card lists its resolutions.

What are the -1k, -2k and -4k versions?

The same Google model on a dearer, steadier channel, fixed to the resolution in the name: 1K, 2K or 4K (nano-banana-pro-2k makes 1K or 2K). On these versions an image refused for its content still takes its credits.

Can I edit an existing image?

Yes. Send one or more reference images to /v1/images/edits, or add them in the prompt box on the site, and describe the change. Masks are not supported yet.

How do I get a Nano Banana 2 API key?

Sign up, top up, and create a key under API keys in your account. One key works for every model. Set the base URL of your OpenAI SDK to https://api.cheapestimagen.com/v1.

Is the Nano Banana 2 API free?

No. Calls use paid credits, and the free trial for new accounts does not cover Nano Banana 2.

What are the rate limits?

300 requests a minute and 50 running at once per account. Beyond that the API answers 429; wait and retry.

Can I use the images commercially?

We claim no rights in your images and do not use them to train models. You keep whatever rights you have in them, as far as the law allows, and you are responsible for how you use them. The terms have the details.

Other models

Sign in

New accounts get 5 free images.