Back to Models

Nano Banana 2

Second-generation Nano Banana models for image generation and prompt-based editing, with stronger prompt adherence than the original.

Defaultfrom$0.04Image Editingfrom$0.04
Pricingstarting $0.04/request
Latency~30 seconds average
Resolution1K/2K/4K
Best fortext to image, Improved, Balanced

Parameters

Estimated Cost

You save 50% on this model
Base cost per request$0.08
Discount-50%
Your Total$0.04
You save $0.04 per request

Sign in to run models

Output Preview

Ready

No output yet

Run the model to see generated results.

Sample Output

API Example— Current Parameters

generate.py
import requests

result = requests.post(
    'https://api.e2x.ai/v1/jobs/submit',
    headers={
        'Authorization': f'Bearer {API_KEY}',
        'Content-Type': 'application/json'
    },
    json={
  'model': 'google/nano-banana-2',
  'input': {}
}
)

Get Job— Poll for result

get_job.py
import time

job_id = result.json()['jobId']

while True:
    response = requests.get(
        f'https://api.e2x.ai/v1/jobs/{'{job_id}'}',
        headers={'Authorization': f'Bearer {'{API_KEY}'}'}
    )
    data = response.json()['data']

    if data['status'] == 'completed':
        print('Done!', data['outputs'][0]['url'])
        break
    elif data['status'] == 'failed':
        raise Exception(f"Job failed: {'{'}data['error']['message']{'}'}")

    time.sleep(2)
Explore Alternatives

Related Models

Discover more AI models in this category

View all models

Nano Banana 2 Text-to-Image API on E2X

Nano Banana 2 is Google's gemini-3.1-flash-image, and it is the tier we point most people at first. We expose it as google/nano-banana-2 — the bare slug, no capability suffix — and we charge $0.04 per generated image at our 1K default. That is half of fal.ai's price for the same request, and it buys you a model that renders legible in-image text, accepts fourteen references, and goes all the way to 4K.

Already have a picture you want altered rather than replaced? Nano Banana 2 edit-image is the same weights at the same price, with an image_urls field bolted on.

One naming warning before the numbers. Nano Banana 2 is not Nano Banana Pro. Pro is gemini-3-pro-image, a separate and pricier model, and some catalogs — fal.ai among them — have labelled it "Nano Banana 2" on individual pages. Compare the Gemini model ID, not the marketing name.

Here is where our price sat when we last checked it on August 26, 2026:

API providerPrice per image (1K)vs. E2X
E2X$0.04—
fal.ai$0.08we're 50% lower
WaveSpeed$0.07we're 43% lower
Google Gemini API$0.067we're 40% lower

Prices and product terms can change. Check each provider's current pricing before making a purchasing decision. Google Batch or Flex pricing is not directly equivalent to a standard on-demand API request because scheduling, availability, and processing conditions differ; it is therefore excluded from this comparison. This is a scoped comparison, not a claim that E2X is the world's cheapest option in every configuration.

resolution is the one billing factor, and the ladder is fixed:

ResolutionMultiplierOur pricefal.ai
1K (default)×1$0.04$0.08
2K×1.5$0.06$0.12
4K×2$0.08$0.16

We stay 50% under fal.ai on every rung — 4K included. The same numbers sit in the machine-readable spec with the rest of the schema.

The price-per-quality argument for this tier

Google's own list prices tell the story: Nano Banana 2 costs $0.067, Nano Banana Pro costs $0.134. Exactly double. The quality gap is nowhere near 2×.

That's the trade. Pro keeps an edge on dense typographic layouts and elaborate composites; you halve the bill on every call, and for most product work the difference never reaches the viewer. What you keep at this tier matters more than what you lose:

  • Fourteen reference images per request. No enforced role buckets — mix subjects and mood boards in one call and label them in the prompt.
  • Four resolution rungs. Google runs this model from 0.5K through 4K; our resolution enum exposes 1k, 2k and 4k. That's the largest gap against its Lite sibling, which has no resolution parameter at all — 1K is the only thing it produces.
  • Thinking mode is on. Like every Gemini 3 model, it reasons about the composition before it paints. That's where the ~8.4-second median latency goes.
  • Google Search grounding, including Image Search. Ask for a real landmark or a real uniform and it can go look rather than hallucinate a plausible shape.

Google's model also supports ultra-wide framings Pro doesn't offer — 1:4, 4:1, 1:8, 8:1. Our aspect_ratio enum currently covers the ten standard ratios from 1:1 through 21:9, so check the live spec before building a banner pipeline on an ultra-wide value.

One hard limit: function calling is unsupported. Don't design a tool-use loop around it.

API request: prompt in, image out

Create a key in your dashboard, keep it on your server, and post to our submit endpoint. prompt is the only required field.

curl -X POST https://api.e2x.ai/v1/jobs/submit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/nano-banana-2",
    "input": {
      "prompt": "A hand-lettered chalkboard menu outside a Lisbon bakery, warm late-afternoon light, the words PASTEL DE NATA 1,20 EUR clearly legible",
      "aspect_ratio": "4:5",
      "resolution": "2k"
    }
  }'

We return a job ID. Poll it, or hand us a webhook and stop polling:

const headers = {
  Authorization: `Bearer ${process.env.E2X_API_KEY}`,
  "Content-Type": "application/json",
};

