---
title: Nano Banana API — Google Gemini Image Edit API (Pro & 2)
description: Nano Banana API access — Google Gemini image generation and image-edit endpoints. Pro and Nano Banana 2 supported. REST API, free credits, $0.002 starting price.
url: https://modelslab.com/nano-banana-api
canonical: https://modelslab.com/nano-banana-api
type: website
component: Seo/NanoBananaApi
generated_at: 2026-07-01T04:01:37.029572Z
---

Imagen

Nano Banana API for Gemini Image Generation
---

Looking for a Nano Banana API for Google's Gemini image models? ModelsLab gives developers a production-ready REST endpoint for text-to-image, image editing, character consistency, and multi-image composition.

[Get Nano Banana API Key](https://modelslab.com/register) [API Documentation](https://docs.modelslab.com)

What is the Nano Banana API?
---

### Gemini image generation, exposed as a developer API

Nano Banana is Google's internal codename for the Gemini family of image generation models, including Gemini 2.5 Flash Image and Gemini 3 Pro Image. These models are designed for fast, high-quality text-to-image generation, precise image editing, and multi-image composition with strong character consistency across frames.

ModelsLab exposes Nano Banana through a single REST API so developers can ship Gemini-powered image generation inside SaaS products, internal tools, and content systems without provisioning Google Cloud, managing service accounts, or stitching together SDKs.

### What you can build with the Nano Banana API

The API supports the full creative surface of Gemini image generation: prompt-driven text-to-image, instruction-based editing, character and product consistency across multiple outputs, and multi-image composition where several reference images are combined into a single result.

- Text-to-image generation with detailed prompt control and high-fidelity outputs
- Image editing with natural-language instructions for object replacement, style change, and scene adjustment
- Character consistency across multiple generations for storyboards, product shots, and avatars
- Multi-image composition that merges two or more reference images into a single coherent scene
- Fast inference suitable for in-product features, batch pipelines, and real-time editor flows

Trusted by

![Google logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/669b27bc-f881-4e16-569d-4ce02f1bc000/768)

![Salesforce logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/8f7d9952-1dee-4108-f1e5-96ff77108e00/768)

![Amazon logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/b4d3bc1b-8c2b-4d98-7c87-ed162ccbf400/768)

![IBM logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/41bf250b-c933-4d8a-6355-07cf4a2fda00/768)

![Adobe logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/9eb124dd-95c4-4889-c838-faa0f6317000/768)

![Sony logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/2d67a30b-a490-4b96-ce1d-28d8371da300/768)

1B+

Images Processed Monthly

500K+

Active Developers

5K+

Discord Community Members

300+

Available AI APIs

Nano Banana API quick start
---

Generate and edit images with Gemini's Nano Banana model through a single REST endpoint.

### Python text-to-image

Python

```
<code>1import requests
2

3response = requests.post(
4    "https://modelslab.com/api/v7/images/text-to-image",
5    json={
6        "key": "YOUR_API_KEY",
7        "model_id": "nano-banana",
8        "prompt": "a product hero shot of a minimal ceramic coffee mug on a marble counter, soft daylight",
9        "width": 1024,
10        "height": 1024,
11        "samples": 1
12    }
13)
14

15print(response.json()["output"][0])</code>
```

### JavaScript image edit

JavaScript

```
<code>1const response = await fetch('https://modelslab.com/api/v7/images/image-to-image', {
2  method: 'POST',
3  headers: { 'Content-Type': 'application/json' },
4  body: JSON.stringify({
5    key: 'YOUR_API_KEY',
6    model_id: 'nano-banana',
7    prompt: 'replace the background with a sunlit kitchen, keep the product unchanged',
8    init_image: 'https://example.com/product.png',
9    width: 1024,
10    height: 1024,
11    samples: 1,
12  }),
13});
14

15const data = await response.json();
16console.log(data.output[0]);</code>
```

### cURL multi-image composition

bash

```
<code>1curl -X POST 'https://modelslab.com/api/v7/images/text-to-image' \
2  -H 'Content-Type: application/json' \
3  -d '{
4    "key": "YOUR_API_KEY",
5    "model_id": "nano-banana",
6    "prompt": "combine the model from image 1 wearing the jacket from image 2 in a studio setting",
7    "init_image": "https://example.com/model.png,https://example.com/jacket.png",
8    "width": 1024,
9    "height": 1024,
10    "samples": 1
11  }'</code>
```

Why developers want a Nano Banana API
---

Nano Banana is Google's internal name for Gemini image generation. Teams want a production-grade API surface for it without wiring up Google Cloud directly.

Text-to-image with Gemini quality Generate high-fidelity images from natural-language prompts using the Nano Banana model family, including Gemini 2.5 Flash Image and Gemini 3 Pro Image.

Instruction-based image editing Edit existing images with plain-language instructions. Replace objects, change scenes, swap backgrounds, or adjust style without writing prompt-engineering hacks.

Character and product consistency Keep the same character, product, or subject consistent across multiple generations. Useful for storyboards, ad variants, and avatar workflows.

Multi-image composition Pass two or more reference images and let the model compose a single coherent output, ideal for try-on, scene blending, and creative assembly use cases.

![Text-to-image with Gemini quality](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/8741a716-a81d-419a-c14f-88155af00c00/768)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/09738200-f1fc-442c-9852-7d6a9cd56d34.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/851c5561-3239-4915-a66b-46d58d6c377c.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/70d56252-0444-431d-82b9-ad15c260263e.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/7b9995d6-68e1-48ba-bc0c-8e3a8f824faf.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/878fc33a-be9d-4fef-a8a5-f2f9931cd1d3.jpg&quality=25)

