nano-banana-image
NanoBanana Image Generation
Generate and edit AI images through AceDataCloud's NanoBanana (Gemini-based) API.
Setup: See authentication for token setup.
Quick Start
curl -X POST https://api.acedata.cloud/nano-banana/images \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "generate", "prompt": "a watercolor painting of a French countryside village", "model": "nano-banana"}'
Async: See async task polling. Poll via
POST /nano-banana/taskswith{"id": "..."}.
Models
| Model | Best For |
|---|---|
nano-banana |
Standard image generation (default) |
nano-banana-2 |
Improved quality, second generation |
nano-banana-pro |
Highest quality, most detailed output |
Workflows
1. Text-to-Image
POST /nano-banana/images
{
"action": "generate",
"prompt": "a photorealistic macro shot of morning dew on a spider web",
"model": "nano-banana-pro",
"aspect_ratio": "16:9",
"resolution": "2K"
}
2. Image Editing
Edit existing images using natural language instructions — no mask needed. Pass source images via image_urls.
POST /nano-banana/images
{
"action": "edit",
"prompt": "change the background to a starry night sky",
"image_urls": ["https://example.com/photo.jpg"],
"model": "nano-banana"
}
Parameters
| Parameter | Values | Description |
|---|---|---|
action |
"generate", "edit" |
Operation mode |
model |
"nano-banana", "nano-banana-2", "nano-banana-pro" |
Model to use |
prompt |
string | Image description or editing instruction |
image_urls |
array of strings | Source image URLs (required for edit action) |
aspect_ratio |
"1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4" |
Output aspect ratio |
resolution |
"1K", "2K", "4K" |
Output resolution (1K=1024px, 2K=2048px, 4K=4096px) |
callback_url |
string | Async callback URL; returns a task ID immediately |
Gotchas
- Editing does NOT require a mask — just describe the change in natural language
- Editing uses the same
/nano-banana/imagesendpoint withaction: "edit"andimage_urlsarray (not a separate/editpath) nano-banana-2is the second-generation model;nano-banana-prooffers the highest quality- Task polling uses
id(nottask_id) in the/nano-banana/tasksrequest body - Aspect ratio uses colon notation (e.g.,
"16:9") not pixel dimensions - The Gemini-based model excels at understanding complex, conversational editing instructions
MCP:
pip install mcp-nano-banana| Hosted:https://nano-banana.mcp.acedata.cloud/mcp| See all MCP servers
More from acedatacloud/skills
luma-video
Generate AI videos with Luma Dream Machine via AceDataCloud API. Use when creating videos from text prompts, generating videos from reference images, extending existing videos, or any video generation task with Luma. Supports text-to-video, image-to-video, and video extension.
10short-url
Create short URLs via AceDataCloud API. Use when generating shortened links for sharing, or batch-creating multiple short URLs at once. Supports custom slugs and expiration.
9seedream-image
Generate and edit AI images with Seedream (ByteDance) via AceDataCloud API. Use when creating images from text prompts, editing existing images, or working with high-resolution outputs. Supports Seedream 3.0 T2I, 4.0, 4.5, 5.0, and SeedEdit 3.0 models.
9flux-image
Generate and edit images with Flux (Black Forest Labs) via AceDataCloud API. Use when creating images from text prompts, editing existing images with text instructions, or when high-quality image generation is needed. Supports multiple Flux models including dev, pro, ultra, and kontext for editing.
9veo-video
Generate AI videos with Google Veo via AceDataCloud API. Use when creating videos from text descriptions, animating still images into video, upscaling/extending videos, re-shooting with new camera motion, or inserting/removing objects. Supports Veo 2, Veo 3, and Veo 3.1 models including fast variants.
9sora-video
Generate AI videos with OpenAI Sora via AceDataCloud API. Use when creating videos from text prompts, generating videos from reference images, or using character references from existing videos. Supports text-to-video, image-to-video, and character-driven generation with multiple models and resolutions.
8