APIMart
Nano Banana model icon
Image

Nano Banana API

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 GenerationImage EditingCommercial use

Service Highlights

  • Official Discounts
  • Pay-as-you-go
  • Fast & Low Latency
Input
109 characters
Output
Generated 1

Image link valid for 72 hours

Nano Banana API Pricing

Transparent pricing with no hidden fees. Pay only for what you use.

VariantGoldCurrent pricePlatinumDiamondOfficialYour savings
nano-banana

Prices are estimates; actual cost is billed by token usage.

0.312Credits(~$0.0312)/pic0.2964Credits(~$0.0296)/pic0.2808Credits(~$0.0281)/pic0.39Credits(~$0.039)/pic20%

* Actual costs are subject to final output.

Google Nano Banana API (Gemini 2.5 Flash Image) on APIMart

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

Nano Banana API Example: Text to Image and Image to Image

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.

  1. 1

    Authenticate Nano Banana API requests

    Save the key you created above in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every request.

  2. 2

    Submit a Nano Banana task

    POST /v1/images/generations with model, your prompt and size. Add image_urls to edit images. The response returns a task_id.

  3. 3

    Get the Nano Banana result

    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.

POST /v1/images/generations
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"
  }'

Nano Banana API Parameters

ParameterTypeRequiredDefaultDescription
modelstringRequiredDefault: gemini-2.5-flash-image-previewgemini-2.5-flash-image-preview (Ext, alias nano-banana-ext) or gemini-2.5-flash-image-preview-official (official, alias nano-banana).
promptstringRequiredDefault: —Text description of the image or the edit, up to 1,000 characters.
sizestringOptionalDefault: —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.
resolutionstringOptionalDefault: 1KOutput resolution. Only 1K is supported.
nintegerOptionalDefault: 1Number of images per request. Only 1 is supported; send it as a number, not a string.
image_urlsarrayOptionalDefault: —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_checkbooleanOptionalDefault: falseModerate the prompt and input images with omni-moderation-latest before the task is submitted.
official_fallbackbooleanOptionalDefault: falseUse the official channel as a fallback. Cannot be set when model is the -official version.

Nano Banana API Model Family

Compare every Nano Banana model on APIMart. One API key calls all of them, billed per image.

ModelBase modelBest forResolution
Nano Banana APIThis pageGemini 2.5 Flash ImageCharacter consistency, multi-image blending and prompt-based edits1K
Nano Banana Pro APIGemini 3 Pro ImageProfessional 4K images, legible multilingual text and consistency for up to 5 people1K / 2K / 4K
Nano Banana 2 APIGemini 3.1 Flash ImageFast, cost-efficient generation from 0.5K to 4K0.5K – 4K
Nano Banana 2 Lite APIGemini 3.1 Flash Lite ImageFast 1K images and editing, one image per request with up to 14 reference images1K
Gemini Nano Banana 2.1 APIGemini Nano Banana 2.1Latest version: text-to-image and reference-image editing in 14 aspect ratios1K / 2K / 4K

Guides, comparisons and pricing analysis from the APIMart blog.