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

# Nano Banana 2

> nano-banana-2 — Best value image generation with text rendering. $0.05/image.

|              |                                                                   |
| ------------ | ----------------------------------------------------------------- |
| **Model ID** | `nano-banana-2`                                                   |
| **Provider** | Google                                                            |
| **Cost**     | \$0.05/img                                                        |
| **Tier**     | Standard                                                          |
| **Speed**    | Fast                                                              |
| **Best for** | Best all-around image generation, text rendering, grounded images |

## Description

Google's latest image generation model (Gemini 3.1 Flash Image). Best balance of quality, speed, and intelligence. Supports up to 4K resolution, accurate text in images, Google Search grounding, and up to 14 reference images.

## Features

* Text-to-image
* Image editing
* Text rendering
* Up to 4K resolution
* Aspect ratios: 1:1, 16:9, 9:16, 3:4, 4:3, 1:4, 4:1, 1:8, 8:1, 21:9

## Example

```bash theme={null}
curl -X POST https://www.ninjachat.ai/api/v1/images \
  -H "Authorization: Bearer nj_sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "nano-banana-2", "prompt": "A sunset over mountains, photorealistic"}'
```

```python theme={null}
import requests, os

r = requests.post("https://www.ninjachat.ai/api/v1/images",
    headers={"Authorization": f"Bearer {os.environ['NINJACHAT_API_KEY']}"},
    json={"model": "nano-banana-2", "prompt": "A sunset over mountains, photorealistic"}
)
print(r.json()["images"][0]["url"])
```

***

**Guides:** [Image Generation](/image-generation) | [All Models](/models) | [Pricing](/pricing) | [Error Handling](/error-handling)
