Gemini API image generation (Nano Banana / Imagen) by Google
Gemini image models (Nano Banana) for generation and editing via the Gemini API.
Price
see pricing
list price
Free tier
No
SDK downloads
59.1M
npm @google/genai · PyPI google-genai
Pricing
| Free tier | — |
|---|---|
| Cheapest paid plan | — |
| Usage price | Nano Banana 2.1: $0.0336 per 1K image, $0.0504 per 2K, $0.113 per 4K |
| Good to know | 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. |
From the official pricing page, checked Oct 9, 2026. Prices change: confirm before you buy.
Use it from an agent
| MCP server | Community servers only |
|---|---|
| npm | npm install @google/genai |
| PyPI | pip install google-genai |
| GitHub | googleapis/js-genai · 1,686 stars · last push Oct 9, 2026 |
Alternatives to Gemini API image generation (Nano Banana / Imagen)
| API | Free | Price | SDK downloads / wk | GitHub stars | MCP |
|---|---|---|---|---|---|
| OpenAI Image API (GPT Image) GPT Image models for image generation and editing via Images and Responses APIs. |
— | gpt-image-2 1024x1024: $0.006 low / $0.053 medium / $0.211 high per image | 117M | 11.2K | MCP (community) |
| Leonardo API Image and video generation API with multiple models, billed pay-as-you-go. |
— | not published | 18.8K | 56 | MCP |
| Recraft API Raster and vector (SVG) image generation, editing and vectorization API. |
— | $0.04 per raster image, $0.08 per vector image (V4/V3); V4.1 $0.035 raster | — | 60 | MCP |
| FLUX API FLUX.2 and FLUX 3 image generation and editing API. |
— | 1 credit = $0.01; FLUX.2 [pro] from $0.03/image, [klein] 4B from... | — | 13 | MCP |
| Stability AI Image API Stable Image Ultra/Core and SD 3.5 generation plus editing and upscaling. |
25 free credits | Free plan then 1 credit = $0.01; Stable Image Ultra 8 credits, Core 3,... |
— | — | MCP (community) |
| Ideogram API Text-to-image API known for accurate text rendering in images. |
— | not published | — | — | MCP |