Skip to main content
AnyAIGC

Google · Nano Banana

Nano Banana APINano Banana 2.1, 2 and Pro

One API key for every Google Nano Banana model, from $0.0128 per image.

Text rendering, multi-image compositing, conversational editing and 4K output, all over the API. Flat per-image pricing instead of tokens, so costs are easy to plan.

  • From $0.0128 / image
  • Up to 4K
  • References Up to 14
  • Concurrency Unlimited
  • Enterprise Self-service invoices
Photoreal portrait: A portrait in tall grass at golden hour (generated with Nano Banana)
Neon portrait: A close-up lit by red and cyan neon at night (generated with Nano Banana)
Text localization: English on three cans translated into Korean, everything else unchanged (generated with Nano Banana)

Sample images are from Google DeepMind's Nano Banana model pages, generated with Nano Banana models. Images © Google. View source ↗

Imagine it, then make it.Photoreal, playful, precise or surreal: a single sentence is enough.

Nano Banana API pricing

Every model is billed per image. One API key and one balance cover the whole lineup.

  • Per imageFlat price per image, not per token
  • 1 image per callA request usually returns 1 image
  • Unlimited concurrencyDefault for every account
  • Shared balanceOne balance covers 300+ models
Nano Banana per-image pricing (USD)
ModelModel IDAnyAIGC price (per image, from)Google list price (1K / 2K / 4K)
Nano Banana 2.1Save 62% vs Google 1Kgemini-nano-banana-2.1from $0.0128 / image$0.0336 / $0.0504 / $0.113
Nano Banana ProSave 76% vs Google 1Kgemini-3-pro-image
gemini-3-pro-image-preview
from $0.0328 / image$0.134 / $0.134 / $0.24
Nano Banana 2Save 76% vs Google 1Kgemini-3.1-flash-image
gemini-3.1-flash-image-preview
from $0.0164 / image$0.067 / $0.101 / $0.151

Prices are in USD and show the lowest price in the model catalog. 2K and 4K output can be priced differently; see the live rates in the model catalog. You are billed per successful request, and prompts and reference images are not charged separately. Google list prices are Standard-tier USD rates from the Gemini API pricing page, for reference only.

How to choose

How to choose a Nano Banana model
If you needUseWhy
New projects, everyday images, batch jobsNano Banana 2.1Lowest price in the lineup (from $0.0128 / image) and Google's main image model
Posters, infographics, dense text layoutsNano Banana ProStronger reasoning keeps complex layouts and text more reliable
4K images and print materialsNano Banana Pro / 2.1Both output 4K; Pro has finer detail, 2.1 costs less (see 4K rates in the model catalog)
Ultra-wide banners and long images (1:8, 8:1)Nano Banana 2.12.1 fixes stitching issues at extreme ratios in 2K / 4K
Existing gemini-3.1-flash-image integrationsNano Banana 2Keeps working as is; moving to 2.1 only means changing the model name

Cost examples

Calculated at the from price per image. Check 2K and 4K rates in the model catalog.

  • 1,000 product shots

    Nano Banana 2.1, 1,000 × $0.0128

    $12.80

    Everyday batch work

  • 100 posters

    Nano Banana Pro, 100 × $0.0328

    $3.28

    Complex layouts and text

  • 1,000 images on Nano Banana 2

    Nano Banana 2, 1,000 × $0.0164

    $16.40

    $12.80 on 2.1

How many images the 5M free tokens cover

New accounts get 5M free tokens, worth about $0.5. At the prices above, that covers this many images (rounded down).

Nano Banana: Images you can generate with the free credit
Model1K2K4K
Nano Banana 2.1392611
Nano Banana Pro15158
Nano Banana 2303016

The 1K count uses the from price above. 2K and 4K counts are estimates based on AnyAIGC's price ratio between resolutions. Live prices are in the model catalog.

Nano Banana 2.1 vs 2 vs Pro

