Skip to content
Agents tracked: 504 Releases (7d): 602 Agent status: no reported issuesSince last limit reset: Claude 13d · Codex 11d For AI agents: Markdown Updated Nov 24, 2026

Gemini API image generation (Nano Banana / Imagen)

by Google

Make and edit pictures.

Image generation APIs

WebsitePricingGitHub

1. Price

No free tier on the pricing page. As reported on the official pricing page, checked Nov 9, 2026.

ai.google.dev/gemini-api/docs/pricing

Checked against the maker's official pages, pricing on Nov 9, 2026. Tap a verdict to see its source.How we checkedReport an error

What Gemini API image generation (Nano Banana / Imagen) does

Nano Banana is the name for Google's Gemini image models. Your app describes a picture in words, or sends a photo with a change to make, and gets back a finished image. It can mix several reference pictures, write readable text into the image, and make large images; every image carries an invisible Google watermark.

  • Gemini API image generation (Nano Banana / Imagen) is one of 13 APIs in the Image generation APIs category on AgentGid.
  • It is not among the 3 that can be started for free.
  • 4 of them ship an official MCP server; Gemini API image generation (Nano Banana / Imagen) does not.
  • Its official SDK is the 2nd most downloaded in the category (74.9M a week).

What people build with it

Product photos for your shop

Make clean product shots for an online shop, an ad or a brand page from a short description.

Edit a photo with words

Upload a photo and ask to remove an object, add something, change the style or adjust the colors.

Logos, menus and infographics

Make images that contain readable words, such as a cafe menu, a simple logo idea or a diagram for a post.

Backgrounds for websites and slides

Make a calm background picture with empty space where your page title or slide text will go, in a wide format.

Comic panels and storyboards

Draw a short story in several panels with the same characters, for a comic, a lesson or a video plan.

Cover images for blog posts Idea

Make a matching cover picture for each new article from its title, in the same style every time.

Gemini API image generation (Nano Banana / Imagen) popularity

70M
SDK downloads a week
+12.6% on the 4-week average
1,717
GitHub stars, googleapis/js-genai
SDK downloads per weeknpm @google/genai, pypi google-genai 70,007,441

SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.

Pricing

Free tier

None

Cheapest plan

No monthly plan

Usage price

Nano Banana 2.1: $0.0336 per 1K image, $0.0504 per 2K, $0.113 per 4K

Plans

Imagen 4 endpoints are deprecated and shut down on August 17, 2026; it no longer appears on the pricing page. Image output is $30 per 1M tokens (Batch $15). Free tier 'Not available' for image models. Gemini 3.1 Flash Image: $0.067 per 1K image.

What one action costs

ActionPrice
1 image at 1K, Nano Banana 2.1$0.0336
1 image at 2K, Nano Banana 2.1$0.0504
1 image at 4K, Nano Banana 2.1$0.113
1 image at 1K, Nano Banana 2.1 through the Batch API$0.0168
1 image at 1K, Nano Banana 2 (gemini-3.1-flash-image)$0.067
1 image at 1K or 2K, Nano Banana Pro$0.134

As reported on the official pricing page, checked Nov 9, 2026. Prices change: confirm before you buy. ai.google.dev/gemini-api/docs/pricing

Limits

Paid tiers

Images per minute (IPM) limit for Nano Banana models, plus request limits; exact numbers are shown in Google AI Studio.

All tiers

Limits count per project, not per key; daily limits reset at midnight Pacific time.

Tier 1 (billing linked)

$10 of spend per rolling 10 minutes

From the official docs. aistudio.google.com/docs/rate-limits

Key and access

How it signs in

API key in the x-goog-api-key header (the official packages read it from the environment)

Environment variable
GEMINI_API_KEY
Safe in browser code
No, keep it on your server
Card at sign-up

Yes

Steps only a person can do

  • Sign in to Google AI Studio and copy or create a Gemini API key. Put it in .env as GEMINI_API_KEY (kept out of git); the official packages read it automatically.
  • Set up billing and prepay credits; image models are paid only. No code change; the same key starts working for image models.

Commercial use and your data

It is a paid Google service, meant for business use by adults. Google does not claim ownership of the images, but may make similar ones for others. You need the rights to any photo you upload, and every image carries a hidden watermark.

In a paid app
With conditions

Business use by adults on the paid tier; you need rights to uploaded photos, images carry a SynthID watermark, and Google may make similar images for others.

“Google won't claim ownership over that content.” source

In monetized videos
With conditions

Allowed as your own generated content; do not make images that deceive, harass or harm, or that infringe others' rights.

“Don't generate content that infringe on others' rights, including videos or images that deceive, harass, or harm.” source

To train your own AI
No

You may not use the service to build models that compete with it.

“You may not use the Services to develop models that compete with the Services (e.g., Gemini API or Google AI Studio).” source

client-work
With conditions

Fine as business use when the client's photos you upload are cleared for this use.

“Make sure you have the necessary rights to any images you upload.” source

Trains on what you send

