Generate imagesLarge Language ModelsVisual Effects

Nano Banana Pro API: Pricing, Python Example and Endpoint

Nano Banana Pro costs $0.134 per 1K or 2K image and $0.24 per 4K image on Google's API, with batch mode at half price. This article lays out the pricing, the REST endpoints for Gemini and Replicate, working Python code, and monthly budget tables for real projects.

Nano Banana Pro API: Pricing, Python Example and Endpoint
Cristian Da Conceicao
Founder of Picasso IA

If you are about to wire Nano Banana Pro into an app, three questions show up before any code gets written: what does one image cost, which endpoint do you call, and what does a working Python script look like? This article answers all three. The numbers come from Google's own pricing page, the requests are ready to paste into a terminal, and the budget tables show what a thousand images really cost once retries are counted. Nano Banana Pro renders at 1K, 2K or 4K and accepts up to 14 reference images per request. Reaching it through an API takes about fifteen minutes. Keeping the bill predictable takes a bit more thought, so that is where most of this article goes.

๐Ÿ’ก Short answer: Google lists $0.134 per 1K or 2K image and $0.24 per 4K image. Batch mode cuts both in half. Replicate and fal.ai are reported at around $0.18 per image. Check current rates before you commit a budget, because providers adjust them.

What the API Actually Is

Nano Banana Pro is the public name. In Google's developer documentation the model is called Gemini 3 Pro Image, and the identifier you pass in Gemini API code samples is gemini-3-pro-image-preview. Replicate hosts the same model as google/nano-banana-pro. Three names for one model family, and the mismatch trips up almost everyone on the first afternoon.

An API earns its place when images are produced by software instead of by a person: a store that renders a lifestyle shot for every new product, a newsletter that needs a header each morning, or an app that lets users restyle their own photos. For a handful of one-off images, a browser is faster and costs nothing in engineering time.

One Model, Several Names

Where you call itName you useBest for
Gemini APIgemini-3-pro-image-previewLowest list price, batch mode
Replicategoogle/nano-banana-proOne account for many models, simple REST
PicassoIANano Banana Pro model pageTrying prompts in a browser, no code

What One Request Can Do

Every request can combine these controls:

  • Resolution: 1K, 2K or 4K output.
  • Reference images: up to 14 images sent alongside the prompt to steer style, subject or composition.
  • Aspect ratio: presets such as 1:1, 4:3, 3:2, 16:9, 9:16 and 21:9.
  • Output format: JPG or PNG on the Replicate schema.
  • Safety filter level: three settings, from strict to permissive. Some prompts are still blocked on the most permissive one.

A photographer holding a sharp printed landscape above a laptop

Nano Banana Pro API Pricing

Pricing is where the providers diverge most, so here are the figures one source at a time.

Official Google Rates

ItemStandardBatch
1K or 2K image$0.134$0.067
4K image$0.24$0.12
Reference image inputabout $0.0011 eachabout $0.0006 each

Prompt text is billed separately at $2.00 per million input tokens. A 150-token prompt therefore costs roughly $0.0003, which is noise next to the image itself. The real spend is the output image, and resolution is the biggest lever you control: a 4K render costs about 79 percent more than a 2K one.

Because 1K and 2K share a price, the sensible rule is simple. Use 1K for drafts, thumbnails and prompt testing, where speed matters more than pixels. Use 2K for blog headers and web pages, since you pay nothing extra for the added detail. Reserve 4K for print, large displays or images you plan to crop hard, because that is the only tier where the price actually moves.

๐Ÿ’ก The model identifier still carries the word "preview". Google can change names, limits and prices on preview models, so read the pricing page the day you plan a launch.

Flat lay of a calculator, receipts and coins on an oak table

Batch Pricing Halves the Bill

Batch jobs cost exactly half of the standard rate: $0.067 instead of $0.134 at 1K or 2K, and $0.12 instead of $0.24 at 4K. The trade is speed. You submit a file of requests, Google processes it when capacity allows, and you collect the results later. That fits catalogs, nightly refreshes and archive work. It does not fit a button a customer is waiting on.

A worked example makes the gap concrete. Rendering 2,000 product shots at 2K costs $268.00 on the standard tier and $134.00 in batch. Same model, same output, $134.00 saved for agreeing to wait.

Rows of printed product photographs arranged on a long studio table

Replicate and fal.ai Markups

