Gemini API image generation (Nano Banana / Imagen)
by Google
Make and edit pictures.
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/pricing2. Commercial use
“Google won't claim ownership over that content.”
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.
aistudio.google.com/docs/terms3. Key & sign-up
“Set the environment variable GEMINI_API_KEY or GOOGLE_API_KEY.”
API key in the x-goog-api-key header (the official packages read it from the environment)
aistudio.google.com/docs/api-key4. Agent access
“The public Gemini Docs MCP server (https://gemini-api-docs-mcp.dev) gives your agent live access to the entire documentation site.”
Our agent check: 3 of 6 (Nov 13, 2026).
aistudio.google.com/docs/coding-agentsChecked 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
SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.
Pricing
None
No monthly plan
Nano Banana 2.1: $0.0336 per 1K image, $0.0504 per 2K, $0.113 per 4K
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
| Action | Price |
|---|---|
| 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
Images per minute (IPM) limit for Nano Banana models, plus request limits; exact numbers are shown in Google AI Studio.
Limits count per project, not per key; daily limits reset at midnight Pacific time.
$10 of spend per rolling 10 minutes
From the official docs. aistudio.google.com/docs/rate-limits
Key and access
API key in the x-goog-api-key header (the official packages read it from the environment)
GEMINI_API_KEYYes
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.
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
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
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
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
“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.”
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
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
Safety rules or prohibited content guidelines blocked the image.
Change the prompt or the input image and try again; do not retry unchanged.
The model was unable to generate an image.
Rephrase the prompt or ask explicitly for an image, then retry.
The prepaid credit balance is used up.
Top up credits or turn on auto-reload; do not retry until credits are added.
Too many requests or images in a short time.
Wait and retry with exponential backoff.
Use it from an agent
3 of 6: llms.txt no, OpenAPI no, SDK yes, MCP no, status page yes, AI assistants allowed yes
Checked Nov 13, 2026.
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 install @google/genaipip install google-genaiInstructions in its docs to check first
“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
Pick OpenAI GPT Image when you already use OpenAI; our catalog lists it from $0.006 per image (list price on 2026-11-10).
Pick Recraft when you need vector (SVG) images or want to turn pictures into vectors.
Pick the FLUX API when you want FLUX models; our catalog lists it from $0.014 per image (list price on 2026-11-10).
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.”
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"Install the official Google GenAI package.
pip install -U google-genaiAsk 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))
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"}
]
}'{
"id": "v1_Chd...",
"status": "completed",
"steps": [
{
"type": "model_output",
"content": [
{
"type": "image",
"data": "BASE64_ENCODED_IMAGE",
"mime_type": "image/png"
}
]
}
],
"object": "interaction",
"model": "gemini-3.1-flash-image"
}Mistakes to avoid
Imagen is shut down on the Gemini API.
The docs say this order works best.
The convenience property returns only the last image.
The 0.5K size is not supported on Nano Banana 2.1.
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.