NanoBanana MCP
Generate and edit images using Nano Banana in the AI Agent through MCP.
Use the same REST API to generate or edit images with the Nano Banana family of models, with support for multiple reference images, optional aspect ratios, and output up to 4K.
Nano Banana is a family of Google Gemini image generation models. Choose Nano Banana, 2 Lite, 2, 2.1, or Pro for your use case, and use the same interface for text-to-image generation and reference image editing.
Request 1–4 images at a time, with billing based on the number of images successfully returned. Receive results via callback or query by task ID.
Text-to-image generation and multi-image editing for the complete image creation workflow
Enter a detailed text description (subject, atmosphere, lighting, camera angle) to generate professional-quality images. Ideal for brand visuals, product posters, cover images, and more.
Upload multiple images (such as a portrait + clothing), and AI will intelligently blend them. Supports advanced editing operations such as virtual try-on, product placement, and scene compositing.
Provide a portrait photo and a clothing PNG to automatically create a styled look. Ideal for e-commerce clothing displays and quickly expanding livestream image libraries.
Place product images with white backgrounds into realistic settings (wooden tables, grass, bathrooms, desks) to make product detail pages richer and more lifelike.
Change materials, colors, and styles. Swap the leather on a bag, change a drink's flavor, or alter a shoe's color scheme—making visual SKU experimentation easier.
Set callback_url to automatically receive results when a task is complete. No polling required; ideal for batch production.
The images below were generated using the Nano Banana API—what you see is what you get
nano-banana · 3:2 · Text-to-image
nano-banana · 16:9 · Text-to-image
nano-banana-pro · 1:1 · Text-to-image
nano-banana · 3:4 · Text-to-image
💡 All images were generated with a single API call each, without any post-processing
curl -X POST https://api.acedata.cloud/nano-banana/images \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "generate",
"prompt": "白瓷咖啡杯,晨光窗台,85mm镜头,浅景深,柔和高光,治愈干净",
"model": "nano-banana",
"aspect_ratio": "3:2"
}'
{
"success": true,
"task_id": "c1075552-a527-4a70-8d98-ef783f4087c1",
"trace_id": "3352b744-d17e-4d01-b1ef-a8c8e2ca3d2e",
"data": [{
"image_url": "https://cdn.acedata.cloud/d635720766.png"
}]
}
A simple REST API using Bearer Token authentication. Generate your first AI image with a single request.
Go to the application list, open General Application, and click the copy button to the right of API KEY. Keep the key on your server and use it to replace YOUR_API_KEY in the example.
Send a request to /nano-banana/images with a prompt and parameters
Get a permanently accessible image URL—ready for immediate use in production
From e-commerce content to brand creativity—Nano Banana covers these use cases
Have an influencer pose for one styled photo, then use different clothing PNGs to generate "outfit images" in bulk and quickly expand your store's assets
Turn one product image on a white background into scenes featuring wooden tables, lawns, bathrooms, and more, making detail pages richer and more compelling
Quickly generate brand key visuals, campaign posters, and cover images. Switch the same main visual between styles and holiday themes with one click
Integrate with MCP-compatible AI assistants through MCP Server to generate images using natural language
Nano Banana goes beyond simple text-to-image generation to handle these advanced tasks
Turn anime characters or portraits into collectible figurine models, displayed with packaging
Showcase internal product structures with metal parts and electronic components suspended in an exploded view for a technical aesthetic
Repair scratches and damage in old black-and-white photos, improve clarity, and add natural color
Seamlessly combine models, products, backgrounds, and other elements into a single high-quality image
Go from registration to your first AI image in less than 3 minutes
Follow the illustration above to copy the API Key for the general-purpose application.
Send a POST request with a text prompt to /nano-banana/images. Use an SDK, cURL, or any HTTP client.
Integrate the API into your application. Use Webhook for asynchronous processing and scale confidently to production.
| Purpose | Endpoint | Request Details |
|---|---|---|
| Image Generation | POST /nano-banana/images |
Set action: generate and a prompt |
| Reference Image Editing | POST /nano-banana/images |
Set action: edit and provide image_urls |
| Query Tasks | POST /nano-banana/tasks |
Query asynchronous tasks for free |
Choose the right model based on your quality and speed needs
Based on Gemini 2.5 Flash Image. Faster generation at a lower cost, ideal for bulk content production and prototyping.
Based on Gemini 3.1 Flash Lite Image. Supports 1K resolution only, ideal for quick prototyping.
Based on Gemini 3.1 Flash Image. Pro-level quality + Flash speed, offering great value.
A new generation of efficient image models, supporting 1K, 2K, and 4K text-to-image generation and image editing.
Based on Gemini 3 Pro Image, supporting 1K, 2K, and 4K output, ideal for brand visuals and high-precision images.
Transparent pay-as-you-go pricing. No subscription fees. No hidden fees. Pay only for what you use.
Each model is billed by the number of images successfully returned. USD prices depend on the purchased package.
Volume discounts for high-usage teams
Everything you need to know about using the Nano Banana API
Nano Banana is an alias-based wrapper for Google Gemini image generation models. nano-banana corresponds to Gemini 2.5 Flash Image, nano-banana-2-lite corresponds to Gemini 3.1 Flash Lite Image (1K only, fast image generation), nano-banana-2 corresponds to Gemini 3.1 Flash Image, nano-banana-2.1 supports generation and editing at 1K, 2K, and 4K, and nano-banana-pro corresponds to Gemini 3 Pro Image. Nano Banana, 2 Lite, 2, and Pro also offer :official public models. See the API documentation and pricing page for specifications and pricing.
Charges are based on the number of successfully generated images. count can request 1–4 images; if some fail, you are charged only for images successfully returned. :official models are priced separately; see the live pricing page for details. Task queries are free.
Generate creates images from prompts, while Edit can use up to 10 reference images. The aspect ratio can be selected automatically or specified as 1:1, 3:2, 2:3, 16:9, 9:16, 4:3, or 3:4. Nano Banana 2, 2.1, and Pro support 1K / 2K / 4K, while Nano Banana and 2 Lite support 1K.
There are two ways: (1) Use callback_url—set a Webhook URL, and we will POST the result when it is complete. (2) Poll /nano-banana/tasks—this endpoint is free and lets you check the status at any time.
Yes. The returned image_url is stored on our CDN, remains accessible permanently, and can be used directly in production.
Yes! We provide an MCP Server (mcp-nano-banana) that integrates with AI assistants that support MCP. Your AI Agent can generate and edit images using natural language.
Recommended structure: subject + mood + lighting + lens + texture keywords. For example: "white porcelain coffee cup, windowsill in morning light, 85mm portrait lens, shallow depth of field, soft highlights, soothing, clean, relaxed". The more specific the description, the better the generated result.
Edit mode requires 1-10 images to be passed through the image_urls parameter (HTTP/HTTPS URL or Base64). Each image can be up to 10MB. The Prompt should describe how to process these images, for example "put this T-shirt on this person".
Explore our complete suite of AI APIs for images, video, music, and more
ByteDance's high-definition text-to-image model
Fast AI image generation with support for multiple styles and models
Create AI-generated videos using Dream Machine and Ray models
AI music generation—generate complete songs, covers, and instrumental music
Access text-to-image generation, reference image editing, asynchronous task queries, and completion callbacks with a single API.