Resolution, aspect ratios, reference images and list prices in one table.

Nano Banana 2.1, Nano Banana 2 and Nano Banana Pro specs compared
Nano Banana 2.1Nano Banana 2Nano Banana Pro
AnyAIGC model IDgemini-nano-banana-2.1gemini-3.1-flash-image
gemini-3.1-flash-image-preview
gemini-3-pro-image
gemini-3-pro-image-preview
Google nameGemini Nano Banana 2.1Gemini 3.1 Flash ImageGemini 3 Pro Image
PositioningUpgrade to Nano Banana 2 with better image quality, text and multi-turn consistencyFlash-speed workhorse image modelReasoning-driven, pro-grade images for complex layouts and retouching
Output resolution1K / 2K / 4K1K / 2K / 4K (Google also offers 512px)1K / 2K / 4K
Aspect ratios14, including 1:4, 4:1, 1:8, 8:114, including 1:4, 4:1, 1:8, 8:110 (1:1 to 21:9)
Reference images (up to 14)10 object + 4 character10 object + 4 character6 object + 5 character + 3 style
Google Search groundingWeb + image searchWeb + image searchWeb search
ThinkingConfigurableConfigurableOn by default, cannot be turned off
AnyAIGC pricefrom $0.0128 / imagefrom $0.0164 / imagefrom $0.0328 / image
Google list price1K $0.0336 · 2K $0.0504 · 4K $0.1131K $0.067 · 2K $0.101 · 4K $0.1511K $0.134 · 2K $0.134 · 4K $0.24
ReleaseGA on 2026-10-06Preview 2026-02-26, GA 2026-05-28Preview 2025-11-20, GA 2026-05-28

Specs are from the Google Gemini API image generation docs and model list (read 2026-10-25). Request fields follow the AnyAIGC API docs.

Nano Banana API use cases

  • E-commerce

    Product and lifestyle shots

    Upload a product photo and swap the background, scene or model while keeping the packaging and label text intact. Get every aspect ratio a SKU needs in one go.

  • Marketing

    Posters and localized copy

    Write headlines and selling points straight into the image, or translate the text on an existing poster into another language without touching the layout.

  • Social

    Assets for every platform

    Render one concept at 1:1, 4:5, 9:16 and 16:9 for Instagram, TikTok, YouTube thumbnails and web banners.

  • Education

    Infographics and diagrams

    Turn a concept, process or dataset into a labeled infographic, with Google Search grounding to keep the facts on screen accurate.

  • Characters

    Consistent characters

    Use a few character references to produce a series of scenes and poses, ideal for picture books, comic storyboards and brand mascots.

  • Design

    Sketch to render

    Add a one-line brief to a hand sketch, floor plan or product drawing and get a photoreal render, then keep refining it in conversation.

Get started with the Nano Banana API

  1. Sign up: create an AnyAIGC account. New accounts get 5 million tokens of trial credit, and top-ups start at $1.
  2. Create an API key: generate a key in the console and store it in the ANYAIGC_API_KEY environment variable.
  3. Send a request: call POST https://anyaigc.ai/v1beta/models/gemini-nano-banana-2.1:generateContent (native Gemini format). Projects already on the OpenAI SDK can use /v1/chat/completions with model set to gemini-nano-banana-2.1.
Python · gemini-nano-banana-2.1 text to image
import base64
import os
import requests

API_KEY = os.environ["ANYAIGC_API_KEY"]
MODEL = "gemini-nano-banana-2.1"

resp = requests.post(
    f"https://anyaigc.ai/v1beta/models/{MODEL}:generateContent",
    headers={"Authorization": "Bearer " + API_KEY},
    json={
        "contents": [{"role": "user", "parts": [{"text": "A plate of miniature banana dishes in a fine-dining restaurant, Gemini-themed decor, soft overhead light"}]}],
        "generationConfig": {
            "responseModalities": ["TEXT", "IMAGE"],
            # aspectRatio / imageSize must go inside imageConfig; imageSize uses an uppercase K
            "imageConfig": {"aspectRatio": "16:9", "imageSize": "2K"},
        },
    },
    timeout=300,
)
resp.raise_for_status()

