nanobanana

Generate and edit images via Google's Gemini API with Python.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Kotrotsos/Content-Marketing --skill nanobanana-kotrotsos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nanobanana
Source: https://github.com/Kotrotsos/Content-Marketing/tree/main/.claude/skills/nanobanana
Command: npx skills add https://github.com/Kotrotsos/Content-Marketing --skill nanobanana-kotrotsos

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a CLI to generate and edit images using Google's Gemini API, helping you create visuals for articles, presentations, and marketing with less time and effort.

Core Features & Use Cases

  • Text-to-image generation: Create images from descriptive prompts with controllable aspect ratios and sizes.
  • Image editing: Rework existing images with style transformations or references.
  • Output controls: Specify output path, aspect ratio, and size (1K, 2K, 4K) to fit editorial needs.
  • Use Case: Produce a hero image for a feature piece, craft an editorial illustration, or quickly iterate visuals during content planning.

Quick Start

Example: nanobanana "A cat wearing a top hat in a library" to generate a hero image, or pass -i to edit an existing image. Output saved to your specified path or current directory.

Frequently Asked Questions about nanobanana

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

FAQPage Schema
How do I generate images from text prompts using Gemini?

Text-to-image generation with Gemini creates images directly from descriptive prompts. Use the nanobanana CLI with your prompt text, specify aspect ratio and size (1K, 2K, 4K), and the Gemini API generates the image to your chosen output path. Requires GEMINI_API_KEY or GOOGLE_API_KEY environment variable.

Can I edit existing images with Gemini's image editing capabilities?

Yes, image editing with Gemini transforms existing images through style changes or reference-based modifications. Pass an input image with the -i flag along with your editing prompt to rework visuals for editorial or marketing use without regenerating from scratch.

What are the setup requirements to use Gemini for image generation?

Image generation with Gemini requires Python 3.10+, the google-genai and Pillow packages installed, and GEMINI_API_KEY or GOOGLE_API_KEY environment variables configured. These prerequisites enable API authentication and image processing.

How do I control output size and aspect ratio for generated images?

Output controls let you specify aspect ratios and sizes (1K, 2K, 4K) before generation to match editorial layouts and content requirements. Pass these parameters via the CLI to ensure generated images fit your hero image, article illustration, or social media specifications.

What's the best way to produce visuals for articles and marketing content quickly?

Gemini-powered generation reduces iteration time for hero images and editorial illustrations by creating polished visuals from text prompts in seconds. This approach suits content planning workflows where rapid visual prototyping and refinement accelerate editorial timelines.

Do I need specialized AI image tools or can Gemini handle my visual content needs?

Gemini handles both text-to-image generation and image editing in a single workflow, eliminating the need to switch between specialized tools. For articles, presentations, and marketing campaigns, this unified approach streamlines visual content production within Python environments.