Loading...
Loading...
Google's fast, low-cost image family for text-to-image generation and prompt-based editing of existing images.
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/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's editing capability is Google's gemini-2.5-flash-image taking source images instead of a blank canvas. We serve it at google/nano-banana/edit-image for $0.0312 per edited image — 20% below fal.ai — and it accepts a maximum of three reference images at 1K output. Before you write a line of integration code, one thing has to come first: Google retires this model on 2 October 2026.
Thirty-seven days, counted from the day this page went up. Existing pipelines keep running until then and our price does not move. But selling you an editor with a five-week clock on it would just buy you a rewrite in October.
Our price against the market, checked on August 26, 2026:
| API provider | Price per edit | vs. E2X |
|---|---|---|
| E2X | $0.0312 | — |
| fal.ai | $0.039 | we're 20% lower |
| Google Gemini API | $0.039 | we're 20% lower |
| OpenRouter | $0.039 | we're 20% 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.
Because Google does. When the company announced Nano Banana 2 Lite, it wrote:
"It's our recommended replacement for developers currently using our first version of Nano Banana (gemini-2.5-flash-image), you can swap it out now for immediate benefits."
Google's model documentation goes further, calling this one the legacy pioneer of the series and strongly recommending that customers transition. Vendors rarely push customers off a product they are still billing for. When they do, believe them.
No source image to work from? Then you want Nano Banana text-to-image instead — same model, same price, prompt only.
This is the number that separates the legacy editor from everything newer in the family. Google's guidance is explicit: for best results with Gemini 2.5 Flash Image, include a maximum of three images in an input.
Three is enough for a lot of real work. A subject, a background plate, a colour reference — that composite fits. What does not fit is the ad-style brief where a character, a product, props and a brand palette all land in one call. Nano Banana Pro takes fourteen references for exactly that job. Here you chain calls instead, paying for each hop, and every hop drifts further from your original.
Two more limits worth having in front of you before you design around this model:
Two fields are required: prompt and image_urls. Keep your key server-side.
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/edit-image",
"input": {
"prompt": "Change the wall behind the chair from white to deep olive. Keep the chair, the floor and the shadows exactly as they are.",
"image_urls": [
"https://example.com/interior.jpg"
],
"aspect_ratio": "4:5"
}
}'
Submitting returns a job ID. Poll until it resolves:
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/edit-image",
input: {
prompt: "Image 1 is the bicycle, image 2 is the location. Put the bicycle on the cobblestones in image 2, matching its overcast light.",
image_urls: [
"https://example.com/bike.jpg",
"https://example.com/street.jpg",
],
aspect_ratio: "1:1",
},
}),
}).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 || "Edit failed");
}
await new Promise((r) => setTimeout(r, 2000));
}
Statuses run pending → processing → completed, with failed and cancelled as terminal states. Pass a webhookUrl to skip polling entirely. Our default aspect_ratio is 9:16 — set it, or your landscape source comes back portrait. The live schema sits in this model's machine-readable spec.
Every editing model we run, priced per image:
| Model | Price / edit | Pick it when |
|---|---|---|
| Nano Banana 2 Lite | $0.0238 | The default answer — newer weights, lower bill |
| Nano Banana (legacy) | $0.0312 | Only while you finish migrating off it |
| Nano Banana 2 | $0.04 | Current-generation quality above the Lite tier |
| Nano Banana Pro | $0.075 | Fourteen references, legible text, 4K |
| GPT Image 2 | $0.0525 | Mask-based editing, or OpenAI's look |
Usually a migration is a trade: newer model, higher bill, sign-off required. Not this one. Nano Banana 2 Lite is 24% cheaper than the legacy editor and a generation ahead of it, which means the finance conversation and the engineering conversation both end the same way. Run a thousand edits a month and you keep about $9 while getting better output.
We would rather say that plainly than keep you on a slug we know expires. If your edits involve readable copy — packaging shots, menu boards, localised creative — climb past Lite to Nano Banana Pro, which is where Google put multilingual text rendering. Browse the rest in the image-to-image category or across our model catalog.
Good news about migrating: prompt discipline transfers intact, so anything you learn this week is not wasted.
Name the change, then name the constants. "Recolour the sofa to rust linen; leave the cushions, the rug pattern and the window light untouched" holds far better than a rewritten scene description. The instinct to describe the whole picture comes from text-to-image, and in an edit it competes with the reference until the model regenerates instead of adjusting.
When you send two or three images, say what each one is inside the prompt — nothing else tells the model your second attachment was a location and not a second subject. Resist stacking three changes into one call, too. Split them, chain the first output into the second, and you spend the same money with far less drift.
SynthID is always on. Google embeds its imperceptible watermark in every output, and there is no parameter at any provider to remove it. Settle that against client contracts before you build.
Leave resolution on 1k — this one costs money. Our schema carries the same resolution field across the whole Nano Banana family, so this endpoint will accept 2k and 4k from you without complaint. Google's weights will not honour them. gemini-2.5-flash-image outputs 1K and nothing above it, so a request sent at 4k is billed at our 2× multiplier — $0.0624 instead of $0.0312 — and hands back exactly the same 1K image you would have received for half the price. We would rather flag that than collect it. Newer tiers do have real resolution ladders: Nano Banana Pro genuinely renders up to 4096×4096.
Set a calendar reminder, not a backlog ticket. On 2 October 2026 the upstream model stops answering, and anything still pointed at this slug — a cron job, a customer-facing button, a nightly batch — fails that day. Changing one string now beats debugging it then.
Three at most. Google's own guidance for gemini-2.5-flash-image is to include a maximum of three images in an input, and quality degrades past that. For heavier composites, Nano Banana Pro handles up to fourteen references split across character, object and style roles.
Requests to google/nano-banana/edit-image stop succeeding, because Google is retiring the underlying weights everywhere, not just on our platform. No provider can keep serving a model the vendor has switched off. Move to Nano Banana 2 Lite before that date.
Yes — $0.0238 per edit against $0.0312 here, a 24% difference, on newer weights. Google frames it the same way, citing better quality, faster generation and lower pricing. It is the rare upgrade with no cost trade-off attached.
$0.0312 per edited image at the default 1k resolution, 20% under the $0.039 we recorded at fal.ai, Google's Gemini API and OpenRouter on August 26, 2026. Attaching one reference or three costs the same, but sending resolution: "4k" applies a 2× multiplier for output this model cannot actually produce — leave it on 1k. Re-check the live model page before committing a budget.
Not dependably. Advanced text rendering belongs to the Gemini 3 generation, and this model came before it, so edited words often come back distorted or reinterpreted. Nano Banana Pro is the tier built for legible, multilingual in-image text.
Yes. SynthID is embedded in every output from this model, exactly as it is in the text-to-image capability. It is Google's provenance marker and no provider offers a way to switch it off.
Same weights, same $0.0312 price, different input. Edit-image requires image_urls alongside your prompt and changes what you give it; text-to-image takes a prompt alone and builds from nothing. Pick by whether a source image already exists.