---
title: Nano Banana 2 Image Edit API — Gemini Image Editing
description: Edit images with Gemini Nano Banana 2 via REST API. Natural-language image editing, character consistency, multi-image composition. Free API key.
url: https://modelslab.com/nano-banana-2-image-edit
canonical: https://modelslab.com/nano-banana-2-image-edit
type: website
component: Seo/ModelPage
generated_at: 2026-05-02T18:45:59.749519Z
---

Available now on ModelsLab · Image Generation

Nano Banana 2 API — Gemini Image Editing
Google Gemini's image editing model via REST API. No GCP setup, free API key.
---

[Get Nano Banana 2 API key](/register) [API documentation](https://docs.modelslab.com)

![Nano Banana 2 API — Gemini Image Editing](https://assets.modelslab.ai/generations/37b36dd5-abb0-4198-9ab7-46204a8e730d.webp)

Why teams ship with Nano Banana 2
---

Nano Banana 2

### Google Gemini's image editing model

Nano Banana 2 is Google's newer image editing release in the Gemini family — sharper outputs, better text rendering inside images, and stronger multi-subject composition vs. the original Nano Banana.

Instruction-based edit

### Edit with natural language

Pass an existing image plus a plain-English instruction and the model performs the edit. No prompt-engineering hacks required: 'replace the background with a sunlit kitchen' just works.

Character consistency

### Keep subjects identical across edits

Generate variations of the same character, product, or scene without identity drift. Essential for storyboards, ad variants, and avatar workflows.

Multi-image composition

### Combine multiple reference images

Pass two or more init images and the model blends them into a single coherent output. Ideal for try-on, scene composition, and creative assembly use cases.

Single REST endpoint

### No GCP, no service accounts

One API key, one POST request. ModelsLab handles the GCP plumbing so your team ships features instead of provisioning infrastructure.

Resolution

### 1024px and 2048px outputs

Generate at 1024×1024 for fast iteration, scale up to 2048×2048 for hero assets. Pair with the Real-ESRGAN API for 4x super-resolution to print-ready dimensions.

Async support

### Webhook delivery for batch

Submit batches of edits and receive webhook callbacks as each completes. Perfect for catalog edits, bulk photo retouching, and marketing content pipelines.

Unified billing

### Same API key across modalities

Use Nano Banana 2 alongside the image, video, audio, and LLM APIs on a single dashboard, single bill, single API key.

Examples

Nano Banana 2 image edit examples
---

Copy any prompt below and try it yourself in the [playground](/register).

Lighting Transformation

“Change this daytime landscape to golden hour sunset lighting. Keep the mountains sharp and increase the warmth of the sky to deep orange and pink tones.”

Background Replacement

“Replace the background with a modern minimalist office space. Keep the person in the foreground sharp and well-lit, matching the new indoor lighting.”

Style Transfer

“Apply the cinematic color grading and film grain from this reference photo to the product image. Maintain all product details and proportions.”

Object Removal

“Remove the power lines from this architectural photograph. Fill the sky naturally while preserving the building's sharp details and original lighting.”

For Developers

A few lines of code.
Image editing in one POST
---

ModelsLab handles the infrastructure: fast inference, auto-scaling, and a developer-friendly API. No GPU management needed.

- **Serverless:** scales to zero, scales to millions
- **Pay per image,** no minimums
- **Python and JavaScript SDKs,** plus REST API

[API Documentation ](https://docs.modelslab.com)

PythonJavaScriptcURL

Copy

```
<code>import requests

response = requests.post(
    "https://modelslab.com/api/v7/images/image-to-image",
    json={
  "key": "YOUR_API_KEY",
  "prompt": "The girl in image 1 and the dog in image 2 together in same frame, in living room, sofa in the background",
  "init_image": "",
  "aspect_ratio": "1:1"
}
)
print(response.json())</code>
```

FAQ

Common questions about Nano Banana 2 API — Gemini Image Editing
---

[Read the docs ](https://docs.modelslab.com)

### What is the Nano Banana 2 API?

The Nano Banana 2 API is a REST endpoint that runs Google Gemini's image editing model on cloud GPU infrastructure. POST an image plus a natural-language instruction; receive an edited image as a hosted URL. No Google Cloud setup required.

### What is the difference between Nano Banana and Nano Banana 2?

Nano Banana 2 is the newer Gemini image release with sharper outputs, better text rendering inside images, and stronger multi-subject composition. The original Nano Banana (Gemini 2.5 Flash Image) is still available; Nano Banana 2 is the recommended upgrade for new integrations.

### How does instruction-based image editing work?

Pass an existing image URL and a plain-English instruction in your request. The model interprets the instruction and produces the edited image. Examples: 'replace the background with a kitchen', 'make the shirt blue', 'remove the person on the left', 'add cinematic lighting'.

### Can I keep a character consistent across multiple edits?

Yes. Pass the same source character image across multiple requests and the model preserves identity, clothing, and key features. This is one of the strongest capabilities in the Nano Banana family.

### Can I combine multiple reference images?

Yes. Pass two or more init_image URLs and a prompt describing how to combine them. The model produces a single coherent output. Common patterns: try-on (model + garment), scene composition (subject + background), creative assembly (style + content).

### What input formats does Nano Banana 2 accept?

JPEG, PNG, and WebP. Maximum input dimension is 4096×4096 pixels. Multi-image requests accept up to 4 reference images per call.

### How fast is the Nano Banana 2 API?

Single image edits typically complete in 4–8 seconds. Multi-image composition takes 8–12 seconds. There are no cold starts on the dedicated GPU pool.

### How much does Nano Banana 2 cost?

Pricing is per generation, starting at $0.01 per edit at 1024px and $0.02 per edit at 2048px. Multi-image composition is billed at $0.03 per output. No subscription required.

### Is the Nano Banana 2 API GDPR-compliant?

Yes. Source images, prompts, and generated outputs are processed in compliant regions and removed from infrastructure after delivery. A signed DPA is available for enterprise customers.

### Why use Nano Banana 2 via ModelsLab instead of going direct to Google Cloud?

Direct Google Cloud access requires a GCP project, service accounts, billing setup, and IAM configuration — typically days of engineering work. ModelsLab gives you a single API key and an unchanging endpoint URL. Same model, no GCP plumbing.

Ready to create?
---

Start generating with Nano Banana 2 API — Gemini Image Editing on ModelsLab.

[Get Nano Banana 2 API key](/register) [API documentation](https://docs.modelslab.com)

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-05-03*