> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Nano Banana

Developed by Google DeepMind, Nano Banana is Google’s advanced image generation and editing model. It powers image generation in Gemini 2.5 Flash Image.

Nano Banana Pro is designed for professional digital asset creation. It natively generates high-resolution 4K images and powers Gemini 3 Pro Image.

Nano Banana 2 is a lightweight version of Nano Banana Pro optimized for speed and high concurrency. It generates 0.5K, 1K, 2K, and 4K images and powers Gemini 3.1 Flash Image.

Nano Banana 2.1 improves on Nano Banana 2 with higher quality, faster generation, and lower cost. It generates 1K, 2K, and 4K images and powers Gemini Nano Banana 2.1.

### Model parameters

* Model IDs: `nano-banana`/`nano-banana-pro`/`nano-banana-2`/`nano-banana-2-lite`/`nano-banana-2.1`
* Pricing: Check the [Model Hub](https://geekai.co/models?platform=google\&type=image) for current prices.
* Endpoint: `https://geekai.co/api/v1/images/generations`
* Parameters: See the [Image API reference](https://docs.geekai.co/en/api/image/generations.md).
* Authentication: [Get an API key](https://docs.geekai.co/en/docs/quick_start.md).

> [!NOTE]
>
> The following Image API parameters are not supported:
>
> * `negative_prompt`
> * `seed`
> * `strength`
> * `quality`
> * `style_preset`
> * `mask`
> * `watermark`
> * `background`

Nano Banana supports the following values for `aspect_ratio`:

* `1:1`
* `2:3`
* `3:2`
* `4:3`
* `3:4`
* `4:5`
* `5:4`
* `16:9`
* `9:16`
* `21:9`
* `9:21`
* `1:4` (Nano Banana 2 only)
* `4:1` (Nano Banana 2 only)
* `1:8` (Nano Banana 2 only)
* `8:1` (Nano Banana 2 only)

Nano Banana Pro and Nano Banana 2 accept `size` to set the output resolution. Supported resolutions:

* `0.5K`: `512x512` (Nano Banana 2 only)
* `1K`：`1024x1024`
* `2K`：`2048x2048`
* `4K`：`4096x4096`

> [!NOTE]
>
> Only `nano-banana-pro`/`nano-banana-2`/`nano-banana-2.1` support `size`. `nano-banana` does not support this parameter.

### Image generation

Generate an image from a text description:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"nano-banana-2.1",
    "prompt":"Draw a cute kitten playing in the grass",
    "aspect_ratio": "1:1"
}'
```

### Image editing

Like GPT-Image-1, Nano Banana supports image-to-image generation through the image editing endpoint.

**Single image**

Supply an image and a text prompt to edit the image:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/edits' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "nano-banana-2.1",
    "prompt": "Restore this damaged photo",
    "image": "https://static.geekai.co/storage/2025/04/02/broken-picture.jpg"
}'
```

**Multiple images**

To pass multiple images, use an array of strings:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/edits' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "nano-banana-2.1",
    "prompt": "Apply the fabric from image 1 to the clothing in image 2. Use the aspect ratio of image 2.",
    "image": [
        "https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/针织.jpg",
        "https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/款式图.jpg"
    ]
}'
```

Image requirements:

* Supply a Base64-encoded image or a publicly accessible image URL. For the mainland China version, the URL must be accessible from mainland China; otherwise, use Base64.
* Supported formats: PNG, JPEG, JPG, WEBP, HEIC, and HEIF.
* Each image must be no larger than 20 MB.
* Nano Banana accepts up to 3 reference images. Nano Banana Pro processes 5 with high fidelity and accepts up to 14. Nano Banana 2 and 2.1 accept up to 10.
* Input images must comply with Google’s image guidelines and [prohibited use policy](https://policies.google.com/terms/generative-ai/use-policy). Do not create content that infringes on others’ rights.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.