Skip to main content

Nano Banana 2 online: fast Gemini image generation for $0.055 an image

Generate and edit images with Nano Banana 2 in your browser for $0.055 each: 512px to 4K, ratios up to 8:1 and up to 5 reference images. Pay per image.

BalancedPrice $0.055/ image512 / 1K / 2K / 4KEditing: Supported$0.1 for new users

Nano Banana 2 is Google’s Gemini 3.1 Flash Image model. On YingTu it costs $0.055 per image, handles text-to-image and edits with up to 5 reference images, and outputs 512px to 4K in ratios from 1:1 to 8:1. It is the default pick for everyday images, background swaps and multi-size assets.

0.5K to 4KImage editing
Model ID
gemini-3.1-flash-image
Price
$0.055/ image
Output sizes
512 / 1K / 2K / 4K
API format
Gemini native
Image editing
Supported
Aspect ratios
auto · 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 21:9 · 3:2 · 2:3 · 5:4 · 4:5 · 1:4 · 4:1 · 1:8 · 8:1

Key facts (as of October 5, 2026)

  • Nano Banana 2 is Google’s Gemini 3.1 Flash Image (model ID gemini-3.1-flash-image). Google offers it in the Gemini app and Google AI Studio; YingTu is an independent site that runs it through the LaoZhang API.
  • Price here: $0.055 per image from 512 px to 4K, with ratios from 1:8 to 8:1. No subscription; LaoZhang bills each image.
  • Measured time: median 14 s over 22 real generations on YingTu (fastest 11 s, slowest 19 s).
  • Edits: up to 5 reference images of up to 20 MB each.
  • New users who sign in with Gmail get $0.1 of credit: about 1 Nano Banana 2 image.

Ready-made prompts

Click one to open the image studio with that prompt and aspect ratio already set.

Product photo

4:5

A clean product photo of a matte ceramic coffee mug on a light stone table, soft window light, natural shadows, minimal styling.

Editorial landscape

16:9

An editorial travel photograph of a mountain lake at sunrise, layered atmospheric depth, natural color, fine detail.

Reference edit

auto

Preserve the main subject and composition. Replace the background with a quiet modern studio using soft directional daylight.

Made with Nano Banana 2 on YingTu

Real outputs from the prompt template library, each with its prompt and the time the request took. Open one to run the same prompt.

Pet action figure · Nano Banana 2
Pet action figure · 16 s
Prompt

Turn the pet in the reference image into a boxed collectible toy: matte vinyl finish, keeping its fur colors, markings and tongue-out expression. It sits in a clear bubble on cardboard printed with grass and bones, with a frisbee, a bone and a tiny dog bowl in the side compartments. The box reads "PARK HERO". White background, soft studio light, product photography.

Use this prompt
Pet Halloween costume · Nano Banana 2
Pet Halloween costume · 15 s
Prompt

Dress the pet in the reference image in a pumpkin Halloween costume: an orange pumpkin suit with a little green leaf hat. It sits on front steps covered in fallen leaves, next to small pumpkins and a basket of candy. Warm early-evening light, blurred string lights behind, keep the breed, fur colors and markings. A cute holiday photo.

Use this prompt
Photo to anime · Nano Banana 2
Photo to anime · 13 s
Prompt

Turn the reference photo into a Japanese anime illustration: clean line art, cel shading, large expressive eyes, keeping the short hair, denim jacket, white T-shirt and the pose by the window. Outside the window, a summer afternoon street with blue sky and clouds, bright and airy light. Keep the composition and expression of the original.

Use this prompt
Photo to sticker sheet · Nano Banana 2
Photo to sticker sheet · 13 s
Prompt

Turn the person in the reference image into a sheet of 6 chibi stickers: waving hello, making a heart, sipping coffee, listening with headphones, falling asleep on a desk and jumping for joy. Each sticker has a thick white die-cut border and a slight drop shadow, keeping the hairstyle, denim jacket and facial features. Light grey background, neat grid, flat cartoon style, high resolution.

Use this prompt
ID photo · Nano Banana 2
ID photo
Prompt