const submitted = await fetch("https://api.e2x.ai/v1/jobs/submit", {
  method: "POST",
  headers,
  body: JSON.stringify({
    model: "google/nano-banana-2",
    input: {
      prompt: "Isometric cutaway of a small hydroponic greenhouse, labelled tanks and pipes, technical illustration style",
      aspect_ratio: "16:9",
      resolution: "1k",
    },
  }),
}).then((r) => r.json());

const jobId = submitted.data.jobId;

while (true) {
  const job = await fetch(`https://api.e2x.ai/v1/jobs/${jobId}`, { headers })
    .then((r) => r.json());
  if (job.data.status === "completed") {
    console.log(job.data.outputs[0].url);
    break;
  }
  if (job.data.status === "failed") {
    throw new Error(job.data.error?.message ?? "Generation failed");
  }
  await new Promise((r) => setTimeout(r, 1500));
}

Status moves pending → processing → completed, or stops at failed or cancelled. Send a webhookUrl if you'd rather be called back.

Two schema details catch people out. Our aspect_ratio default is 9:16, not 1:1 — portrait, because that's what most of our traffic wants. And resolution values are lowercase: 1k, 2k, 4k.

Choosing between our Nano Banana models

Nano Banana 2 is the middle of our range, which means it is the wrong choice in both directions for some workloads. The honest map:

ModelPrice / imagePick it when
Nano Banana 2$0.042K or 4K output, mixed references, grounded subjects
Nano Banana 2 Lite$0.0238High volume, 1K is fine, one subject per prompt
Nano Banana Pro$0.075Dense typography, strict character consistency
Nano Banana (legacy)$0.0312An integration you haven't migrated yet
GPT Image 2from $0.0525You prefer OpenAI's aesthetic

Start with the Lite row, because it's the one that will actually save you money. Nano Banana 2 Lite costs about 40% less, runs roughly 2.7× faster, and ties this model on legible text and reference consistency in head-to-head testing. What you give up is narrow but real: 1K only, no search grounding, and weaker instruction-following once a prompt juggles several objects. Single subject at social resolution? Take Lite and keep the difference.

Go up to Pro when the deliverable is a poster full of words, or a campaign where one face has to survive twenty images. Skip the legacy row — Google itself now calls gemini-2.5-flash-image legacy and recommends Nano Banana 2 Lite instead for better quality, faster speeds and lower cost. That migration is free money. The rest of the range sits in the text-to-image category and the full model catalog.

Getting more out of the prompt

Thinking mode changes how you should write. The model reasons before it renders, so it rewards stated intent over piled-up adjectives — "a recruitment poster that has to read from three metres away" steers it better than fifteen style tokens.

Quote any text you want rendered, exactly as it should appear, punctuation and casing included. Vague instructions produce decorative squiggles at any tier.

When a subject exists in the real world, name it. Grounding only helps if the model knows to reach for it. And be blunt about layout: tall and ultra-wide framings drift toward centred subjects unless you say where things sit.

Before you ship

Every image carries a SynthID watermark. Google's imperceptible provenance marker, applied without exception, and no provider — us included — has a switch to disable it. If a client contract forbids watermarked assets, resolve that before you integrate.

Budget latency around ~8.4 seconds of median model time, not the sub-second response of a small diffusion model. Thinking costs wall clock. Our job ETA sits at 30 seconds to absorb queueing and 4K renders.

Pin resolution explicitly in code. Defaults don't match across providers, and you'd rather find that in a diff than on an invoice.

Frequently asked questions

What is Nano Banana 2?

Nano Banana 2 is the product name for Google's gemini-3.1-flash-image, the current flash-tier model in the Nano Banana family. It generates images from text, accepts up to fourteen references, renders legible in-image text, and outputs up to 4K.

How much does Nano Banana 2 cost on E2X?

We charge $0.04 per generated image at our 1K default, $0.06 at 2K and $0.08 at 4K, checked on August 26, 2026. Pricing moves — confirm on the live model page before you budget against it.

Is Nano Banana 2 the same thing as Nano Banana Pro?

No. Nano Banana 2 is gemini-3.1-flash-image; Pro is gemini-3-pro-image, a separate model at roughly double the list price. Some catalogs have mislabelled Pro as "Nano Banana 2", so verify the Gemini model ID when comparing specs.

Should I use Nano Banana 2 or Nano Banana 2 Lite?

Use Lite when 1K is enough and your prompts describe a single clear subject — about 40% cheaper and roughly 2.7× faster. Use Nano Banana 2 for 2K or 4K, for prompts that must place several objects correctly, or when you want Google Search grounding, which Lite lacks.

Do Nano Banana 2 images have a watermark?

Yes. Every output carries a SynthID watermark, Google's imperceptible marker for AI-generated content. There is no parameter on any provider to switch it off, ourselves included.

Does the model support function calling?

No. Nano Banana 2 does not support function calling, so don't design a tool-use loop around it. It does support thinking mode and Google Search grounding, including Image Search.

How long does one generation take?

Median model latency measures around 8.4 seconds; we set the job ETA at 30 seconds to cover queueing and larger renders. The API is asynchronous — submit a job, then poll /v1/jobs/{id} or supply a webhookUrl.