Skip to main content

Google Nano Banana 2.1

Generate images from text, or edit and combine up to 14 reference images, with Google’s Nano Banana 2.1 model.
Nano Banana 2.1 is Google’s image model for generation and editing. One endpoint covers both: send a prompt alone to generate an image, or add reference_images to edit them, combine them, or keep a character or product consistent across new scenes. It renders at 1K, 2K or 4K, in 14 aspect ratios from 8:1 banners to 1:8 vertical strips.

Key capabilities

  • Generation and editing in one endpoint: Text-to-image, or edit and compose up to 14 reference_images
  • Name your references in the prompt: Each reference is captioned Image 1, Image 2… by default, so the prompt can say “place the product from Image 1 on the table in Image 2”. Send your own text caption to name it differently
  • Wide aspect ratio range: 14 ratios from 8:1 to 1:8, plus auto to follow your reference images
  • Thinking level: thinking_level (minimal, medium, high) trades generation time for better handling of complex prompts
  • Google Search grounding: use_google_search_tool grounds the image on current web results
  • Resolutions: 1K, 2K and 4K. Resolution is the only parameter that changes the price
  • Prompt range: 2 to 12,000 characters
  • Async processing: Webhook notification or polling for task completion

Use cases

  • Product visuals: Place a product from a reference photo in new scenes and settings
  • Character consistency: Keep the same person or mascot across a campaign from a few reference images
  • Image editing: Change backgrounds, lighting, style or objects in an existing image with a text instruction
  • Banners and panels: Generate ultra-wide 8:1 / 4:1 headers or tall 1:4 / 1:8 panels natively, without cropping
  • Grounded imagery: Images of real places, landmarks or recent products with Google Search grounding

API operations

Create an image with the POST endpoint, then track it with the list and status endpoints. Generation returns a task ID for async polling or webhook notification.

POST /v1/ai/text-to-image/nano-banana-2-1

Create a new image generation task

GET /v1/ai/text-to-image/nano-banana-2-1

List all Nano Banana 2.1 tasks

GET /v1/ai/text-to-image/nano-banana-2-1/{task-id}

Get task status and results by ID

Parameters

Output sizes

The output is about 1, 4 or 16 megapixels at 1K, 2K and 4K, shaped to the requested ratio. Measured examples:

Frequently Asked Questions

Nano Banana 2.1 is Google’s image generation and editing model. You send a prompt (2-12,000 characters), optionally with up to 14 reference_images, and receive a task ID immediately. Poll the task endpoint or configure a webhook_url to receive the generated image URL when processing completes. Each request generates one image.
Each reference is captioned with its position, Image 1, Image 2 and so on, so you can write prompts such as “put the jacket from Image 2 on the person in Image 1”. If you set your own text on a reference, that caption is used instead, and you can refer to the image by it (for example "text": "the logo" and “turn the logo into a neon sign”).
Set aspect_ratio to auto. With reference images the model follows their ratio, including ratios outside the preset list: a 900x1050 reference returns a 960x1120 image. Without reference images, auto lets the model pick the ratio that best fits the prompt. If you omit aspect_ratio entirely you get the default, 1:1.
It controls how much the model reasons about the prompt before drawing. high helps with complex compositions and prompts with many constraints; minimal returns faster. When omitted, the model uses medium. It does not change the price.
When use_google_search_tool is true, the model uses Google Search to ground the image on real-world information. Use it for prompts about real places, landmarks, current events or recent products. It does not change the price.
No. Nano Banana 2.1 does not reproduce images from a seed, so the API does not accept one. To iterate on a result, send the generated image back as a reference with an editing instruction.
PNG, JPEG and WebP, as a public HTTPS URL or a base64-encoded string. mime_type is optional: when omitted it is derived from the image. Plain http:// URLs are rejected.
The price depends only on resolution: 1K, 2K or 4K. Reference images, thinking_level and Google Search grounding do not change it. See the Pricing page for current rates.
Rate limits depend on your subscription tier. See Rate Limits for current limits.
Nano Banana 2.1 accepts up to 14 reference images and adds the extreme 8:1, 4:1, 1:4 and 1:8 aspect ratios and the thinking_level control. Nano Banana Pro and Nano Banana Pro Flash remain available with their own parameters.

Best practices

  • Name what you reference: Refer to references by their caption (Image 1, Image 2) or give them a descriptive text, especially when combining several images
  • Use auto for edits: When editing a single reference, auto keeps its proportions instead of forcing a preset ratio
  • Pick the resolution last: Iterate at 1K and render the final asset at 2K or 4K
  • Raise thinking_level for complex prompts: Use high for multi-object compositions and dense instructions; keep minimal for quick drafts
  • Production integration: Use webhook_url instead of polling for scalable applications
  • Error handling: Implement retry logic with exponential backoff for 503 errors
  • Nano Banana Pro Flash: Fast Gemini 3.1 Flash generation with Google Search grounding
  • Magnific One: Image model with art direction built in
  • Mystic: Magnific’s proprietary image generation with LoRA style control