Skip to main content
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.

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
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
Google logo
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
Google logo
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
Google logo
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
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
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])

JavaScript image edit

JavaScript
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]);

cURL multi-image composition

bash
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 }'

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
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result

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.

Nano Banana API comparison

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

Workflow factorModelsLab Nano BananaDirect Google CloudGeneric image API
Setup timeMinutesHours to daysMinutes
Auth and billingSingle API keyService accounts and GCP projectSingle API key
Image edit endpointYesYesOften limited
Multi-image compositionYesYesOften missing
Other image models on same APIFlux, SDXL, SD 1.5, customGemini onlyVaries
Image plus video plus audio plus LLMYesSeparate Google APIsUsually no
Free tier to prototypeYesGCP credits onlyVaries

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.

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:

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

Product photography variants

Nano Banana API FAQ

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.

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.

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.

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.

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.

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.

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.

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

GDPR Compliant

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

View Docs

Plugins

Explore Plugins for Pro

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

API

Build Apps with
ML
API

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