Skip to content

Nano Banana API

Nano Banana is the name of Google’s Gemini image models. This API serves Nano Banana 2, Nano Banana 2.1 and Nano Banana Pro in the OpenAI Images format: one base URL, one key, from $0.012 per image, with 1K, 2K and 4K at the same price.

Checked on 2026-11-19

Models and prices

ModelAPI idGoogle’s idPer image hereOfficial 1KOfficial 2KOfficial 4KSaving
Nano Banana 2nano-banana-2gemini-3.1-flash-image-preview$0.012$0.067$0.101$0.15182%–92%
Nano Banana 2.1nano-banana-2.1gemini-nano-banana-2.1$0.012$0.034$0.05$0.11364%–89%
Nano Banana Pronano-banana-progemini-3-pro-image-preview$0.02$0.134$0.134$0.2485%–91%

Our price is at the $100 pack; in the $10 pack it is $0.021 ($0.036 for Pro). The official figure is Google’s Gemini API price per image plus a prompt of typical length (source).

Stable channels (ids ending in -1k, -2k, -4k)

The same Google models on a dearer, steadier channel, fixed to the resolution in the name (nano-banana-pro-2k makes 1K and 2K). On these, an image refused for its content is still charged.

API idGoogle’s idResolutionsCredits per imagePrice per image
nano-banana-2-1kgemini-3.1-flash-image-preview1K60 credits$0.06
nano-banana-2-2kgemini-3.1-flash-image-preview2K90 credits$0.09
nano-banana-2-4kgemini-3.1-flash-image-preview4K130 credits$0.13
nano-banana-pro-1kgemini-3-pro-image-preview1K100 credits$0.1
nano-banana-pro-2kgemini-3-pro-image-preview1K, 2K100 credits$0.1
nano-banana-pro-4kgemini-3-pro-image-preview4K180 credits$0.18

Three steps to a first image

  1. Sign up and top up. The trial credits you get on sign-up do not work with Nano Banana.
  2. Create an API key in your account.
  3. Point the OpenAI SDK at https://api.cheapestimagen.com/v1 and pass a model id from the table.
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.1",
    prompt="a lighthouse on a cliff at dusk, oil painting",
    size="1024x1024",
    response_format="url",
)
print(image.data[0].url)
curl https://api.cheapestimagen.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "nano-banana-pro", "prompt": "a lighthouse on a cliff at dusk", "size": "1024x1024", "response_format": "url"}'

Every parameter is in the text-to-image guide and the API reference.

Edit an image

Send one or more reference images to /v1/images/edits: up to 16 images, 20 MB each. Masks are not supported yet.

curl https://api.cheapestimagen.com/v1/images/edits \
  -H "Authorization: Bearer YOUR_KEY" \
  -F model=nano-banana-2.1 \
  -F prompt="put the product on a marble table, soft daylight" \
  -F "image[]=@product.png" \
  -F response_format=url

Sizes and ratios

  • 1K, 2K and 4K cost the same. Pass size in pixels, for example 1024x1024 (1K, 1:1), 2048x1152 (2K, 16:9) or 3840x2160 (4K, 16:9). The full table is in the sizes guide.
  • Ratios: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 5:4, 4:5 and 21:9. Nano Banana 2 and 2.1 add the long formats 4:1, 1:4, 8:1 and 1:8.
  • Google decides the exact pixels of a Nano Banana image, so they can differ a little from the value you pass; the ratio and the resolution tier hold.
  • Images per request: up to 10 at 1K, 4 at 2K and 2 at 4K.

Limits and refunds

  • Each account may send 300 requests a minute and have 50 running at once; beyond that the API answers 429.
  • A failed or timed-out image is not charged. On nano-banana-2, nano-banana-2.1 and nano-banana-pro an image refused for its content is not charged either; on the stable channels it is.
  • Image links are kept for 72 hours.

Questions

How do I get a Nano Banana API key?

Sign up on Cheapest Imagen, top up, and create a key on the API keys page of your account. You need no Google account and no Gemini API key.

Is there a free Nano Banana API?

Not here. The trial credits you get on sign-up work with GPT Image 2, 2.5 and 2.6 only, on the site or through the API. Nano Banana starts at $0.012 per image after a top-up.

What is the Nano Banana API model name?

Here: nano-banana-2, nano-banana-2.1 and nano-banana-pro. On Google’s Gemini API they are gemini-3.1-flash-image-preview, gemini-nano-banana-2.1 and gemini-3-pro-image-preview.

How much does the Nano Banana API cost per image?

Nano Banana 2 and 2.1 cost 12 credits ($0.012) per image and Nano Banana Pro 20 credits ($0.02), the same at 1K, 2K and 4K.

Does it work with the OpenAI SDK?

Yes. Set base_url to https://api.cheapestimagen.com/v1, use your key from here, and pass a Nano Banana model id.

Which one should I use: 2, 2.1 or Pro?

See Nano Banana 2.1 vs Nano Banana Pro.

Make your first image now

5 free images when you sign up, then from $0.008 an image.

Generate an image

Sign in

New accounts get 5 free images.