Overview
nano-banana-pro-image-gen is a community-contributed open-source AI Agent Skill that lets you generate and edit images with a single natural language command in Codex CLI, OpenCode, Gemini CLI, GitHub Copilot, Cursor, Amp, and more. It calls the Nano Banana Pro model via APIYI — no complex setup needed, just install and go.Project Info
- 🔗 Source Code:
github.com/wuchubuzai2018/expert-skills-hub - 🌐 Skill Page:
skills.sh/wuchubuzai2018/expert-skills-hub/nano-banana-pro-image-gen - 👤 Author: wuchubuzai2018
- ⭐ Community contributed
Why This Skill
One-Line Image Gen
Describe in natural language inside your AI coding assistant and instantly generate high-quality images without leaving your editor
Image Editing
Pass in existing images for editing, up to 14 reference images, enabling style transfer and content modification
Multi-Platform
Works with Codex CLI, OpenCode, Gemini CLI, GitHub Copilot, Cursor, Amp, and more
Flexible Output
10 aspect ratios + 3 resolution tiers (1K/2K/4K), covering everything from quick previews to high-res posters
Supported APIYI Models
| Model Name | Model ID | Usage | API Docs |
|---|---|---|---|
| Nano Banana Pro | gemini-3-pro-image-preview | Text-to-image, image-to-image | View Docs |
Quick Start: 3 Steps to Generate Images
Step 1: Get Your APIYI Key
- Visit APIYI Console to register/login
- Go to the Token section and generate a new API key
- Copy the key (starts with
sk-)
New users get free trial credits, enough to experience Nano Banana image generation.
Hands-On Tutorial
Usage 1: Command-Line Text-to-Image
The most direct approach — enter a description in the terminal and generate an image.Usage 2: Edit Existing Images
Pass in one or more reference images and describe the desired modification in natural language.Usage 3: Inside AI Coding Assistants
After installing the Skill, use natural language commands in supported AI coding tools:- Codex CLI / OpenCode: “Generate a 16:9 cyberpunk cityscape wallpaper in 4K”
- Cursor: “Generate a product logo, minimalist style, 1:1 ratio”
- Gemini CLI: “Edit input.jpg, change the background to a sunset beach”
Command Parameters
| Parameter | Short | Required | Description | Example |
|---|---|---|---|---|
--prompt | -p | Yes | Image description or edit instruction | "a cat" |
--filename | -f | No | Output file path (auto-generated if omitted) | "output.png" |
--aspect-ratio | -a | No | Aspect ratio | 16:9 |
--resolution | -r | No | Resolution (must be uppercase) | 1K, 2K, 4K |
--input-image | -i | No | Input image path (can specify multiple, up to 14) | "photo.jpg" |
--key | -k | No | Inline API Key (env var recommended) | "sk-xxx" |
Supported Aspect Ratios
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9
Resolution & Processing Time
| Resolution | Approx. Time | Best For |
|---|---|---|
| 1K | ~30 seconds | Quick preview, testing |
| 2K (default) | 1-4 minutes | Daily use, social media |
| 4K | Longer | HD posters, print materials |
FAQ
Installation error?
Installation error?
Check the following:Then copy the
- Node.js is installed (run
node -vto confirm) - Network connection is working
- If npx is unavailable, manually clone the repo:
skills/nano-banana-pro-image-gen directory to your Skills folder.API Key invalid error?
API Key invalid error?
Please verify:
- The
APIYI_API_KEYenvironment variable is correctly set (starts withsk-) - Your APIYI account has sufficient balance
- You can also test with the
-kparameter to pass the key directly
Resolution parameter not working?
Resolution parameter not working?
Resolution must be uppercase:
1K, 2K, 4K. Lowercase 1k, 2k will not be recognized.Image generation is slow?
Image generation is slow?
- 4K resolution inherently requires longer processing (may exceed 5 minutes)
- Use 1K resolution first to test prompts and composition
- Switch to 2K or 4K for the final version once satisfied
How to get an APIYI API key?
How to get an APIYI API key?
Visit APIYI Console, register an account and generate a new key in the Token section. New users receive free trial credits.
Which AI coding tools are supported?
Which AI coding tools are supported?
Currently adapted for: Codex CLI, OpenCode, Gemini CLI, GitHub Copilot, Cursor, Amp. Any tool supporting the Skills protocol can use it.