nano-banana-pro

Generate and edit images with the Gemini 3 Pro Image API via a Python script.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/redlanternstudios/swarmclaw --skill nano-banana-pro-redlanternstudios
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nano-banana-pro
Source: https://github.com/redlanternstudios/swarmclaw/tree/main/skills/nano-banana-pro
Command: npx skills add https://github.com/redlanternstudios/swarmclaw --skill nano-banana-pro-redlanternstudios

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-genai, pillow, and includes scripts (resource) components.

What problem does it solve? Creating or editing images programmatically requires wiring up API clients, handling image encoding, and managing output files. This Skill wraps the Gemini 3 Pro Image (Nano Banana Pro) API into a single script call so an agent can produce or modify images from a text prompt without manual integration work. ## Core Features & Use Cases - Text-to-Image Generation: Create images from a text prompt at 1K, 2K, or 4K resolution with optional aspect ratio control. - Image Editing & Composition: Edit a single image or combine up to 14 input images into one scene using natural-language instructions. - Automatic Resolution Detection: When editing, output resolution is inferred from the largest input image dimension unless explicitly set. - Use Case: Ask the agent to generate a 16:9 product banner at 2K resolution, or pass two photos and have them merged into a single composed scene saved as a PNG. ## Quick Start Ask the agent to generate an image of a sunset over mountains saved as sunset.png at 2K resolution using the nano-banana-pro skill.

Frequently Asked Questions about nano-banana-pro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with the Gemini API from a text prompt?

Run the bundled script with uv, passing --prompt with your description and --filename for the output PNG. The script calls the gemini-3-pro-image-preview model and saves the returned image to the specified path.

How to edit or combine multiple images with Gemini 3 Pro Image?

Pass one or more input images with repeated -i flags along with an editing prompt. The script supports up to 14 input images and sends them together with your prompt to the model for editing or composition.

What API key is required for Gemini image generation?

A Gemini API key is required, supplied either through the GEMINI_API_KEY environment variable or the --api-key command-line argument. Without a key, the script exits with an error before making any API call.

What resolutions and aspect ratios does Gemini 3 Pro Image support?

The script supports 1K, 2K, and 4K output resolutions, with automatic detection from input image dimensions when editing. Aspect ratio options include 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, and 21:9.

Why does image generation fail with no image in the response?

The model may return only text for some prompts, in which case the script reports that no image was generated and exits with an error. Rephrasing the prompt to clearly request an image usually resolves this.