# Nano Banana Pro API on MLMux

> Professional image generation and editing for complex instructions, accurate text, and multi-reference composition.

- Model page: https://www.mlmux.com/google/nano-banana-pro
- API model ID: `google/nano-banana-pro`
- Provider: Google
- Generation modes: Text to image, Image editing
- Endpoint: `POST https://api.mlmux.com/v1/images/generations`; edits with reference images use `POST https://api.mlmux.com/v1/images/edits`
- Reference images: up to 14
- Resolutions: 1K, 2K, 4K
- Aspect ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
- Output formats: png, jpg

## Pricing

Pay as you go in credits; 1 credit = 1 US dollar, with no subscription. `official-cheap` is the default route.

- 1K image: about $0.134 on `official`, $0.067 on `official-cheap`
- 2K image: about $0.134 on `official`, $0.067 on `official-cheap`
- 4K image: about $0.24 on `official`, $0.12 on `official-cheap`

## Request

Send your API key as `Authorization: Bearer $MLMUX_API_KEY`. Create keys at https://www.mlmux.com/console/api-keys.

```bash
curl https://api.mlmux.com/v1/images/generations \
  -H "Authorization: Bearer $MLMUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google/nano-banana-pro",
  "route_mode": "official-cheap",
  "prompt": "A red fox in fresh snow at sunrise, cinematic light",
  "resolution": "2K",
  "aspect_ratio": "1:1",
  "output_format": "png",
  "n": 1
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.mlmux.com/v1/images/generations",
    headers={"Authorization": f"Bearer {os.environ['MLMUX_API_KEY']}"},
    json={
  "model": "google/nano-banana-pro",
  "route_mode": "official-cheap",
  "prompt": "A red fox in fresh snow at sunrise, cinematic light",
  "resolution": "2K",
  "aspect_ratio": "1:1",
  "output_format": "png",
  "n": 1
},
    timeout=300,
)
response.raise_for_status()
print(response.json())
```

The response contains the generated image URLs. Add `"async": true` to get a task to poll instead.

## Frequently asked questions

### What is Nano Banana Pro?

Nano Banana Pro is an image generation model from Google. On MLMux you can run it in the browser or call it through one API. Professional image generation and editing for complex instructions, accurate text, and multi-reference composition.

### How do I use the Nano Banana Pro API?

Create an API key in the MLMux Console, then send a POST request to https://api.mlmux.com/v1/images/generations with the key in the Authorization header and model set to google/nano-banana-pro. The generated images are returned in the response.

### What can Nano Banana Pro do?

Generation modes: Text to image and Image editing. Each request accepts up to 14 reference images and returns 1K, 2K, or 4K images in aspect ratios such as 1:1, 2:3, 3:2, 3:4, 4:3, and 4:5.

### How much does Nano Banana Pro cost?

MLMux is pay as you go, with no subscription or monthly fee, and 1 credit equals 1 US dollar. A 1K Nano Banana Pro image costs about $0.067 on the default official-cheap route and $0.134 on the official route, billed on the tokens each request actually uses. Rates for every resolution are listed in the pricing section of this page.

### Can I try Nano Banana Pro without writing code?

Yes. Sign in and use the playground at the top of this page to run Nano Banana Pro with the same settings as the API. The API tab shows the matching request in Node.js, Python, and HTTP.

## More

- Image API guide: https://www.mlmux.com/docs/images
- Pricing for every model: https://www.mlmux.com/pricing
- All models: https://www.mlmux.com/llms.txt
