ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

nano-banana-pro-custom

Generate or edit images using OpenAI-compatible API. Supports multi-image input, fine-tuned models, and multiple configuration sources (env vars, openclaw.json, config.json). Use when generating images, editing images, or composing multiple images with OpenAI-style image APIs.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/chenxchen/nano-banana-pro-custom
Or

Nano Banana Pro (OpenAI-Compatible Image Generation)

使用 OpenAI 兼容 API 生成或编辑图片,支持多图输入、微调模型和多源配置。

配置方式(优先级从高到低)

  1. 命令行参数 --base-url, --api-key, --model
  2. 环境变量 NANO_BASE_URL, NANO_API_KEY, NANO_MODEL
  3. openclaw.json ~/.openclaw/openclaw.json 中的 skills.entries.nano-banana-pro-custom
    • apiKey 字段用于配置 API Key
    • env 字段用于配置其他环境变量
  4. 技能 config.json {baseDir}/config.json

环境变量配置

export NANO_BASE_URL="https://api.openai.com/v1"
export NANO_API_KEY="your-api-key"
export NANO_MODEL="gpt-image-1"

openclaw.json 配置

使用命令行设置(推荐)

# 设置 API Key(特殊字段)
openclaw config set skills.entries.nano-banana-pro-custom.apiKey "sk-your-api-key"

# 设置 Base URL(env 字段)
openclaw config set skills.entries.nano-banana-pro-custom.env.NANO_BASE_URL "https://api.openai.com/v1"

# 设置模型(env 字段)
openclaw config set skills.entries.nano-banana-pro-custom.env.NANO_MODEL "gpt-image-1"

OpenRouter 示例

# OpenRouter 配置
openclaw config set skills.entries.nano-banana-pro-custom.env.NANO_BASE_URL "https://openrouter.ai/api/v1"
openclaw config set skills.entries.nano-banana-pro-custom.env.NANO_MODEL "google/gemini-3.1-flash-image-preview"

手动编辑文件

也可以直接编辑 ~/.openclaw/openclaw.json

{
  "skills": {
    "entries": {
      "nano-banana-pro-custom": {
        "apiKey": "sk-your-api-key",
        "env": {
          "NANO_BASE_URL": "https://openrouter.ai/api/v1",
          "NANO_MODEL": "google/gemini-3.1-flash-image-preview"
        }
      }
    }
  }
}

技能 config.json 配置

在技能目录下创建 config.json 文件:

# 创建配置文件
cat > {baseDir}/config.json << 'EOF'
{
  "baseUrl": "https://api.openai.com/v1",
  "apiKey": "your-api-key",
  "model": "gpt-image-1"
}
EOF

配置文件内容示例:

{
  "baseUrl": "https://api.openai.com/v1",
  "apiKey": "your-api-key",
  "model": "gpt-image-1"
}

查看当前配置

uv run {baseDir}/scripts/generate_image.py --show-config

快速开始

生成新图片

uv run {baseDir}/scripts/generate_image.py \
    --prompt "一只宇航员猫在月球上" \
    --output "cat_astronaut.png"

编辑单张图片

uv run {baseDir}/scripts/generate_image.py \
    --prompt "给这只猫加上一顶帽子" \
    --input cat.png \
    --output "cat_with_hat.png"

多图合成

uv run {baseDir}/scripts/generate_image.py \
    --prompt "将这两张图片融合成一个场景" \
    --input img1.png \
    --input img2.png \
    --output "merged.png"

使用微调模型

uv run {baseDir}/scripts/generate_image.py \
    --prompt "以我训练的风格画一辆车" \
    --output "car_custom.png" \
    --model "ft:image-model:my-finetuned-model"

参数说明

Metadata

Author@chenxchen
Stars3840
Views0
Updated2026-04-06
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-chenxchen-nano-banana-pro-custom": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.