Install
openclaw skills install nano-banana-apiGenerate images through the Nano Banana REST API and help agents integrate or operate the service safely. Use when a task involves text-to-image, image-to-image, listing models, checking credits, choosing between sync/stream/async generation, polling generation status, or producing reproducible API calls/scripts for Nano Banana.
openclaw skills install nano-banana-apiUse this skill when an agent needs to call Nano Banana directly instead of only editing docs.
Official website: https://www.nananobanana.com
Set an API key with NANO_BANANA_API_KEY or NB_API_KEY.
Use the bundled CLI for repeatable calls:
python3 scripts/nano_banana_api.py models
python3 scripts/nano_banana_api.py credits
python3 scripts/nano_banana_api.py generate --prompt "A cinematic orange cat on a train" --mode sync
python3 scripts/nano_banana_api.py generate --prompt "Replace the background with a beach" --reference-image-url https://example.com/image.jpg --mode async --wait
python3 scripts/nano_banana_api.py generate --prompt "A cyberpunk skyline at night" --mode stream
models first when the model name matters.--model unless the user explicitly asks for a specific model.sync: simplest request/response flow.stream: real-time progress via SSE.async: immediate submission plus later polling.poll --id <generation_id> --wait when an async task must be followed to completion.models over hardcoding catalog values. The live model list changes and is the source of truth.401, 402, 403, and 503 as actionable operational states:
401: invalid or missing key.402: insufficient credits.403: account does not have API access enabled.503: async queue is busy; retry later.stream, expect newline-delimited SSE data: events.async, only declare success after processingStatus becomes completed.python3 scripts/nano_banana_api.py models
Use this before selecting --model. Live verification on 2026-03-25 showed model names that differ from examples in the docs, so avoid assuming nano-banana is the current explicit model ID.
python3 scripts/nano_banana_api.py credits
python3 scripts/nano_banana_api.py generate \
--prompt "A watercolor mountain village at sunrise" \
--mode sync \
--download-dir ./outputs
python3 scripts/nano_banana_api.py generate \
--prompt "A product hero shot of a banana-shaped lamp" \
--mode async \
--wait \
--poll-interval 3 \
--max-polls 60
python3 scripts/nano_banana_api.py poll --id clxx123 --wait
python3 scripts/nano_banana_api.py generate \
--prompt "Keep the subject, turn the room into a brutalist gallery" \
--reference-image-url https://example.com/source.jpg \
--mode sync
If direct shell execution is unavailable, construct HTTP calls from references/api-reference.md. Use:
POST /generate for sync, stream, or async submission.GET /generate?id=... for polling.GET /models to resolve current model names.GET /credits to inspect balance.