# The image comes back as inlineData in parts (base64, no data: prefix); any caption is in text
for part in resp.json()["candidates"][0]["content"]["parts"]:
    if "inlineData" in part:
        ext = part["inlineData"]["mimeType"].split("/")[-1]
        with open("output." + ext, "wb") as f:
            f.write(base64.b64decode(part["inlineData"]["data"]))
        print("Saved output." + ext)
    elif "text" in part:
        print(part["text"])
cURL · gemini-nano-banana-2.1 text to image
curl "https://anyaigc.ai/v1beta/models/gemini-nano-banana-2.1:generateContent" \
  -H "Authorization: Bearer $ANYAIGC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"role": "user", "parts": [{"text": "A plate of miniature banana dishes in a fine-dining restaurant, Gemini-themed decor, soft overhead light"}]}],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {"aspectRatio": "16:9", "imageSize": "2K"}
    },
    "response_format": "url"
  }'
Python · gemini-nano-banana-2.1 reference image editing
import base64
import os
import requests

API_KEY = os.environ["ANYAIGC_API_KEY"]
MODEL = "gemini-nano-banana-2.1"


def image_part(path, mime="image/jpeg"):
    with open(path, "rb") as f:
        return {"inlineData": {"mimeType": mime, "data": base64.b64encode(f.read()).decode()}}


# Put the instruction and all reference images in the same parts list, labeling each image in text
parts = [
    {"text": "Place the product from image 1 into the scene from image 2. Keep the product and its label text unchanged."},
    {"text": "Image 1:"},
    image_part("product.jpg"),
    {"text": "Image 2:"},
    image_part("scene.jpg"),
]

resp = requests.post(
    f"https://anyaigc.ai/v1beta/models/{MODEL}:generateContent",
    headers={"Authorization": "Bearer " + API_KEY},
    json={
        "contents": [{"role": "user", "parts": parts}],
        "generationConfig": {
            "responseModalities": ["TEXT", "IMAGE"],
            "imageConfig": {"aspectRatio": "1:1", "imageSize": "2K"},
        },
        "response_format": "url",  # return a temporary download link (non-streaming only); default is base64
    },
    timeout=300,
)
resp.raise_for_status()
for part in resp.json()["candidates"][0]["content"]["parts"]:
    if "fileData" in part:
        print(part["fileData"]["fileUri"])
cURL · /v1/chat/completions
curl https://anyaigc.ai/v1/chat/completions \
  -H "Authorization: Bearer $ANYAIGC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-nano-banana-2.1",
    "messages": [
      {"role": "user", "content": "A minimalist product shot of a perfume bottle on white marble, side lighting"}
    ]
  }'

To switch models, change only MODEL: gemini-nano-banana-2.1, gemini-3.1-flash-image or gemini-3-pro-image. Requests and responses are identical.

Authenticate with Authorization: Bearer <API Key>. imageConfig.imageSize accepts 1K, 2K or 4K and defaults to 1K. response_format is a platform extension: set it to url to get a temporary fileData.fileUri link (non-streaming only); leave it out to get base64. When a request is blocked by safety filters, finishReason is SAFETY or PROHIBITED_CONTENT and no image is returned.

Nano Banana API for teams and enterprises

E-commerce companies, design teams and content platforms can buy through a standard business process, with support for finance, legal and engineering.

  • Invoices

    Issue them yourself

    Issue an invoice in the console for the amount you actually topped up, whenever you need one.

  • Dedicated support

    Account and technical contacts

    Work with a dedicated support contact and technical engineer for onboarding, migration and troubleshooting.

