Google modelsimage generation api

google/nano-banana-2

Nano Banana 2 is Google's new state-of-the-art fast image generation and editing model

Input
Idle

Example output — click Run to generate your own

API README

Google Nano Banana 2 Text-to-Image

Google's fast image generation model built on Gemini 3.1 Flash architecture. Optimized for speed and cost — delivers quality images with flexible resolutions, extended aspect ratios, and built-in web/image search grounding.

Highlights

Fast generation — Optimized for speed, ideal for high-volume production workflows requiring rapid turnaround.

Web & Image Search grounding — Retrieve web images via Google Image Search as visual background context. Enables reference-aware generation without manually uploading assets.

Extended aspect ratios — Supports extreme ratios like 1:8 and 8:1 for banners, scrolls, and panoramic content, in addition to standard ratios.

Low-cost 0.5K resolution — New 512px output tier at reduced cost for thumbnails, previews, and prototyping.

Free Web & Image Search — Web search and image search grounding included at no extra cost.

Native text rendering — Renders readable text in images across Latin, CJK scripts with correct spelling and placement.

Pricing

ResolutionPrice
0.5K$0.04
1K$0.06
2K$0.10
4K$0.14
Web SearchFree
Image SearchFree

When to Use

✅ Good fit❌ Consider alternatives
Rapid prototyping and previewsHighest quality brand assets (use Nano Banana Pro)
High-volume batch generationPixel-perfect text layout
Banners and ultra-wide/tall contentVideo or animation
Thumbnails and social media contentUltra-high resolution print (4K+)
Cost-sensitive workflowsIterative mask-based editing (use Edit model)

Prompt Guide

Structure your prompts for best results:

Scene: [environment, time of day, background]
Subject: [main focus, position, action]
Details: [materials, lighting, camera angle, mood]
Text: [exact text to render, font style, placement]
Style: [photorealistic, illustration, flat design, etc.]

Example:

A vibrant 16:9 banner for a music festival. Neon-lit stage with a crowd silhouette in the foreground, confetti in the air. Title text "SUMMER BEATS 2026" in bold graffiti style at center. Electric purple and cyan color palette.

Technical Specs

SpecValue
InputText prompt (max 50,000 characters)
OutputPNG or JPEG
Resolution0.5K / 1K / 2K / 4K
Aspect ratio21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 4:1, 1:4, 8:1, 1:8
Web SearchGoogle web + image search grounding
Reference imagesUp to 14
ExecutionAsync (submit → poll for result)
Typical latency15–30 seconds

Related

Related Models

google/nano-banana-2/editNano Banana 2 is Google's new state-of-the-art image generation and editing modelgoogle/gemini-3.1-flash-image-preview/editGemini 3.1 Flash Image Preview Edit is Google's intelligent image editing model. Transform, retouch, and reimagine existing images using text prompts - from background replacement to artistic style conversion.google/imagen-3Imagen 3 by Google - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.google/imagen-3/fastImagen 3 Fast is Google's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.google/imagen-4/previewImagen 4 Preview by Google - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.google/imagen-4/preview/fastImagen 4 Preview Fast is Google's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.google/imagen-4/preview/ultraImagen 4 Preview Ultra by Google - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.google/nano-bananaGoogle's famous original image generation and editing model.