APIMart
Gemini Nano Banana 2.1 model icon
Image

Gemini Nano Banana 2.1 API

Google's Gemini Nano Banana 2.1 supports text-to-image generation and reference-image editing. APIMart provides official and Ext routes with the same output resolutions, but different billing and limits.

Image GenerationReference Editing1K / 2K / 4KOfficial / Ext

Service Highlights

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

Generated image links expire 72 hours after completion. Download your images promptly.

Nano Banana 2.1 API Pricing

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

* Actual costs are subject to final output.

* gemini-nano-banana-2.1: Image-output estimate only. Input and reasoning are billed separately; the final charge is based on actual usage.

* If Ext is unavailable, allow fallback to the official model. A fallback task uses official token-based billing, so the final charge may differ from the Ext estimate.

Google Nano Banana 2.1 API: Gemini Image Generation and Editing

Gemini Nano Banana 2.1 is Google's update to Nano Banana 2, with better visual quality, prompt adherence, character consistency and text rendering. Turn prompts and reference images into 1K, 2K or 4K images in 14 aspect ratios, and use the official or Ext route for your workflow.

Key Features of the Nano Banana 2.1 API

Supported Nano Banana 2.1 inputs, output settings and task workflow

Nano Banana 2.1 Text to Image API

Describe the subject, composition, lighting and style in a prompt and Nano Banana 2.1 creates a new image.

Reference Image Editing with the Gemini Nano Banana 2.1 API

Supply reference images with instructions for the changes you want, and Nano Banana 2.1 edits them. Review the result before using it.

1K, 2K and 4K Output from Google Nano Banana 2.1

Select 1K, 2K or 4K Nano Banana 2.1 output for your intended placement. Resolution affects the generation cost.

14 Aspect Ratios Including 1:8 and 8:1 in NanoBanana 2.1

Both the official route and Ext support 14 ratios plus auto at 1K, 2K and 4K, including the extra-wide and extra-tall 1:4, 4:1, 1:8 and 8:1. In reference-image workflows, auto follows the reference ratio.

Up to 4 Images per Task on the Official Nano Banana 2.1 Route

Request 1–4 Nano Banana 2.1 images in a single official-route task. Ext currently supports one image per task.

Two Billing Options for the Nano Banana 2.1 API

Official Nano Banana 2.1 usage is billed by actual tokens. Ext uses per-image pricing for the selected resolution, unless official fallback is used.

Asynchronous Nano Banana 2.1 Tasks

Submit a Nano Banana 2.1 task, track its status, and retrieve all completed image URLs from the task result.

Download Completed Nano Banana 2.1 Images

Nano Banana 2.1 result links expire 72 hours after completion. Download or copy your images to your own storage in time.

What You Can Build with the Nano Banana 2.1 AI Image Generator

Practical Nano Banana 2.1 ideas for creative, commerce and content teams

Product Visual Concepts with Nano Banana 2.1

Explore product-scene concepts with Nano Banana 2.1 using prompts and references. Check product details and accuracy before publishing.

Campaign Drafts with the Gemini Nano Banana 2.1 API

Develop visual directions for a campaign with Nano Banana 2.1, compare drafts and refine the selected concept.

Social Media Visuals with Google Nano Banana 2.1

Choose portrait, square or landscape Nano Banana 2.1 ratios for social content and review each output for its placement.

Reference Variations

Describe changes to a supplied reference for Nano Banana 2.1 and compare the new result with the source image.

Storyboards and Presentations

Create Nano Banana 2.1 still-image concepts to communicate a scene, presentation idea or early narrative.

Panoramic Banners with Nano Banana 2.1

Use the wide and tall 4:1, 8:1, 1:4 and 1:8 ratios at 1K, 2K or 4K for website headers, banners and scrolling layouts with Nano Banana 2.1.

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

Call Google Nano Banana 2.1 on APIMart with one POST request. Nano Banana 2.1 generation is asynchronous: submit a task, then poll the task endpoint to get the image URLs.

  1. 1

    Authenticate Nano Banana 2.1 API requests

    Save your APIMart API key in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every request.

  2. 2

    Submit a Nano Banana 2.1 task

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

  3. 3

    Get the Nano Banana 2.1 result

    Send GET /v1/tasks/{task_id} until the task is completed, then read the image URLs from the data.result.images[0].url array (with n set to 4, it contains all 4 links). Save the files before the links expire at expires_at. A failed task is fully refunded and returns the reason in error.message.

    See the Nano Banana 2.1 API documentation 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-nano-banana-2.1",
    "prompt": "A panoramic website banner of a mountain lake at sunrise with the headline Explore More in clean white type",
    "n": 1,
    "size": "16:9",
    "resolution": "2K"
  }'

Nano Banana 2.1 API Parameters

