## Basic model info

Model name: google/nano-banana-2.1
Model description: Google's fast image generation and editing model, with sharp text rendering, multi-image editing, and up to 4K output.


## Model inputs

- prompt (required): A text description of the image you want to generate (string)
- image_input (optional): Input images to transform or use as reference (supports up to 14 images) (array)
- aspect_ratio (optional): Aspect ratio of the generated image (string)
- resolution (optional): Resolution of the generated image. Higher resolutions take longer to generate. (string)
- google_search (optional): Use Google Web Search grounding to generate images based on real-time information (e.g. weather, sports scores, recent events). (boolean)
- image_search (optional): Use Google Image Search grounding to find web images as visual context for generation. When enabled, web search is also used automatically. (boolean)
- output_format (optional): Format of the output image (string)


## Model output schema

{
  "type": "string",
  "title": "Output",
  "format": "uri"
}

If the input or output schema includes a format of URI, it is referring to a file.


## Example inputs and outputs

Use these example outputs to better understand the types of inputs the model accepts, and the types of outputs the model returns:

### Example (https://replicate.com/p/snkgffxr79rmt0d1286bj7c5qc)

#### Input

```json
{
  "prompt": "a photorealistic close-up of a ripe banana wearing tiny sunglasses on a beach, golden hour lighting",
  "aspect_ratio": "16:9"
}
```

#### Output

```json
"https://replicate.delivery/xezq/3XLJWQkAXpYeDqvtjnKPVcOwPrGpft1dr1FCFvlcBOpDQtUXA/tmpz8j_wmt6.jpeg"
```


### Example (https://replicate.com/p/13xrzaae05rmt0d1286v8h135w)

#### Input

```json
{
  "prompt": "A vibrant storefront window display for a bakery called \"NANO BANANA 2.1\", with the name spelled out in elegant hand-painted gold lettering on the glass, fresh pastries and banana bread artfully arranged inside, warm morning light, photorealistic, highly detailed",
  "resolution": "2K",
  "aspect_ratio": "16:9"
}
```

#### Output

```json
"https://replicate.delivery/xezq/0i0JBXJDxVZGGdzcFgw2Nkaba2UAN29MVNU8goSSc78MUL1F/tmpqv6y78bf.jpeg"
```


### Example (https://replicate.com/p/hcp763cj7drmy0d128h80cz584)

#### Input

```json
{
  "prompt": "A photo of a monstera leaf against a simple backdrop, cleverly and organically appearing within the natural gaps of the leaf are the words Nano Banana",
  "resolution": "2K",
  "image_input": [],
  "aspect_ratio": "16:9",
  "image_search": false,
  "google_search": false,
  "output_format": "jpg"
}
```

#### Output

```json
"https://replicate.delivery/xezq/QYsBpLYjQhpKEhYb4SmO4s7b9hgZtmSSmPiVBEnIIMPpZL1F/tmpr9tk9id4.jpeg"
```


## Model readme

> # Nano Banana 2.1
> 
> Nano Banana 2.1 is Google's fast image generation and editing model, the quicker and cheaper counterpart to [Nano Banana Pro](https://replicate.com/google/nano-banana-pro). It builds on [Nano Banana 2](https://replicate.com/google/nano-banana-2) with sharper output, better text rendering, and grounding in real-time search results.
> 
> ## What it can do
> 
> **Generate images from text.** Describe what you want and the model creates it, from photorealistic scenes and illustrations to product mockups and infographics.
> 
> ![A bakery storefront with hand-painted gold lettering](https://replicate.delivery/xezq/0i0JBXJDxVZGGdzcFgw2Nkaba2UAN29MVNU8goSSc78MUL1F/tmpqv6y78bf.jpeg)
> 
> **Render text accurately.** Text in images is crisp and readable in many languages, so signs, posters, labels, and infographics come out clean.
> 
> ![A solar system infographic with clean typography](https://replicate.delivery/xezq/OUsRIXJiKja4OB8ees37i17RwjdksmIVxIskcriAtH6JRtUXA/tmp5_v7u653.jpeg)
> 
> **Edit existing images.** Pass in one or more images with a text prompt to change backgrounds, swap colors, adjust styles, or combine several images into one scene. You can use up to 14 reference images at once.
> 
> **Ground in real-world information.** Turn on `google_search` to generate images based on real-time information like weather, sports scores, or recent events. Turn on `image_search` to pull web images in as visual context.
> 
> ## Resolutions and aspect ratios
> 
> Output at `1K` (the default), `2K`, or `4K`. Higher resolutions take longer to generate.
> 
> Set `aspect_ratio` to `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`, or to the ultra-wide and ultra-tall `4:1`, `1:4`, `8:1`, and `1:8`. The default, `match_input_image`, matches the aspect ratio of your input image.
> 
> ## Output format
> 
> Choose between `jpg` (the default) and `png`.
> 
> ## Links
> 
> - [Gemini image generation guide](https://ai.google.dev/gemini-api/docs/image-generation)
> - [Gemini Image on Google DeepMind](https://deepmind.google/models/gemini-image/)
> 
> You can try Nano Banana 2.1 in the [Replicate playground](https://replicate.com/playground).

