Nano Banana

Nano Banana API

Nano Banana is Google's Gemini Flash Image model. Generate and edit images with it through Puter.js — no API keys, no Google Cloud setup, no backend.

// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

puter.ai.txt2img("A futuristic city skyline at sunset, cinematic lighting", {
    model: "google/gemini-3-pro-image-preview"
}).then(image => {
    document.body.appendChild(image);
});
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.txt2img("A futuristic city skyline at sunset, cinematic lighting", {
            model: "google/gemini-3-pro-image-preview"
        }).then(image => {
            document.body.appendChild(image);
        });
    </script>
</body>
</html>

The Nano Banana API for Image Generation & Editing

Text-to-Image

Generate high-quality images from a text prompt with Google's fast Gemini image models.

Image Editing

Edit existing images with natural-language instructions — add, remove, or transform elements.

Multi-Image & Reference

Combine multiple reference images and keep characters consistent across generations.

Fast & High-Volume

The "Flash" line is optimized for speed, ideal for interactive editors and batch generation.

Aspect Ratios & Resolution

Generate across aspect ratios and resolutions up to 4K depending on the model variant.

No Keys, User-Pays

No Google Cloud account or API key — your users cover their own usage, free for you to ship.

Nano Banana Models Compared

Every Nano Banana model available through Puter.js, with per-image cost and output resolution. Click a model for full specs and examples.

ModelCost / ImageResolutionReleased
Gemini 3.1 Flash Image google/gemini-3.1-flash-image-preview $0.067 1K:1x1 Feb 2026
Gemini 3 Pro Image google/gemini-3-pro-image-preview $0.1351 1K:1x1 Dec 2025
Gemini 2.5 Flash Image google/gemini-2.5-flash-image $0.039 1x1 Apr 2025

Use Nano Banana in Seconds

Add Nano Banana to your app with just a few lines of code.
No API keys, no backend, no configuration required.

// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

puter.ai.txt2img("A futuristic city skyline at sunset, cinematic lighting", {
    model: "google/gemini-3-pro-image-preview"
}).then(image => {
    document.body.appendChild(image);
});
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.txt2img("A futuristic city skyline at sunset, cinematic lighting", {
            model: "google/gemini-3-pro-image-preview"
        }).then(image => {
            document.body.appendChild(image);
        });
    </script>
</body>
</html>

View full documentation →

Frequently Asked Questions

What is the Nano Banana API?

The Nano Banana API lets you generate images from text prompts using Google's Gemini Flash Image models — nicknamed Nano Banana — built for fast, high-quality image generation and editing — including Gemini 3 Pro Image — through Puter.js, with no API keys and no backend.

Is the Nano Banana API free?

Yes, it is free for you as the developer when you use it through Puter.js. With the User-Pays model, each of your users covers their own usage through their Puter account, so you can ship Nano Banana-powered apps at no cost to you.

Which Nano Banana model should I use?

Start with Gemini 3 Pro Image as your default. Lighter or faster variants trade some quality for speed and cost — compare them in the table above and pick the one that fits your use case.

Can I edit images or do image-to-image?

Many Nano Banana models support image editing and image-to-image generation alongside text-to-image. See the Puter.js documentation for what each model supports.

How much does Nano Banana cost?

Gemini 3 Pro Image costs about $0.1351 per image at the API level. Through Puter.js it is free for you as the developer — your users cover their own usage under the User-Pays model, with no per-image billing or keys to manage.

Do I need an API key?

No. Puter.js handles authentication and infrastructure for you, so you can use the Nano Banana API without any API key, an Google account, a server, or any configuration.

Does it work with React / Vue / Vanilla JS / Node / etc.?

Yes — the Nano Banana API through Puter.js works with any JavaScript framework, Node.js, or plain HTML. Just include the library and start building.