SandBase is live — $1 in free credits on signupStart free ›

Google modelsimage generation api

google/nano-banana/edit

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

Input

PNG, JPEG, WebP, or GIF · 20 MiB maximum each

The URLs of the images to use for image-to-image generation or image editing.
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.
The format of the generated image. Allowed values: jpeg, png.
The resolution of the image to generate. Allowed values: 1K, 2K, 4K.
Idle

Example output — click Run to generate your own

API README

Nano Banana Image Editing

Nano Banana Image Editing is Google’s compact image creation workflow for turning natural-language direction into polished visual output. This route edits a supplied image, making it useful when the existing subject or composition must remain recognizable while selected details change.

The model is especially approachable for conversational iteration: describe the scene or change in ordinary language, review the result, and refine the instruction with concrete details about subject, composition, lighting, style, color, and any text that must appear. Clearly separate the requested edit from the elements that should be preserved.

Highlights

  • Conversational image editing. Transforms an existing visual through direct written instructions.
  • Strong instruction following. Coordinates subject, setting, style, lighting, layout, and requested details across iterative prompts.
  • Visual consistency. Maintains important identity and composition cues while refining or extending a creative direction.
  • Targeted revisions. Supports localized changes without requiring the entire asset to be recreated.

Pricing

ConfigurationBilling unitPrice
Base generationPer request$0.15

When to Use

✅ Good fit❌ Consider alternatives
The project needs revising an existing visual assetThe goal is a different media task or endpoint
The available inputs match the required local schemaRequired source media or permissions are unavailable
The brief can specify subject, composition, style, and deliveryThe result must be deterministic at pixel or sample level
The supported formats and controls match final placementDelivery requires unsupported dimensions, codecs, or duration
An asynchronous generated result fits the workflowA live, frame-synchronous, or real-time response is mandatory

Prompt Guide

Write the request as a production brief: identify the main subject or source material, state the intended transformation, describe composition or timing, and finish with style, atmosphere, and delivery constraints. Keep preservation requirements separate from requested changes, and use only fields exposed by this route.

{
  "prompt": "Create a professional e-commerce fashion photo. Take the blue floral dress from the first image and let the woman from the second image wear it. Generate a realistic, full-body shot of the woman wearing the dress, with the lighting and shadows adjusted to match the outdoor environment.",
  "images": [
    "https://example.com/reference.jpg"
  ],
  "resolution": "1K",
  "aspect_ratio": "21:9",
  "output_format": "jpeg"
}

Technical Specs

SpecValue
Model IDgoogle/nano-banana/edit
Input fieldsimages (array)<br>prompt (string)<br>resolution (string; 1K, 2K, 4K)<br>aspect_ratio (string; 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16)<br>output_format (string; jpeg, png)
Required inputprompt, images
Output fieldsurl, content_type
ExecutionAsynchronous job

Related Models

  • google/nano-banana

Related Models

google/nano-bananaGoogle's famous original image generation and editing model.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/gemini-2.5-flash-image/editGemini 2.5 Flash Image 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/nano-banana-2Nano Banana 2 is Google's new state-of-the-art fast image generation and editing model