Nano Banana 2

google/nano-banana-2

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

Base price
$0.06USD / run
Execution
async
Model type
image
Input fields
6

Try the model

Playground

Open playground
Input
The text prompt to generate an image from.
The aspect ratio of the generated image. Allowed values: 21: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.
The format of the generated image. Allowed values: jpeg, png.
The resolution of the image to generate. Allowed values: 0.5K, 1K, 2K, 4K.
OutputReady

Your output will appear here

Complete the inputs, then click Run.

Specifications

Pricing

Base price
$0.06 / run
Billing formula
(params.resolution == "0.5K" ? 0.04 : params.resolution == "2K" ? 0.1 : params.resolution == "4K" ? 0.14 : 0.06)

Context & modalities

Input
Schema-defined
Output
image

Capabilities

Chat
Not supported
Vision
Not supported
Reasoning
Not supported
Structured output
Not supported
Function calling
Not supported
Audio input
Not supported

Access

Provider
Google
Model ID
google/nano-banana-2
Execution
async
API
Unified Run API
Endpoint
/v1/run

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

Start building

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

Production API
Unified Run API endpoint
https://api.sandbase.ai/v1/run
Model ID
google/nano-banana-2
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "google/nano-banana-2",
  "prompt": "A photo of a close-up portrait of an elderly Japanese ceramicist with deep, sun-etched wrinkles and a warm, knowing smile. He is carefully inspecting a freshly glazed tea bowl. The setting is his rustic, sun-drenched workshop. The scene is illuminated by soft, golden hour light streaming through a window, highlighting the fine texture of the clay. Captured with an 85mm portrait lens, resulting in a soft, blurred background (bokeh). The overall mood is serene and masterful. Vertical portrait orientation.",
  "resolution": "1K",
  "aspect_ratio": "1:1",
  "output_format": "png",
  "enable_web_search": false,
  "enable_image_search": false
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
  status=$(printf '%s' "$result" | jq -r .status)
  case "$status" in completed|failed|timeout) break ;; esac
  sleep 2
  result=$(curl --fail-with-body --silent \
    -H "Authorization: Bearer $SANDBASE_API_KEY" \
    "https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"

Choose your model

Compare models

All language models
ModelContextInput / 1MOutput / 1MReleased
Nano Banana 2This model
Google
———Feb 26, 2026
Google———Jun 30, 2026
Google———Jun 30, 2026
Google———Jun 30, 2026
Google———Feb 26, 2026
Google———Nov 20, 2025