Skillsnanobanana
N

nanobanana

Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro). Supports text-to-image, image editing, various aspect ratios, and high-resolution output (2K/4K). Use when user wants to generate images, create images, use Gemini image generation, or do AI image generation.

Nano Banana - AI Image Generation and Editing Powered by Gemini 3 Pro Image

Skill Overview

Nano Banana is an AI skill that calls Google's Gemini 3 Pro Image model (Nano Banana Pro). It supports text-to-image generation, natural-language editing of existing images, multiple aspect ratios, and high-definition output of up to 4K.

Use Cases

  1. Creating Blog and Marketing Images: Enter a description such as “a cozy coffee shop interior, warm lighting, vintage style” to directly generate ready-to-use images, allowing content creators to work without switching design tools.
  2. Natural-Language Editing of Existing Images: Upload a product image or photo and use instructions such as “change the background to blue” or “add flying cars” to replace backgrounds, change styles, and add or remove elements. This is ideal for iterating on e-commerce product images.
  3. Batch Generation of Assets and Logos: Use batch scripts to generate 10–20 pixel-art logos, game assets, or exploratory concepts with a consistent style in one go. It also supports various aspect ratios, including 21:9 widescreen and 9:16 portrait formats.

Core Features

  1. Text-to-Image Generation and Image Editing: Generate an image from text with a single command (generate.py "prompt" -o output.png), or use the -i parameter to edit an existing image with natural-language instructions. Supported operations include style transfer, background replacement, adding or removing objects, and color adjustment.
  2. Multiple Aspect Ratios and High-Definition Output: Supports 10 aspect ratios ranging from 1:1 to 21:9, with optional 2K (2048px) and 4K (3840px) resolutions. 4K mode provides the best text-rendering results and is suitable for professional images that require clear text.
  3. Batch Generation and Search Grounding: Provides a batch_generate.py batch script with customizable quantity, filename prefix, and delay interval. It also supports enabling Google Search grounding with --search, which improves accuracy when generating images related to real people, landmarks, or brands.

Frequently Asked Questions

What are the prerequisites for using Nano Banana?

Two conditions are required: first, obtain a GEMINI_API_KEY from Google AI Studio (aistudio.google.com/apikey) and configure it as an environment variable; second, install Python 3.10+ and the google-genai and pillow dependencies (pip install google-genai pillow). It calls the Gemini API and is subject to API quota limits. When generating images in batches, it is recommended to add a 3–5 second delay between each image.

Can Nano Banana edit existing images? Which resolutions and aspect ratios are supported?

Yes. Use generate.py "editing instruction" -i original.jpg -o output.png to edit an existing image, including style transfer, background replacement, and adding or removing elements. Three resolution options are supported: standard, 2K, and 4K. The 10 supported aspect ratios are 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, and 21:9 (ultrawide), covering both landscape and portrait formats.

What should I do if generation fails with “No image in response”?

This usually means that the prompt triggered the model’s safety filters. Try rephrasing it, avoiding sensitive content, and running it again. If the message indicates that the rate limit has been exceeded, wait a few seconds before trying again, or reduce the batch size and increase the interval. To improve accuracy for images involving real people or landmarks, add the --search parameter to enable search grounding.