Generate or edit images through the NanoPhoto.AI Nano Banana Pro API.
NANOPHOTO_API_KEY before using the skill.Preferred OpenClaw setup:
NANOPHOTO_API_KEYEquivalent config shape:
json
{
"skills": {
"entries": {
"nano-banana-pro": {
"enabled": true,
"env": {
"NANOPHOTO_API_KEY": "your_api_key_here"
}
}
}
}
}
Other valid ways to provide the key:
export NANOPHOTO_API_KEY="your_api_key_here"NANOPHOTO_API_KEYgenerate for text-to-image.edit for image-to-image edits.edit, provide one or more public image URLs.inputImageUrls.mode: generate or edit.aspectRatio and imageQuality.edit, collect up to 8 public image URLs.completed or failed.imageUrl and progress/result details.Use the bundled script for reliable submission + polling:
macOS / Linux:
bash
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:
bash
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
macOS / Linux:
bash
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):
bash
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):
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.
bash
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"
}'
bash
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"}'
aspectRatio
16:99:164:33:4imageQuality
1K: lowest cost2K: balanced quality/cost4K: highest costinputImageUrls
errorCodeCauseActionLOGIN_REQUIREDInvalid or missing API keyVerify key at https://nanophoto.ai/settings/apikeysAPI_KEY_RATE_LIMIT_EXCEEDEDRate limit exceededWait and retryINSUFFICIENT_CREDITSNot enough creditsTop up creditsINVALID_PROMPTMissing or empty promptAsk user for a promptMISSING_INPUT_IMAGEEdit mode missing imagesAsk for public image URLsTOO_MANY_IMAGESMore than 8 imagesReduce to 8 or fewer URLsIMAGE_URLS_REQUIREDAPI needs inputImageUrlsDo not send base64 or local file pathsNOT_FOUNDInvalid generation IDRe-submit or verify the IDFORBIDDENTask not owned by this keyVerify account/key ownershipGENERATION_FAILEDServer-side failureRetry or simplify the prompt
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.