Skip to content
Agents tracked: 302 Downloads (7d): 239M down 5.7% GitHub stars: 6.4M VS Code installs: 151M Releases (7d): 342 Agent status: 2 with issues Updated Oct 9, 2026

Gemini API image generation (Nano Banana / Imagen) by Google

Gemini image models (Nano Banana) for generation and editing via the Gemini API.

Image generation APIs

Price
see pricing
list price
Free tier
No
SDK downloads
59.1M
npm @google/genai · PyPI google-genai
Status
—

Pricing

Free tier—
Cheapest paid plan—
Usage priceNano Banana 2.1: $0.0336 per 1K image, $0.0504 per 2K, $0.113 per 4K
Good to knowImagen 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 serverCommunity servers only
npmnpm install @google/genai
PyPIpip install google-genai
GitHubgoogleapis/js-genai · 1,686 stars · last push Oct 9, 2026

Alternatives to Gemini API image generation (Nano Banana / Imagen)

All image generation apis

APIFreePrice SDK downloads / wkGitHub starsMCP
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
Is Gemini API image generation (Nano Banana / Imagen) right for you? Ask AgentGid →