ParameterTypeRequiredDefaultDescription
modelstringRequiredDefault: gemini-nano-banana-2.1gemini-nano-banana-2.1 (official, 1–4 images, token billing) or gemini-nano-banana-2.1-ext (Ext, 1 image, per-image billing).
promptstringRequiredDefault: —Description of the image to generate or the edit to make.
sizestringOptionalDefault: autoauto or 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, 1:8, 8:1. Both routes support every ratio.
resolutionstringOptionalDefault: 1K1K, 2K or 4K; affects billing. 0.5K is not supported.
nintegerOptionalDefault: 1Official route: 1 to 4. Ext route: 1 only.
image_urlsarrayOptionalDefault: —Reference images as public HTTP(S) URLs or base64 data URLs. PNG, JPEG or WEBP recommended. Leave empty for text to image.
official_fallbackbooleanOptionalDefault: falseExt only. If the Ext route fails and the task completes on the official route, official token billing applies.
webhookstringOptionalDefault: —Callback URL called when the task finishes.

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 APIGemini 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 APIThis pageGemini Nano Banana 2.1Latest version: text-to-image and reference-image editing in 14 aspect ratios1K / 2K / 4K

Nano Banana 2.1 API FAQ

Nano Banana 2.1 routes, parameters, billing and result handling

What is Nano Banana 2.1 (Gemini Nano Banana 2.1)?

Gemini Nano Banana 2.1 is Google's latest high-efficiency image generation and editing model and an update to Nano Banana 2 (Gemini 3.1 Flash Image). It keeps Flash-level speed and cost efficiency while improving visual quality, prompt adherence, multi-turn character consistency and text rendering. On APIMart you call it as the Nano Banana 2.1 API, model gemini-nano-banana-2.1.

When was Nano Banana 2.1 released?

Google made Gemini Nano Banana 2.1 generally available on October 6, 2026. It replaces gemini-3.1-flash-image, which Google has deprecated and recommends migrating to Nano Banana 2.1.

Nano Banana 2.1 vs Nano Banana 2: what changed?

Google describes Nano Banana 2.1 as an update to Nano Banana 2 with significant improvements in visual quality, prompt adherence, multi-turn character consistency, text rendering and wide and panoramic ratios (1:4, 4:1, 1:8, 8:1) across 1K, 2K and 4K. Nano Banana 2.1 does not support the 0.5K tier.

What is the difference between the official and Ext Nano Banana 2.1 API?

gemini-nano-banana-2.1 uses the Google official route, while gemini-nano-banana-2.1-ext uses the Ext route. Both run the same Nano Banana 2.1 model and support the same resolutions and aspect ratios; billing, image count and reference-size limits differ.

How many images can Nano Banana 2.1 generate per task?

The official route supports n from 1 to 4. Ext currently supports only n=1. Use separate Ext tasks or the official route when you need several images.

Which reference images can I use with Nano Banana 2.1?

image_urls accepts publicly accessible HTTP(S) URLs or base64 data images. PNG, JPEG and WEBP are recommended. Official limits each reference to 20 MB; Ext allows 30 MB each and 50 MB combined. Upstream limits still apply even though the platform sets no reference-count cap.

Which resolutions and aspect ratios does Nano Banana 2.1 support?

Choose 1K, 2K or 4K and auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, 1:8 or 8:1. Both the official route and Ext support all these ratios at every resolution, including 1:4, 4:1, 1:8 and 8:1 at 2K and 4K. Defaults are 1K and auto. This model does not support 0.5K.

Nano Banana 2.1 pricing: how is generation billed?

Official billing includes actual input tokens and output tokens, including image output and thinking. An image-output estimate is not the full task price. Ext is priced per image by resolution, so the Nano Banana 2.1 price depends on the route and resolution you choose. Check the platform price list; the completed task's cost is the final charge.

What does official_fallback do in the Nano Banana 2.1 API?

This optional Ext setting is off by default. If the third-party route fails and the task completes through the official route, official token-based billing applies instead of Ext per-image pricing.

How do I use the Nano Banana 2.1 API and get the results?

POST /v1/images/generations returns a task_id. Query GET /v1/tasks/{task_id} until the task completes or fails. Completed image links are in the data.result.images[0].url array; when n is 4, this array contains all 4 links.

How long do Nano Banana 2.1 image links last, and what happens on failure?

Image links expire 72 hours after completion; use expires_at and save the files promptly. A task marked failed is fully refunded and reports cost=0. A network error while checking status does not by itself mean the task failed.

How do I get a Nano Banana 2.1 API key?

Sign up for APIMart, open the API Keys page in your dashboard and create a Nano Banana 2.1 API key. The same key calls the Google Nano Banana 2.1 API and every other model on the platform, with pay-as-you-go billing and no subscription.