Nano Banana API gives you Google's Gemini 2.5 Flash Image on APIMart for text-to-image generation and image editing, with character consistency and up to 14 reference images per request. Pay-as-you-go billing and membership discounts are available.

Image link valid for 72 hours
Transparent pricing with no hidden fees. Pay only for what you use.
| Variant | GoldCurrent price | Platinum | Diamond | Official | Your savings |
|---|---|---|---|---|---|
nano-bananaPrices are estimates; actual cost is billed by token usage. | 0.312Credits(~$0.0312)/pic | 0.2964Credits(~$0.0296)/pic | 0.2808Credits(~$0.0281)/pic | 0.39Credits(~$0.039)/pic | 20% |
* Actual costs are subject to final output.
Generate and edit images with Google's Gemini 2.5 Flash Image, better known as Nano Banana. With Nano Banana you can keep characters consistent, fuse up to 14 reference images and make targeted edits with plain-language prompts. Affordable pay-as-you-go billing: up to 28% off for members, and you only pay for successful requests.
50K+
Active Users
99.9%
Uptime
2x
Faster
70%
Cost Savings
Call Google Nano Banana on APIMart with one POST request. Nano Banana generation is asynchronous: submit a task, then poll the task endpoint to get the image URL.
Save the key you created above in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every request.
POST /v1/images/generations with model, your prompt and size. Add image_urls to edit images. The response returns a task_id.
Send GET /v1/tasks/{task_id} until status is completed, then read the image URL from data.result.images[0].url[0]. Image URLs expire at expires_at, so download the files if you need to keep them. A failed task returns the reason in error.message.
See the Nano Banana API reference for every parameter and response field.
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash-image-preview",
"prompt": "A photorealistic ceramic coffee mug on a wooden desk by a window, soft morning light, shallow depth of field",
"n": 1,
"size": "16:9"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "gemini-2.5-flash-image-preview",
"prompt": "A photorealistic ceramic coffee mug on a wooden desk by a window, soft morning light, shallow depth of field",
"n": 1,
"size": "16:9"
}
resp = requests.post(f"{API_BASE}/v1/images/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["images"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(3)
else:
raise TimeoutError(f"task {task_id} did not finish in time")curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash-image-preview",
"prompt": "Place the product from this photo on a marble kitchen counter in soft morning light and keep the label unchanged",
"n": 1,
"size": "1:1",
"image_urls": [
"https://example.com/product.jpg"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: gemini-2.5-flash-image-preview | gemini-2.5-flash-image-preview (Ext, alias nano-banana-ext) or gemini-2.5-flash-image-preview-official (official, alias nano-banana). |
prompt | string | Required | Default: — | Text description of the image or the edit, up to 1,000 characters. |
size | string | Optional | Default: — | auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 or 21:9. For text to image, auto resolves to 1:1 or 16:9; for image editing, set it explicitly. |
resolution | string | Optional | Default: 1K | Output resolution. Only 1K is supported. |
n | integer | Optional | Default: 1 | Number of images per request. Only 1 is supported; send it as a number, not a string. |
image_urls | array | Optional | Default: — | Up to 14 reference images as public http(s) URLs or full data URIs. JPEG, PNG or WebP, max 10 MB each. Adding them switches to image editing. |
nsfw_check | boolean | Optional | Default: false | Moderate the prompt and input images with omni-moderation-latest before the task is submitted. |
official_fallback | boolean | Optional | Default: false | Use the official channel as a fallback. Cannot be set when model is the -official version. |
Compare every Nano Banana model on APIMart. One API key calls all of them, billed per image.
| Model | Base model | Best for | Resolution |
|---|---|---|---|
| Nano Banana APIThis page | Gemini 2.5 Flash Image | Character consistency, multi-image blending and prompt-based edits | 1K |
| Nano Banana Pro API | Gemini 3 Pro Image | Professional 4K images, legible multilingual text and consistency for up to 5 people | 1K / 2K / 4K |
| Nano Banana 2 API | Gemini 3.1 Flash Image | Fast, cost-efficient generation from 0.5K to 4K | 0.5K – 4K |
| Nano Banana 2 Lite API | Gemini 3.1 Flash Lite Image | Fast 1K images and editing, one image per request with up to 14 reference images | 1K |
| Gemini Nano Banana 2.1 API | Gemini Nano Banana 2.1 | Latest version: text-to-image and reference-image editing in 14 aspect ratios | 1K / 2K / 4K |
Guides, comparisons and pricing analysis from the APIMart blog.
What Gemini 2.5 Flash Image can do through one APIMart endpoint
Real-world applications powered by APIMart
Follow these simple steps to set up your account, add funds, and start generating images
Create your free APIMart account to begin. You can set up an organization for your team at any time. Top up your account balance to get started. Your balance can be used across all models on the platform, including Nano Banana.
In your dashboard, create an API key — you'll need it to authenticate every request.
Use your API key with the sample code below to send your first request and get an image back.
What developers and businesses say about Nano Banana on APIMart
“Nano Banana's character consistency is game-changing for our e-commerce platform. We can generate multiple product mockups with the same model and it looks natural every time.”
Sarah Chen
E-Commerce Director
“10-second generation speed is incredible! On APIMart I also get 20% off as a member. This combination of speed and affordability transformed our workflow.”
James Rodriguez
Technical Lead
“APIMart's Nano Banana is fast, and membership pricing saves us 20%. The quality is consistent and Gemini 2.5 Flash Image's character consistency feature is unmatched.”
Alex Thompson
Product Manager
“We switched from DALL-E to Nano Banana for our marketing campaigns. The speed improvement and character consistency made a huge difference in our workflow.”
Emily Watson
Marketing Manager
“Nano Banana's conversational editing feature is incredibly powerful. We can refine images iteratively without losing quality or consistency. Perfect for our design team.”
David Kim
Creative Director
“Gemini 2.5 Flash Image's text rendering quality is excellent compared to other image models. We use Nano Banana for all our brand mockups and social media assets now.”
Lisa Martinez
Brand Designer
Common questions about Nano Banana on APIMart
Nano Banana is the popular name for Google's Gemini 2.5 Flash Image, an image generation and editing model known for character consistency, multi-image blending and prompt-based edits. On APIMart you call it as the Nano Banana API with model gemini-2.5-flash-image-preview, using one API key and pay-as-you-go billing.
Google announced Gemini 2.5 Flash Image, nicknamed nano-banana, on August 26, 2025. Newer models in the family, Nano Banana Pro, Nano Banana 2 and Gemini Nano Banana 2.1, are also available on APIMart; compare them in the model family table on this page.
Requests need model and prompt (up to 1,000 characters). Optional parameters are size (auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 or 21:9), resolution (1K only), n (1 image per request), image_urls (up to 14 reference images), nsfw_check and official_fallback. The parameter table on this page lists types and defaults.
Yes. The Nano Banana Edit API is not a separate endpoint: add image_urls to the same POST /v1/images/generations request and describe the change in the prompt. You can send up to 14 images as public URLs or base64 data URIs, in JPEG, PNG or WebP up to 10 MB each. For edits, set size explicitly, because auto follows the ratio returned upstream.
Both run Gemini 2.5 Flash Image with the same parameters. The Ext channel is gemini-2.5-flash-image-preview (alias nano-banana-ext) and the official channel is gemini-2.5-flash-image-preview-official (alias nano-banana). On Ext you can set official_fallback to use the official channel as a fallback; it cannot be set on the official model. The two are priced separately in the table above. The official route is billed by actual input and output token usage; Ext is billed per successfully generated image.
The full Nano Banana documentation, with every API parameter and response field, is in the APIMart docs at docs.apimart.ai. Copy-ready cURL and Python examples are also on this page in the API example section.
The Nano Banana price depends on the route: the official route is settled on actual input and output token usage, while Ext is billed per successfully generated image at the rate for the selected specification. An estimated price per image for the official route is not a fixed final charge. Check this page's live pricing table for current rates and the completed task's cost for the final amount. Gold members save 20%; Platinum and Diamond members save up to 28%.
Yes. The pricing table on this page shows the Gold member price, 20% off. Platinum and Diamond members save even more, up to 28%. You only pay for successful requests.
No. The Nano Banana API has no free quota on APIMart. It is pay-as-you-go, with billing determined by the selected route, and you only pay for successful requests. Gold members save 20%; Platinum and Diamond members save up to 28%.
Sign up for APIMart, open the API Keys page in your dashboard and create a key. The same key calls Google Nano Banana and every other model on the platform, with pay-as-you-go billing and no subscription.
Send POST https://api.apimart.ai/v1/images/generations with your API key, model gemini-2.5-flash-image-preview and your prompt. The response returns a task_id: poll GET /v1/tasks/{task_id} until status is completed, then read the image URL from the result.
Yes. Images can be used commercially for e-commerce, marketing, social media, product photography and professional content creation, which suits agencies, businesses and content creators.
Nano Banana (gemini-2.5-flash-image-preview) is the original Gemini 2.5 Flash Image model, strong at character consistency and multi-image blending, with 1K output. Nano Banana Pro runs on Gemini 3 Pro Image and Nano Banana 2 on Gemini 3.1 Flash Image, both with higher-resolution output. One APIMart key calls every model in the family, so you can compare them side by side.
Yes. Nano Banana is the popular name for Google's Gemini 2.5 Flash Image, so the Gemini Nano Banana API, the Google NanoBanana API, the Nano Banana AI API and the Nano-Banana API all refer to the same Google Nano Banana model. On APIMart you can call it by its alias: set model to nano-banana (official) or nano-banana-ext, with the same API key as every other model.
Explore more models in the same category.

Seedream 5.0 Pro
Seedream 5.0 Pro (seedream-5-0-pro) is quality-first text-to-image model. It produces cinematic 1K and 2K images with best-in-class text rendering, supports up to 10 reference images for style and character consistency, and unifies generation and editing in a single API call.

Nano Banana 2 Lite
Nano Banana 2 Lite is the lightweight model in the Nano Banana 2 family, generating and editing images at 1K with one image per request and up to 14 reference images. Official channel.

Midjourney
Midjourney is a leading text-to-image AI model renowned for its painterly aesthetics, strong composition, and cinematic lighting. Generate high-quality images from text prompts or reference images, with fine-grained control over style, aspect ratio, and creative parameters — accessible programmatically through APIMart's unified API, no Discord required.

Wan 2.7 Image Pro
wan‑2‑7‑image is a powerful image generation model in Alibaba’s Wan 2.7 series that creates high‑quality visuals from text prompts. It produces detailed and realistic images with strong semantic understanding and refined composition. The model supports multimodal input—such as combining text with reference images—to influence style, layout, or visual direction. It’s well‑suited for creative workflows like product visuals, marketing graphics, social media content, and artistic illustrations, delivering both fidelity and expressive visual output.