Make a standard ID photo of the person in the reference image: facing the camera, shoulders level, natural expression, dressed in a dark suit and white shirt with tidy hair. Plain blue background (#438EDB), even shadowless frontal light, a little space above the head, high resolution. Keep the face and features unchanged.

Use this prompt
White-background main image · Nano Banana 2
White-background main image
Prompt

Cut out the product from the reference image and make an e-commerce main image: pure white background (#FFFFFF), product centered at about 80% of the frame, front view slightly from above, with a soft natural shadow underneath. Fix perspective and white balance, remove clutter and glare, keep the shape, color and print unchanged, sharp and high resolution.

Use this prompt

Nano Banana 2 vs Nano Banana Pro: same prompt, same input

Four prompts run on both models on YingTu. One example each, so read them as examples, not a benchmark.

Explainer card

Asked for a simple children’s-book explainer. Pro kept it simple; Nano Banana 2 added a full leaf-anatomy diagram (labels spelled correctly) the prompt did not ask for.

Explainer card · Nano Banana Pro
Nano Banana Pro
Explainer card · Nano Banana 2
Nano Banana 2 · 18 s
Prompt

An explainer card about photosynthesis: a cross-section illustration of a leaf in the middle, with arrows showing sunlight, carbon dioxide and water going in, and oxygen and glucose coming out. Title at the top "How Do Plants Eat?", a one-line summary at the bottom. Fresh green palette, children's science book style, clear and accurate labels.

Isometric mini city

Both drew every element asked for. Nano Banana 2 added more detail and a wooden base; Pro stayed plainer.

Isometric mini city · Nano Banana Pro
Nano Banana Pro
Isometric mini city · Nano Banana 2
Nano Banana 2 · 13 s
Prompt

A 45° isometric miniature city block: an old train station with a clock tower in the middle, surrounded by a café, a bookshop, a small park and a tram, with people and bikes on the streets. Detailed 3D render, soft evening light, warm streetlights just turning on, plain light background, like a fine tabletop model.

Professional headshot

Both kept the person’s face; the two headshots are close.

Input (AI-generated)
Input (AI-generated)
Professional headshot · Nano Banana Pro
Nano Banana Pro
Professional headshot · Nano Banana 2
Nano Banana 2 · 14 s
Prompt

Turn the person in the reference image into a professional headshot: beige blazer, chest-up framing, body slightly angled and smiling at the camera. Blurred modern office background, soft key light from the left with a rim light, 85mm lens look, natural skin tones, same facial features. Suitable for LinkedIn and a résumé.

Restore & colorize old photos

The prompt says to keep every face exactly. Pro kept the woman’s dark hair; Nano Banana 2 turned it light auburn.

Input (AI-generated)
Input (AI-generated)
Restore & colorize old photos · Nano Banana Pro
Nano Banana Pro
Restore & colorize old photos · Nano Banana 2
Nano Banana 2 · 18 s
Prompt

Restore this old photo: remove scratches, creases, mold spots and noise, fill in missing areas, sharpen it, then colorize it naturally with period-accurate skin, clothing and background colors. Keep every face, expression, pose and the composition exactly the same, no beautifying, so it looks like it was shot on color film at the time.

Nano Banana 2, Nano Banana Pro or GPT Image 2?

ModelPricePick it when
Nano Banana 2$0.055Everyday images and edits when speed matters: median 14 s. It may add detail beyond the prompt.
Nano Banana Pro$0.09The result must stay faithful to a photo or a precise brief: restorations, a real person or product, complex scenes. Median 21 s.
GPT Image 2 VIP$0.03Exact pixel sizes, words in the image, or the lowest price of the three; the slowest at a median of 45 s.

Settings

Every setting here is available in the YingTu image studio, and new users get $0.1 free.

Best for

  • • Everyday image generation
  • • Reference edits and background swaps
  • • Several output sizes from one prompt

Before you use it

  • • Generation time varies with upstream load.
  • • Edit quality depends on the reference image and how clear the instruction is.
  • • Zoom in on text, logos, hands and small details before you use an image.
Image editing: Supported

API quickstart

Same request format as the image studio. Copy it and run.

Pythongemini-3.1-flash-image
import base64
import mimetypes
import os
import sys

import requests

API_KEY = os.environ.get("LAOZHANG_API_KEY")
if not API_KEY:
    raise RuntimeError("Set the LAOZHANG_API_KEY environment variable before running this example.")

API_URL = "https://api2.laozhang.ai/v1beta/models/gemini-3.1-flash-image:generateContent"
REQUEST_TIMEOUT_SECONDS = 500

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "contents": [{
        "parts": [
            {"text": "A clean product photo of a matte ceramic coffee mug on a light stone table, soft window light, natural shadows, minimal styling."}
        ]
    }],
    "generationConfig": {
        "responseModalities": ["IMAGE"],
        "imageConfig": {
            "imageSize": "2K"
        }
    }
}

try:
    response = requests.post(
        API_URL,
        headers=headers,
        json=payload,
        timeout=REQUEST_TIMEOUT_SECONDS,
    )
except requests.Timeout as error:
    print(
        "Request timed out after 500 seconds. The result status may be unknown; "
        "check call and billing logs before retrying.",
        file=sys.stderr,
    )
    raise SystemExit(1) from error

if response.status_code != 200:
    print(f"API error {response.status_code}: {response.text}", file=sys.stderr)
    raise SystemExit(1)

try:
    result = response.json()
except ValueError as error:
    print("API returned a non-JSON response.", file=sys.stderr)
    raise SystemExit(1) from error

if not isinstance(result, dict):
    print("API returned an unexpected JSON shape.", file=sys.stderr)
    raise SystemExit(1)

image_part = None
for candidate in result.get("candidates", []):
    for part in candidate.get("content", {}).get("parts", []):
        inline_data = part.get("inlineData") or part.get("inline_data")
        if inline_data and inline_data.get("data"):
            image_part = inline_data
            break
    if image_part:
        break

if not image_part:
    response_id = result.get("responseId", "not provided")
    print(f"No image data in response. responseId={response_id}", file=sys.stderr)
    raise SystemExit(1)

mime_type = image_part.get("mimeType") or image_part.get("mime_type") or "image/png"
encoded_image = image_part["data"]
if encoded_image.startswith("data:"):
    header, encoded_image = encoded_image.split(",", 1)
    mime_type = header[5:].split(";", 1)[0] or mime_type

extension_by_mime = {
    "image/jpeg": "jpg",
    "image/png": "png",
    "image/webp": "webp",
    "image/gif": "gif",
}
extension = extension_by_mime.get(mime_type, "bin")
output_path = f"output.{extension}"

with open(output_path, "wb") as output_file:
    output_file.write(base64.b64decode(encoded_image, validate=True))

print(f"Image saved: {output_path} ({mime_type})")

FAQ

Is this the official Nano Banana 2 website?

No. Nano Banana 2 is Google’s Gemini 3.1 Flash Image, offered by Google in the Gemini app and Google AI Studio. YingTu is an independent studio that calls the same model (gemini-3.1-flash-image) through the LaoZhang API and bills per image.

Is Nano Banana 2 free?

New users who sign in with Gmail get $0.1 here, about 1 Nano Banana 2 image (or 3 GPT Image 2 images). After that it is $0.055 per image with your own LaoZhang key.

How much does Nano Banana 2 cost?

$0.055 per image on YingTu, from 512 px to 4K, with no subscription. Nano Banana 2 Lite is $0.025 (1K only) and Nano Banana Pro $0.09.

Nano Banana 2 or Nano Banana Pro: which is better?

For most everyday images Nano Banana 2: it is cheaper and faster (median 14 s vs 21 s here). Pick Pro when the result must stay faithful to a photo or a precise brief; in the examples on this page Nano Banana 2 changed a restored face’s hair color and added detail to a simple explainer.

Can Nano Banana 2 edit photos?

Yes. Upload up to 5 reference images (20 MB each) and describe the change; it is the default model for the product photo tool.

What sizes and ratios does Nano Banana 2 support?

Output from 512 px to 4K, with ratios from 1:1 to wide and tall formats such as 21:9, 4:1 and 8:1.

Can I call Nano Banana 2 from my own code?

Yes. The code block on this page is the same LaoZhang API request the studio sends; the Nano Banana API page has cURL and Node.js versions.

How do I use Nano Banana 2 online?

Open the image studio with the button at the top of this page: Nano Banana 2 is already selected, so type a prompt and click Generate image. Sign in with Google first (Gmail accounts get $0.1) or paste a LaoZhang API key, add up to 5 reference images if you want an edit, and pick the size and ratio. Each image is billed on its own.

What is Nano Banana 2.1, and should I use it instead?

Nano Banana 2.1 (model ID gemini-nano-banana-2.1) is the newer Nano Banana model on YingTu and has been the studio default since October 9, 2026. It costs $0.045 per image, less than Nano Banana 2 at $0.055, with 1K, 2K and 4K output, the same ratios up to 8:1 and up to 5 reference images, but no 512 px draft size. The Nano Banana 2.1 page runs four of this page’s prompts on 2.1, Nano Banana 2 and Pro side by side; in those examples 2.1 stayed closer to the prompt and changed a restored photo the least.

Updated 2026-10-12