Nano Banana Pro brings AI image generation and editing directly into your agent workflow using Google's Gemini 3 Pro Image API. It supports both text-to-image creation from natural language descriptions and image-to-image editing of existing files, with output resolutions ranging from 1K to 4K — making it suitable for everything from quick prototyping to production-quality visual assets.
Key Features
- Text-to-image generation that creates new images from natural language descriptions using Gemini 3 Pro
- Image-to-image editing that modifies existing images based on editing instructions, preserving the original composition while applying changes
- Three resolution tiers — 1K (~1024px) for quick iteration, 2K (~2048px) for standard quality, and 4K (~4096px) for production use
- Flexible API key management supporting both command-line arguments and environment variable configuration
- PNG output format with customizable filenames, saved directly to the current working directory
Use Cases
- Generating placeholder images and visual assets during rapid prototyping or UI development
- Editing product photos or marketing visuals without leaving the command line
- Creating illustrations for documentation, presentations, or blog posts as part of a content pipeline
- Iterating on visual concepts quickly at low resolution before generating final high-quality versions
How It Works
The skill runs a Python script via
uv
that communicates with Google's GenAI client. Users provide a text prompt along with optional parameters for resolution and output filename. For editing workflows, users specify an input image path via the
--input-image
flag and describe the desired modifications. The recommended workflow is to start at 1K resolution for fast feedback, refine the prompt iteratively, then generate the final 4K version.
Getting Started
Ensure Python and the
uv
runner are installed, along with the
google-genai
and
pillow
dependencies. Set a valid Gemini API key either via the
--api-key
argument or the
GEMINI_API_KEY
environment variable. Run with
uv run scripts/main.py --prompt "your description" --resolution 2k
to generate your first image.