Third-party price trackers report about $0.18 per image on both Replicate and fal.ai. Against Google's $0.134 that is roughly 34 percent more per image. You pay it for convenience: no Google Cloud project, one token for hundreds of models, and a uniform predictions API. Check the model page on each platform before you budget, since only the Google figures above come straight from the vendor's own page.

What Monthly Budgets Look Like

Three Realistic Scenarios

These rows use Google's list prices.

ScenarioImages per monthSetupCost per imageMonthly cost
Solo blog with hero images302K, standard$0.134$4.02
Online store, product shots2,0002K, batch$0.067$134.00
Print studio, large posters5004K, standard$0.24$120.00
Same studio, nightly queue5004K, batch$0.12$60.00

The studio rows are the instructive pair. The nightly queue costs half as much, so the only question is whether anyone needs the poster this minute.

To price your own project, multiply expected images per month by the rate for your tier, then divide by your keep rate. A shop that expects to keep 4 of every 5 renders and needs 1,000 usable 2K images should budget for 1,250 renders, or about $167.50 at the standard rate.

Retries Add a Hidden Cost

Nobody keeps every render. If you keep four of every five images, each kept image costs $0.134 รท 0.8 = $0.1675 at 2K and $0.30 at 4K. Most retries come from vague prompts, not from blocked ones, which means the cheapest fix is better writing rather than a bigger budget. Three habits shrink the number:

  • Test at 1K first. Results return faster, and you rerun only the winners at 4K.
  • Cache by request. Hash the prompt plus parameters so an identical call never bills twice.
  • Log every call. A running cost total per project catches a runaway loop before the invoice does.

A business owner reviewing a printed spreadsheet at a cafe table

The Endpoint, Step by Step

Google's Gemini API Endpoint

The REST route follows Google's standard pattern:

POST https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent

Authenticate with the credential you create in Google AI Studio, passed in a request header as the Gemini API reference describes. The body carries the prompt and an image configuration:

{
  "contents": [{"parts": [{"text": "A ceramic mug on a walnut desk at sunrise, 85mm lens, soft window light"}]}],
  "generationConfig": {
    "responseModalities": ["TEXT", "IMAGE"],
    "imageConfig": {"aspectRatio": "16:9", "imageSize": "2K"}
  }
}

The response arrives as base64 text inside the image part, so you decode it before writing a file. Google's current docs also show a newer interactions-style call whose model name drops the "preview" suffix. Names in this family have changed before, so confirm the exact string in the docs before you ship.

Replicate's REST Endpoint

Replicate uses a predictions route per model:

curl -s -X POST \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Prefer: wait" \
  -d '{"input": {"prompt": "A ceramic mug on a walnut desk at sunrise, 85mm lens, soft window light", "aspect_ratio": "16:9", "resolution": "2K", "output_format": "jpg"}}' \
  https://api.replicate.com/v1/models/google/nano-banana-pro/predictions

The Prefer: wait header keeps the connection open for a synchronous answer. Without it you receive a prediction object and poll the address in urls.get until the status reads succeeded. The finished prediction's output field holds the image URL. Download the file and store it yourself rather than linking to it.

Blue ethernet cables plugged into a patch panel in a server closet

Python Example That Runs

Gemini SDK Version

Install the packages with pip install google-genai pillow, then run:

from google import genai
from google.genai import types

client = genai.Client()  # reads your Gemini credential from the environment

response = client.models.generate_content(
    model="gemini-3-pro-image-preview",
    contents="A ceramic mug on a walnut desk at sunrise, 85mm lens, soft window light",
    config=types.GenerateContentConfig(
        response_modalities=["TEXT", "IMAGE"],
        image_config=types.ImageConfig(aspect_ratio="16:9", image_size="2K"),
    ),
)

for part in response.parts:
    if part.inline_data is not None:
        part.as_image().save("mug.png")
    elif part.text:
        print(part.text)

Google's docs ask for an uppercase K in image_size, so write "2K" and not "2k". The loop matters too: the model can return text next to the image, and a blocked prompt returns text with no image at all.

Replicate Client Version

import replicate

output = replicate.run(
    "google/nano-banana-pro",
    input={
        "prompt": "A ceramic mug on a walnut desk at sunrise, 85mm lens, soft window light",
        "aspect_ratio": "16:9",
        "resolution": "2K",
        "output_format": "jpg",
        "safety_filter_level": "block_only_high",
    },
)

with open("mug.jpg", "wb") as f:
    f.write(output.read())