Use the Nano Banana API to ship text-to-image, image editing, and multi-image composition inside your product without managing GPU infrastructure or vendor lock-in.

[Start Building](https://modelslab.com/register)

Nano Banana API comparison
---

See how ModelsLab's Nano Banana API compares to direct vendor access and other image API providers.

| Workflow factor | ModelsLab Nano Banana | Direct Google Cloud | Generic image API |
|---|---|---|---|
| Setup time | Minutes | Hours to days | Minutes |
| Auth and billing | Single API key | Service accounts and GCP project | Single API key |
| Image edit endpoint | Yes | Yes | Often limited |
| Multi-image composition | Yes | Yes | Often missing |
| Other image models on same API | Flux, SDXL, SD 1.5, custom | Gemini only | Varies |
| Image plus video plus audio plus LLM | Yes | Separate Google APIs | Usually no |
| Free tier to prototype | Yes | GCP credits only | Varies |

Comparison focuses on developer workflow, pricing fit, and platform breadth. Nano Banana is Google's internal codename for the Gemini 2.5 Flash Image and Gemini 3 Pro Image generation models.

How to integrate the Nano Banana API
---

A practical three-step path from sign-up to your first generated image.

STEP 01

STEP 01

### Step 1: Get your API key

Create a free ModelsLab account and generate an API key from the dashboard. No credit card is needed to test the Nano Banana endpoint.

STEP 02

STEP 02

### Step 2: Send your first request

POST a prompt to the text-to-image endpoint with model\_id set to nano-banana. Use Python, JavaScript, cURL, or any HTTP client.

STEP 03

STEP 03

### Step 3: Expand into editing and composition

Once basic generation works, switch to the image-to-image endpoint for edits, or pass multiple init images to compose scenes from references.

[Create Free Account ](https://modelslab.com/register)

### Nano Banana, Nano Banana 2, and Gemini 3 Pro Image

The Nano Banana name covers a sequence of Gemini image generation releases. The original Nano Banana corresponds to Gemini 2.5 Flash Image, focused on fast inference and strong editing fidelity. Nano Banana 2 and Gemini 3 Pro Image extend the family with sharper outputs, better text rendering inside images, and stronger multi-subject composition.

ModelsLab routes requests with model\_id set to nano-banana to the appropriate underlying Gemini image model so your integration stays stable as Google ships new versions. Developers do not need to track internal codenames or rewrite their requests when a new release lands.

### When the Nano Banana API is the right choice

Pick Nano Banana when your workflow needs precise instruction-based edits, strong character or product consistency across multiple outputs, or multi-image composition. It is a strong default for product photography variants, ad creative, storyboards, and on-brand content systems.

For raw stylistic exploration, photoreal portraits, or community LoRA usage, Flux and SDXL on the same ModelsLab API often pair well alongside Nano Banana. The advantage of using ModelsLab is that you can switch model\_id without changing the rest of your integration.

Why developers choose ModelsLab for Nano Banana
---

Key advantages that set us apart

Single REST endpoint for Gemini image generation

Text-to-image, image edit, and multi-image composition in one API

Strong character and product consistency across outputs

Stable model\_id that tracks new Nano Banana releases

Same API surface as Flux, SDXL, and custom image models

Free tier with no credit card to prototype

Connected to ModelsLab video, audio, and LLM APIs

Built for production SaaS, internal tools, and content systems

Our Popular Use Cases

Where the Nano Banana API fits well:

Product photography variantsAd creative at scaleStoryboards and character continuityVirtual try-on and compositionIn-product image editorsMarketing content systems

Generate on-brand product shots in different scenes, lighting, and angles while keeping the product itself consistent across every output.

![Product photography variants](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/0fbacb1a-6e34-4254-0a9d-5e75178cf200/768)

Related image API guides
---

[### Image Generation API

Core image API page covering the broader ModelsLab image stack and developer workflow.](https://modelslab.com/image-generation-api) [### GPT-4o Image Generation API

Alternative page for teams comparing OpenAI-style image workflows to a multi-model API.](https://modelslab.com/gpt-4o-image-generation-api) [### AI API Pricing

Pricing details for image, video, audio, and LLM endpoints across ModelsLab.](https://modelslab.com/pricing)

Nano Banana API FAQ
---

### What is Nano Banana?

Nano Banana is Google's internal codename for the Gemini family of image generation models, including Gemini 2.5 Flash Image and Gemini 3 Pro Image. It is built for text-to-image generation, instruction-based editing, character consistency, and multi-image composition.

### Does ModelsLab provide a Nano Banana API?

Yes. ModelsLab exposes Nano Banana through a single REST API. You can call it with model\_id set to nano-banana on the text-to-image and image-to-image endpoints, using a single API key without provisioning Google Cloud directly.

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

Nano Banana 2 is the next iteration in the Gemini image generation family, with sharper outputs, better in-image text rendering, and stronger multi-subject composition. ModelsLab routes the nano-banana model\_id to the appropriate underlying release so your integration stays stable across versions.

### How is the Nano Banana API priced?

Pricing follows the standard ModelsLab image API model with per-image and unlimited plan options. See the pricing page for current per-image rates and the unlimited plan tier. A free tier is available so you can prototype before committing to a paid plan.

### Can I edit existing images with the Nano Banana API?

Yes. Use the image-to-image endpoint with a natural-language instruction and one or more init images. Nano Banana supports object replacement, background swap, style change, and scene adjustment with strong fidelity to the input image.

### Does Nano Banana support multi-image composition?

Yes. You can pass multiple reference images and the model will compose them into a single coherent output. This is useful for virtual try-on, character plus product scenes, and creative assembly workflows.

### Is the Nano Banana API suitable for production use?

Yes. The endpoint runs on ModelsLab's production image API infrastructure with the same auth, rate limit, and reliability characteristics as the rest of the platform. It is suitable for SaaS products, internal tools, and content automation pipelines.

### How do I get started?

Sign up for a free ModelsLab account, generate an API key from the dashboard, and POST a prompt to the text-to-image endpoint with model\_id set to nano-banana. No Google Cloud setup is required.

Your Data is Secure: GDPR Compliant AI Services
---

![ModelsLab GDPR Compliance Certification Badge](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/28133112-07fe-4c1c-44eb-36948d51ae00/768)

AI Image API Pricing Starting at $0.0047 Per Image
---

ModelsLab offers a free tier with pay-as-you-go pricing, a Standard plan at $47/month for 10,000 API calls, and a Premium plan at $199/month with unlimited calls. All plans include access to Flux, SDXL, Stable Diffusion 3, and 10,000+ community models. Cancel anytime.

Coming Soon
---

We are making some changes to our pricing, please check back later.

Get Expert Support in Seconds

We're Here to Help.
---

Want to know more? You can email us anytime at <support@modelslab.com>

Chat with support[View Docs](https://docs.modelslab.com)


Explore Our Other Solutions
---

Unlock your creative potential and scale your business with ModelsLab's comprehensive suite of AI-powered solutions.

[Audio Gen

### AI Audio Generation

Text-to-speech, voice cloning, music generation, and audio processing APIs.

Explore Audio Gen](https://modelslab.com/audio-gen) [Video Fusion

### AI Video Generation & Tools

Create, edit, and enhance videos with AI-powered generation and transformation tools.

Explore Video Fusion](https://modelslab.com/video-generation) [Chat

### Engage Seamlessly with LLM

Access powerful language models for chatbots, content generation, and AI assistants.

Explore Chat](https://modelslab.com/custom-llm) [3D Verse

### Create Stunning 3D Models

Transform images and text into 3D models with advanced AI-powered generation.

Explore 3D Verse](https://modelslab.com/text-to-3d)

Plugins

Explore Plugins for Pro
---

Our plugins are designed to work with the most popular content creation software.

[Explore Plugins](https://modelslab.com/pro#plugins) [Learn More](https://modelslab.com/pro)

API

Build Apps with ModelsLab

ML

 API
---

Use our API to build apps, generate AI art, create videos, and produce audio with ease.

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

## Frequently Asked Questions

### What is Nano Banana API?
Nano Banana is the codename for Google's Gemini image generation and image-edit model. ModelsLab provides REST API access to Nano Banana Pro and Nano Banana 2 via the /api/v7/images endpoints — no separate Google Cloud setup, just a ModelsLab API key.

### How do I call Nano Banana through the API?
POST to /api/v7/images/text-to-image with model_id "nano-banana-pro" or "nano-banana-2". For image-edit use /api/v7/images/image-to-image with the same model_id and an init_image plus instruction prompt.

### Does ModelsLab support Nano Banana 2?
Yes. Both Nano Banana Pro and Nano Banana 2 are available. We push new versions to the API typically within 24–72 hours of Google publishing them on Vertex AI.

### How much does the Nano Banana API cost?
Per-image pricing matches the underlying Gemini API rates with a small margin, plus the ModelsLab unified-billing benefit. Pay-as-you-go starts around $0.005 per image; high-volume teams use the $29/month unlimited plan for predictable costs.

### What can Nano Banana do that other image APIs cannot?
Nano Banana excels at instruction-following image edits (e.g. "remove the person on the left", "make the sky sunset"), text rendering inside images, and consistent character generation across multiple frames. ModelsLab also supports SDXL and Flux for cases where Nano Banana is not the best fit.

### Is there a free tier to try Nano Banana?
Yes. The ModelsLab free tier (100 calls/day) covers Nano Banana Pro and Nano Banana 2 alongside the rest of the catalogue.

### Does Nano Banana support transparent backgrounds?
Yes. Nano Banana Pro can output PNG with transparent backgrounds — useful for product photography, sticker generation and design assets. Pass output_format=png and the API returns an alpha-channel image.

### Can Nano Banana keep the same character across multiple images?
Yes — character consistency is one of Nano Banana's strengths. Pass an input image as a reference and the model maintains face, outfit and style across new prompts. This is significantly stronger than SDXL or Flux for sequential storytelling and brand mascots.


---

*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-07-01*