“when you use Paid Services, Google does not use your prompts (including associated system instructions, cached content, and files such as images, videos, or documents) or responses to improve our products.”

Keeps your data

Paid requests are logged for a limited time only to detect misuse; Google Search grounding data is kept 30 days.

“For Paid Services, Google logs prompts and responses for a limited period of time, solely for detecting and preventing violations of the Prohibited Use Policy” source

Where data is stored

Data may be stored or cached in any country where Google has facilities.

“This data may be stored transiently or cached in any country in which Google or its agents maintain facilities.” source

Errors to handle

image_safety / image_prohibited_content

Safety rules or prohibited content guidelines blocked the image.

Change the prompt or the input image and try again; do not retry unchanged.

no_image

The model was unable to generate an image.

Rephrase the prompt or ask explicitly for an image, then retry.

402 payment_required

The prepaid credit balance is used up.

Top up credits or turn on auto-reload; do not retry until credits are added.

429 rate_limit_exceeded

Too many requests or images in a short time.

Wait and retry with exponential backoff.

Use it from an agent

Our agent check

3 of 6: llms.txt no, OpenAPI no, SDK yes, MCP no, status page yes, AI assistants allowed yes

Checked Nov 13, 2026.

MCP server

Gemini Docs MCP server (documentation search only; it does not make images)

claude mcp add --transport http geminiDocs https://gemini-api-docs-mcp.dev

npm
npm install @google/genai
PyPI
pip install google-genai

Instructions in its docs to check first

The docs say

“Building with an AI coding agent? Install the skill and then paste the prompt to get started with the Gemini API using Interactions:”

Ask the person first. The suggested command is npx skills add google-gemini/gemini-skills (an unpinned package) and it changes the agent's setup.

Alternatives

Gemini API image generation (Nano Banana / Imagen) This page

from $0.0336 per 1K imageNo free tier

OpenAI Image API (GPT Image)

Pick OpenAI GPT Image when you already use OpenAI; our catalog lists it from $0.006 per image (list price on 2026-11-10).

from $0.006No free tier

Recraft API

Pick Recraft when you need vector (SVG) images or want to turn pictures into vectors.

from $0.04 per raster imageNo free tierOfficial MCP

FLUX API

Pick the FLUX API when you want FLUX models; our catalog lists it from $0.014 per image (list price on 2026-11-10).

from $0.03/imageNo free tierOfficial MCP

All image generation apis APIs

Get started

Tell your AI assistant

“Add image generation to my app with Gemini Nano Banana (model gemini-nano-banana-2.1) through the google-genai package: call it from the server with GEMINI_API_KEY, save the returned image to storage, and never put the key in browser code.”

  1. Get a Gemini API key in Google AI Studio and set up billing; the image models have no free tier.

    export GEMINI_API_KEY="YOUR_API_KEY"

    From aistudio.google.com/docs/get-started

  2. Install the official Google GenAI package.

    pip install -U google-genai

    From aistudio.google.com/docs/get-started

  3. Ask a Nano Banana model for an image and save the returned picture to a file.

    from google import genai
    import base64
    client = genai.Client()
    interaction = client.interactions.create(
     model="gemini-3.1-flash-image",
     input="Generate an image of a futuristic city skyline at sunset",
    )
    with open("generated_image.png", "wb") as f:
     f.write(base64.b64decode(interaction.output_image.data))

    From aistudio.google.com/docs/get-started

First request

curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
 -H "x-goog-api-key: $GEMINI_API_KEY" \
 -H 'Content-Type: application/json' \
 -H "Api-Revision: 2026-05-20" \
 -d '{
 "model": "gemini-3.1-flash-image",
 "input": [
 {"type": "text", "text": "Generate an image of a futuristic city skyline at sunset"}
 ]
 }'

Mistakes to avoid

Calling an Imagen model such as imagen-4.0-generate.
Use a Nano Banana model, for example gemini-nano-banana-2.1.

Imagen is shut down on the Gemini API.

Asking for a long headline and the image in one step and getting misspelled text.
First generate the exact text, then ask for an image that uses that text.

The docs say this order works best.

Reading only output_image when the answer mixes text and several pictures, such as an illustrated story.
Loop over interaction.steps and save every image block.

The convenience property returns only the last image.

Asking Nano Banana 2.1 for small 512px images to save money.
Use gemini-3.1-flash-image for 512px, or 1K on Nano Banana 2.1.

The 0.5K size is not supported on Nano Banana 2.1.

Calling the image model from browser code with the key inside.
Generate on your server and send the finished image (or its stored address) to the page.

Keys in web or mobile apps can be extracted and spent by anyone.

Questions

Is there a free tier for images?

No. The pricing page lists the image models as not available on the free tier, so you need billing set up.

Which model should I start with?

Google recommends Nano Banana 2.1 for new projects; Nano Banana Pro is the premium choice for complex layouts and text.

Are the images marked as AI-made?

Yes. Every generated image carries a SynthID watermark.

Can I choose the shape and size of the image?

Yes, with aspect_ratio and image_size; by default the output matches your input image or is square.