Install it with pip install replicate and set REPLICATE_API_TOKEN in your environment. To edit an existing photo, add image_input with a list of public image URLs (up to 14) and describe the change in the prompt:

input={
    "prompt": "Place the mug from the first image on the desk from the second image",
    "image_input": [
        "https://example.com/mug.jpg",
        "https://example.com/desk.jpg",
    ],
    "aspect_ratio": "match_input_image",
}

Three production details save debugging time:

  • Timeouts: PicassoIA's example gallery for this model lists about 18 seconds for a 1K render and 113 seconds for one 2K render. Set client timeouts to at least three minutes.
  • Rate limits: retry HTTP 429 responses with exponential backoff, and cap the attempts.
  • Cost tracking: add the list price after every successful call.
PRICE = {"1K": 0.134, "2K": 0.134, "4K": 0.24}

def add_cost(total: float, resolution: str) -> float:
    return round(total + PRICE[resolution], 4)

A developer typing code at a desk with a wide monitor behind

Use Nano Banana Pro on PicassoIA

Not every job needs code. The Nano Banana Pro page on PicassoIA runs the model in a browser, and the page describes it as free to try with no coding. PicassoIA also runs a developer API at api.picassoia.com/v1, but it serves in-house models such as PicassoIA Image and PicassoIA Image Editor Pro, not Nano Banana Pro. For Nano Banana Pro through code, use Google or Replicate as shown above.

  1. Open the model page and write the prompt in plain language: subject, lens, light and mood.
  2. Choose an aspect ratio. Use 16:9 for banners, 9:16 for stories and 1:1 for avatars.
  3. Select the resolution. 2K is the default, and 4K suits print.
  4. Add reference images if you have them, up to 14.
  5. Pick JPG or PNG and set the safety filter level.
  6. Generate, then change a few words and compare variations before you keep one.

A designer browsing photographs on a tablet in a bright loft studio

Settings That Matter

SettingOptionsDefault
Aspect ratiomatch_input_image, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9match_input_image
Resolution1K, 2K, 4K2K
Output formatjpg, pngjpg
Safety filterblock_low_and_above, block_medium_and_above, block_only_highblock_only_high

๐Ÿ’ก With the default aspect ratio, the output follows your first reference image. Set a ratio by hand when you generate from text alone.

Reference Images Without Code

Reference images are the feature that separates this model from a plain text-to-image tool. Feed it a product photo, a mood board or a face you want to keep consistent, then describe the change in one sentence. The model keeps the visual context and applies your edit. The same 14-image limit applies in the browser and in the API.

More references do not always mean better results. Start with two or three, name the role of each one in the prompt ("use the lighting from the second image"), and keep the lighting consistent across the set. Add more only when the output drifts from the look you want.

Hands pinning a printed photograph onto a cork board of references

When a Cheaper Model Wins

Nano Banana Pro is the right pick for 4K output and heavy reference work. Drafts, thumbnails and bulk filler rarely need that ceiling.

Quick Model Comparison

ModelPick it when
Nano Banana ProYou need up to 4K and up to 14 reference images
Nano Banana 2 LiteYou want quick drafts from the same family
Seedream 5 ProYou want sharp 2K stills
GPT Image 2You want plain prompts turned into images
Flux 2 ProYou work from text or from photos
Imagen 4 FastYou need images in seconds

Draft Prompts With an LLM

A short brief produces a vague image, and a vague image produces a retry. Ask a language model to expand the brief first. Gemini 3.5 Flash is fast enough for bulk work, and Claude Sonnet 5 handles longer instructions well. A useful instruction looks like this:

Rewrite this brief as one image prompt of 60 words. Name the subject, the camera angle, the lens, the light direction and one surface texture. No text inside the image.

Run the expanded prompt at 1K, keep the winner and only then pay for 4K. That one habit, a language model for the prompt and a cheap tier for the test, removes most of the wasted renders from a typical month.

Three camera lenses lined up on a maple table beside a notebook

Make Your First Image Today

You now have the three things the API pages bury: the rates, the endpoints and a script that runs. The fastest way to check whether Nano Banana Pro fits your project is to spend ten minutes with it before spending a cent. Open the Nano Banana Pro page on Picasso IA, paste a prompt from this article, switch between 1K and 4K, and add a reference image or two. Then take the winning prompt into your Python script. Experiment with the settings, compare the results side by side and let the budget table decide where the code goes.

Share this article