Payment methods
  • WeChat Pay
  • Alipay
  • USDT
  • Credit card

Why teams trust AnyAIGC

Trial credit, top-ups, refunds, data handling and billing, spelled out up front.

  • 5M free tokens to start

    New accounts get trial credit, so you can test before you top up.

  • Top up from $1, refundable

    Top up from $1. Unused balance can be refunded with no fee.

  • Official channels, real models

    Requests go to official model channels, never cheaper or reverse-engineered substitutes.

  • No retention, no training

    Unless the law requires it, your prompts and outputs are not persistently stored or used for training. See the privacy policy.

  • Transparent billing, spend caps

    See tokens and cost for every request in the console, and set a quota on each API key.

  • 24/7 support

    Contact support any time about integration, billing or incidents.

Nano Banana API FAQ

How much does the Nano Banana API cost?

Every Nano Banana model on AnyAIGC is billed per image: Nano Banana 2.1 from $0.0128, Nano Banana 2 from $0.0164, and Nano Banana Pro from $0.0328 per image. These are the lowest prices in the model catalog; live 2K and 4K prices are shown in the model catalog. You are billed per successful request.

What is the difference between Nano Banana 2.1, Nano Banana 2 and Nano Banana Pro?

Nano Banana 2.1 (gemini-nano-banana-2.1) is the upgrade to Nano Banana 2 that Google released on October 6, 2026, with better image quality, text rendering and multi-turn consistency. Nano Banana 2 (gemini-3.1-flash-image) is a Flash-class, high-throughput image model. Nano Banana Pro (gemini-3-pro-image) is built on Gemini 3 Pro with reasoning, for complex layouts and pro-grade retouching. All three output 1K, 2K and 4K.

What is Nano Banana, and how does it relate to Gemini?

Nano Banana is the nickname for Google Gemini image generation models. The original Nano Banana was Gemini 2.5 Flash Image, followed by Nano Banana Pro (Gemini 3 Pro Image), Nano Banana 2 (Gemini 3.1 Flash Image) and Nano Banana 2.1. All of them are called through the Gemini API generateContent endpoint.

Which endpoints are supported? Can I edit images?

Both the native Gemini format POST /v1beta/models/<model>:generateContent and the OpenAI-compatible /v1/chat/completions are supported. For text to image, send a single text part. To edit or composite, put the instruction and the reference images (inlineData) in the same parts list, up to 14 reference images. See the AnyAIGC API docs for every field.

Are there concurrency limits?

AnyAIGC sets no concurrency limit on every Nano Banana model, and every account gets this by default. The base URL is https://anyaigc.ai, and you do not need a Google account. The same key works for 300+ other models.

Can I get an invoice from AnyAIGC?

Yes. You can issue invoices yourself in the console, for the amount you actually topped up.

Which payment methods are supported?

You can top up with WeChat Pay, Alipay, USDT or a credit card. Your balance is in USD and works across every model on the platform. Invoices can be issued in the console for the amount you topped up.

Is there free trial credit for new users?

Yes. New accounts get 5 million tokens of trial credit, so you can test before deciding to top up. Top-ups start at $1.

Can I get a refund on my balance?

Yes. Unused balance can be refunded with no fee. Contact support to start a refund.

Are these the real models? Is my data safe?

Requests go to official model channels, never cheaper or reverse-engineered substitutes. Unless the law requires it, we do not persistently store your prompts or outputs or use them for training, and the console shows tokens and cost for every request.

Can I use the images commercially? Are they watermarked?

Usage rights and content policies follow Google's official terms. Google embeds an invisible SynthID digital watermark in every image Nano Banana generates; it is not visible in the picture. AnyAIGC only provides API access and adds no extra restrictions on how you use the output. If an image involves real people's likenesses or third-party trademarks, make sure you have the rights you need.

Start building with Nano Banana

Sign up for 5 million free tokens and use one key for the whole Nano Banana lineup and 300+ other models.