Loading...
Loading...
Second-generation Nano Banana models for image generation and prompt-based editing, with stronger prompt adherence than the original.
Sign in to run models
No output yet
Run the model to see generated results.
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/edit-image',
'input': {}
}
)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)Nano Banana 2 is Google's gemini-3.1-flash-image, and its editing capability is the workhorse of our image catalog. We expose it as google/nano-banana-2/edit-image, we charge $0.04 per edited image at the 1K default, and one request can carry up to fourteen source images. fal.ai lists the same model at $0.08.
No source image to work from? Then you want Nano Banana 2 text-to-image instead — same model, same price, prompt only.
Worth stating plainly, because provider catalogs have muddled it: this is not Nano Banana Pro. Pro is gemini-3-pro-image, roughly double the price at source. If another site's table shows "Nano Banana 2" with Pro's specs, check the Gemini model ID underneath.
Our pricing as of August 26, 2026:
| API provider | Price per edit (1K) | vs. E2X |
|---|---|---|
| E2X | $0.04 | — |
| fal.ai | $0.08 | we're 50% lower |
| WaveSpeed | $0.07 | we're 43% lower |
| Google Gemini API | $0.067 | we'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 what moves that number, in fixed steps:
| Resolution | Multiplier | Per edit | fal.ai |
|---|---|---|---|
| 1K (default) | ×1 | $0.04 | $0.08 |
| 2K | ×1.5 | $0.06 | $0.12 |
| 4K | ×2 | $0.08 | $0.16 |
Notice where that lands: a 4K edit from us costs what fal.ai charges for a 1K one. The machine-readable spec mirrors these values.
Google prices gemini-3.1-flash-image at exactly half of gemini-3-pro-image, and the capability difference is much smaller than the price difference. Editing makes that asymmetry even more favourable — you're transforming an image that already looks right, so the model has less to invent.
The parts that matter in a pipeline:
resolution parameter whatsoever — 1K is all it returns. If an edited asset has to go to print or a retina hero slot, Lite is out of the running.Median latency runs around 8.4 seconds. Function calling isn't supported, so an agent loop has to orchestrate this model from outside.
Two fields are required: prompt and image_urls. Keep your key server-side and post the job.
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/edit-image",
"input": {
"prompt": "Image 1 is the sneaker, image 2 is the surface reference. Put the sneaker on the wet concrete from image 2, matching its reflections. Do not alter the shoe or its logo.",
"image_urls": [
"https://example.com/sneaker.png",
"https://example.com/concrete.jpg"
],
"aspect_ratio": "1:1",
"resolution": "2k"
}
}'
Submitting returns a job ID. Poll until it settles:
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/edit-image",
input: {
prompt: "Change the season outside the window to deep winter. Keep the room, the furniture and the person exactly as they are.",
image_urls: ["https://example.com/interior.jpg"],
aspect_ratio: "3:2",
resolution: "1k",
},
}),
}).then((r) => r.json());
const jobId = submitted.data.jobId;
for (;;) {
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 ?? "Edit failed");
}
await new Promise((r) => setTimeout(r, 1500));
}
Statuses go pending → processing → completed, or land on failed / cancelled. Pass a webhookUrl in the submit body and we'll call you instead.
Schema details worth pinning: image_urls is an array even for one source, our aspect_ratio default is 9:16 rather than the source image's own ratio, and resolution values are lowercase. That default is the one that surprises people — feed in a landscape photo without setting it and a portrait crop comes back.
Nano Banana 2 is our default recommendation for editing, but it isn't the right answer for every job. Here's what else we run:
| Model | Price / edit | Pick it when |
|---|---|---|
| Nano Banana 2 | $0.04 | 2K/4K output, multi-reference composites, grounded edits |
| Nano Banana 2 Lite | $0.0238 | Bulk 1K edits, one instruction at a time |
| Nano Banana Pro | $0.075 | Rewriting text inside an image, strict identity across a set |
| Nano Banana (legacy) | $0.0312 | A pipeline you haven't migrated yet |
| GPT Image 2 | from $0.0525 | Mask-based editing, or you want OpenAI's look |
If your edits are background swaps and colour corrections at 1K, move to Nano Banana 2 Lite — around 40% cheaper, tied on text and reference consistency, and at volume that gap is the whole margin. Two reasons not to: Lite tops out at 1K forever, and it gets less reliable once a prompt asks it to place several objects correctly. That second failure is subtle, so test your own worst prompt rather than trusting a benchmark.
Go up to Nano Banana Pro when readable words inside the frame are the deliverable. Ignore the legacy row unless you're stuck on it: Google now classes gemini-2.5-flash-image as legacy and recommends Nano Banana 2 Lite instead — newer and cheaper at once. The rest sits in the image editing category and the wider model catalog.
The instinct carried over from generation is to describe the finished picture. In an edit that competes with the source, and you get a drifting re-render instead of the change you asked for.
Say what changes, then say what must not. Naming the protected regions is not optional — the model holds a face, a logo or a label far better when you tell it those are off limits.
Index your attachments in the prompt. "Image 1 is the subject, image 2 is a lighting reference only" is the model's only signal about intent; without it, attachment three becomes another subject to include.
Chained edits are where quality quietly leaks. Each pass re-encodes, and small identity drift compounds over four or five rounds. Collapse a sequence into one request with every reference attached — same $0.04 either way, and the single-pass result is usually cleaner.
Every edited output carries a SynthID watermark. Google applies it unconditionally, and no provider — us included — exposes a flag to disable it. If a contract prohibits AI-generated assets, settle that before writing the integration.
Watch your input quality. A soft, over-compressed source constrains the output whatever resolution you request; asking for 4K from a 600px JPEG buys an expensive upscale of the original's flaws.
Re-check aspect_ratio on every migration. Ours defaults to portrait, providers differ, and a silently reframed batch is the kind of bug you notice after publishing.
It's the editing capability of Google's gemini-3.1-flash-image model, exposed on our API as google/nano-banana-2/edit-image. You send one or more source images plus an instruction, and it returns a modified image at up to 4K.
Our 1K default is $0.04 per edited image; 2K is $0.06 and 4K is $0.08. Those were the prices at the August 26, 2026 check. Prices change, so confirm on the live model page before committing a budget.
Up to fourteen in a single call. There's no enforced role split between them — you tell the model in the prompt which attachment is the subject, which is a background, and which is style reference only.
Yes — our resolution enum accepts 1k, 2k and 4k, and a 4K edit costs $0.08. This is the main reason to choose it over Nano Banana 2 Lite, which has no resolution parameter and only ever returns 1K.
For the comparable on-demand prices we checked on that date, yes — $0.04 with us against $0.08 on fal.ai, a 50% saving on a like-for-like 1K request. Batch products, promotional rates and different plans aren't part of that comparison.
Yes. Every output includes a SynthID watermark, Google's imperceptible marker for AI-generated content. No provider offers a parameter to remove it.
Because our aspect_ratio default is 9:16, not the source image's ratio. Set aspect_ratio explicitly in every request — it's the single most common surprise when people port an editing pipeline over to us.
No. You submit a job and either poll /v1/jobs/{id} or supply a webhookUrl for a callback. Completed jobs expose the result at data.outputs[0].url; median model latency is around 8.4 seconds.