← 返回
内容创作 Key 中文

Nano Banana Pro

Generate or edit AI images with the NanoPhoto.AI Nano Banana Pro API. Use when: (1) User wants text-to-image generation from a prompt, (2) User wants image-t...
使用 NanoPhoto.AI Nano Banana Pro API 生成或编辑 AI 图像。适用场景:(1) 用户希望根据提示词生成文本图像,(2) 用户希望进行图像编辑。
nanophotohq
内容创作 clawhub v1.0.1 1 版本 99813.3 Key: 需要
★ 4
Stars
📥 2,058
下载
💾 51
安装
1
版本
#banana#edit#generation#image#latest#nanophoto

概述

Nano Banana Pro

Generate or edit images through the NanoPhoto.AI Nano Banana Pro API.

Prerequisites

  1. Obtain an API key at: https://nanophoto.ai/settings/apikeys
  2. Configure NANOPHOTO_API_KEY before using the skill.

Preferred OpenClaw setup:

  • Open the skill settings for this skill
  • Add an environment variable named NANOPHOTO_API_KEY
  • Paste the API key as its value

Equivalent config shape:

{
  "skills": {
    "entries": {
      "nano-banana-pro": {
        "enabled": true,
        "env": {
          "NANOPHOTO_API_KEY": "your_api_key_here"
        }
      }
    }
  }
}

Other valid ways to provide the key:

  • Shell: export NANOPHOTO_API_KEY="your_api_key_here"
  • Tool-specific env config: any runtime that injects NANOPHOTO_API_KEY

Choose the mode

  • Use generate for text-to-image.
  • Use edit for image-to-image edits.
  • For edit, provide one or more public image URLs.
  • Do not use local image files or base64 images with the API. The API only accepts inputImageUrls.

Recommended workflow

  1. Collect the prompt.
  2. Decide mode: generate or edit.
  3. Choose aspectRatio and imageQuality.
  4. For edit, collect up to 8 public image URLs.
  5. Submit the generation request.
  6. Poll the status endpoint every 5 seconds until completed or failed.
  7. Return the final imageUrl and progress/result details.
  8. Expect real-world wait time to vary from roughly 30 seconds to 300 seconds depending on queue/load and prompt complexity; avoid short timeouts.

Preferred command

Use the bundled script for reliable submission + polling:

Text to image

macOS / Linux:

python3 scripts/nano_banana_generate.py \
  --prompt "A futuristic cityscape at sunset with flying cars and neon lights" \
  --mode generate \
  --aspect-ratio 16:9 \
  --image-quality 2K

Windows:

python scripts/nano_banana_generate.py ^
  --prompt "A futuristic cityscape at sunset with flying cars and neon lights" ^
  --mode generate ^
  --aspect-ratio 16:9 ^
  --image-quality 2K

Image to image

macOS / Linux:

python3 scripts/nano_banana_generate.py \
  --prompt "Transform this photo into a watercolor painting style" \
  --mode edit \
  --input-image-url https://static.nanophoto.ai/demo/nano-banana-pro.webp \
  --aspect-ratio 16:9 \
  --image-quality 1K

Windows (cmd.exe):

python scripts/nano_banana_generate.py ^
  --prompt "Transform this photo into a watercolor painting style" ^
  --mode edit ^
  --input-image-url https://static.nanophoto.ai/demo/nano-banana-pro.webp ^
  --aspect-ratio 16:9 ^
  --image-quality 1K

Windows (PowerShell):

python scripts/nano_banana_generate.py `
  --prompt "Transform this photo into a watercolor painting style" `
  --mode edit `
  --input-image-url https://static.nanophoto.ai/demo/nano-banana-pro.webp `
  --aspect-ratio 16:9 `
  --image-quality 1K

The script reads NANOPHOTO_API_KEY from the environment, submits the task, polls automatically, and prints the final JSON result.

Manual API calls

Submit generation

curl -X POST "https://nanophoto.ai/api/nano-banana-pro/generate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NANOPHOTO_API_KEY" \
  --data-raw '{
    "prompt": "A futuristic cityscape at sunset with flying cars and neon lights",
    "mode": "generate",
    "aspectRatio": "16:9",
    "imageQuality": "2K"
  }'

Check status

curl -X POST "https://nanophoto.ai/api/nano-banana-pro/check-status" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NANOPHOTO_API_KEY" \
  --data-raw '{"generationId": "abc123xyz"}'

Parameter guidance

  • aspectRatio
  • 16:9
  • 9:16
  • 4:3
  • 3:4
  • imageQuality
  • 1K: lowest cost
  • 2K: balanced quality/cost
  • 4K: highest cost
  • inputImageUrls
  • Max 8 URLs
  • Must be publicly reachable

Error handling

errorCodeCauseAction
--------------------------
LOGIN_REQUIREDInvalid or missing API keyVerify key at https://nanophoto.ai/settings/apikeys
API_KEY_RATE_LIMIT_EXCEEDEDRate limit exceededWait and retry
INSUFFICIENT_CREDITSNot enough creditsTop up credits
INVALID_PROMPTMissing or empty promptAsk user for a prompt
MISSING_INPUT_IMAGEEdit mode missing imagesAsk for public image URLs
TOO_MANY_IMAGESMore than 8 imagesReduce to 8 or fewer URLs
IMAGE_URLS_REQUIREDAPI needs inputImageUrlsDo not send base64 or local file paths
NOT_FOUNDInvalid generation IDRe-submit or verify the ID
FORBIDDENTask not owned by this keyVerify account/key ownership
GENERATION_FAILEDServer-side failureRetry or simplify the prompt

Bundled files

  • scripts/nano_banana_generate.py: submit a generation/edit task and poll until completion.
  • references/api.md: condensed API reference, costs, and response shapes.

erate.py`: submit a generation/edit task and poll until completion.

  • references/api.md: condensed API reference, costs, and response shapes.

eference, costs, and response shapes.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 02:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,772
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,481
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,191