Nano Banana Image Generation

VerifiedSafe

Generate and edit images using Google's Gemini Image models. Create AI visuals, infographics, or edit photos via text prompts.

Sby Skills Guide Bot
ContentBeginner
7/23/2026
Claude Code
#image-generation#image-editing#gemini#ai-art#cli

Recommended for

Automated summary

Generates and edits images using Google's Gemini Image API (Nano Banana) from the command line.

Strengths

  • Fast generation with standard Nano Banana model
  • Edit existing images (background replacement, content modification)
  • Pro model support for professional-quality visuals
  • Simple usage via uv with no manual installation

Limitations

  • Requires a Gemini API key and internet connection
  • Cost per image (approx $0.039 for Nano Banana)
  • Quality depends on model choice and prompt
When to use it

Best for quickly creating visuals, infographics, or editing images without complex graphic tools.

When not to use it

Avoid for precise photo compositing or professional retouching that requires desktop software.

Security analysis

Safe
Quality score92/100

The skill instructs running a Python script that uses a local API key to call Google's Gemini API for image generation. No destructive commands, exfiltration, or obfuscation present. The script is not provided, but assuming it follows the instructions, it is safe.

No concerns found

How this analysis is made

Examples

Generate a futuristic cityscape
Generate an image of a futuristic city at sunset with flying cars and neon lights.
Edit an image background
Edit this image: change the background to a beach sunset. The image is at /path/to/photo.jpg.
Create an infographic
Create an infographic about renewable energy sources using the Pro model.

name: nano-banana-imagegen description: Generate and edit images using Google's Nano Banana (Gemini Image API). Use when the user wants to create AI-generated images, edit existing images, create infographics, generate product mockups, design social media graphics, or perform any image generation/manipulation task. Requires GEMINI_API_KEY environment variable.

Nano Banana Image Generation

Generate and edit images using Google's Gemini Image models (Nano Banana and Nano Banana Pro).

Prerequisites

  1. API Key: Set the GEMINI_API_KEY environment variable

    • Get key from: https://aistudio.google.com/apikey
  2. uv: The script uses inline dependencies with uv (no manual install needed)

Quick Start

Using the Script

# Generate an image
uv run scripts/generate_image.py "A futuristic city at sunset" -o city.png

# Edit an existing image
uv run scripts/generate_image.py "Remove the background" -i photo.jpg -o edited.png

# Use Nano Banana Pro for higher quality
uv run scripts/generate_image.py "Create a detailed infographic" -m pro -o infographic.png

Direct Python Usage (with uv)

uv run --with google-genai python -c '
from google import genai
import os

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])

response = client.models.generate_content(
    model="gemini-2.5-flash-image",
    contents=["Create an image of a cat wearing a space helmet"]
)

for part in response.candidates[0].content.parts:
    if part.inline_data:
        with open("output.png", "wb") as f:
            f.write(part.inline_data.data)
        print("Saved to output.png")
'

Model Selection

| Model | Use Case | |-------|----------| | gemini-2.5-flash-image (Nano Banana) | Fast generation, iterations, high volume | | gemini-3-pro-image-preview (Nano Banana Pro) | Professional quality, text rendering, complex prompts |

Common Tasks

Image Generation

uv run scripts/generate_image.py "A serene Japanese garden with cherry blossoms" -o garden.png

Image Editing

uv run scripts/generate_image.py "Change the background to a beach sunset" -i input.jpg -o edited.png

Infographics (use Pro model)

uv run scripts/generate_image.py "Create an infographic about renewable energy" -m pro -o infographic.png

Resources

  • Script: scripts/generate_image.py - CLI tool with inline uv dependencies
  • API Reference: See references/api_reference.md for detailed SDK usage
  • Prompting Guide: See references/prompting_guide.md for effective prompts

Pricing

~$0.039 per image for Nano Banana (1290 tokens per image at $30/1M tokens)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/nano-banana-image-generation-mrx3y0pc/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/nano-banana-image-generation-mrx3y0pc' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/nano-banana-image-generation-mrx3y0pc/download' --output '.skill-downloads/nano-banana-image-generation-mrx3y0pc/SKILL.md.part' && mv '.skill-downloads/nano-banana-image-generation-mrx3y0pc/SKILL.md.part' '.skill-downloads/nano-banana-image-generation-mrx3y0pc/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Prerequisites
  1. API Key: Set the GEMINI_API_KEY environment variable

  2. uv: The script uses inline dependencies with uv (no manual install needed)

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/nano-banana-image-generation-mrx3y0pc/SKILL.md' && test -s '.skill-downloads/nano-banana-image-generation-mrx3y0pc/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/nano-banana-imagegen' && cp -R '.skill-downloads/nano-banana-image-generation-mrx3y0pc' '.claude/skills/nano-banana-imagegen'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/nano-banana-image-generation-mrx3y0pc'

openskills read 'nano-banana-image-generation-mrx3y0pc'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/nano-banana-image-generation-mrx3y0pc/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills