# Nano Banana 2 Lite API on MLMux

> A lighter Nano Banana 2 for high-volume generation and quick iterations at a lower price per image.

- Model page: https://www.mlmux.com/nano-banana-2-lite
- API model ID: `nano-banana-2-lite`
- Provider: Google
- Generation modes: Text to image
- Endpoint: `POST https://api.mlmux.com/v1/images/generations`
- Reference images: not available yet
- Resolution: one standard output size, no resolution parameter
- Aspect ratios: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9
- Output formats: jpg, png

## Pricing

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

- Every image: $0.034 on `official`, $0.017 on `official-cheap`, at any resolution it supports

## 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": "nano-banana-2-lite",
  "route_mode": "official-cheap",
  "prompt": "A red fox in fresh snow at sunrise, cinematic light",
  "aspect_ratio": "1:1",
  "output_format": "jpg",
  "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": "nano-banana-2-lite",
  "route_mode": "official-cheap",
  "prompt": "A red fox in fresh snow at sunrise, cinematic light",
  "aspect_ratio": "1:1",
  "output_format": "jpg",
  "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 2 Lite?

Nano Banana 2 Lite is an image generation model from Google. On MLMux you can run it in the browser or call it through one API. A lighter Nano Banana 2 for high-volume generation and quick iterations at a lower price per image.

### How do I use the Nano Banana 2 Lite 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 nano-banana-2-lite. The generated images are returned in the response.

### What can Nano Banana 2 Lite do?

Generation modes: Text to image. Each request returns images in aspect ratios such as 1:1, 1:4, 1:8, 2:3, 3:2, and 3:4. Reference images and image editing are not available for Nano Banana 2 Lite on MLMux yet.

### How much does Nano Banana 2 Lite cost?

MLMux is pay as you go, with no subscription or monthly fee, and 1 credit equals 1 US dollar. A Nano Banana 2 Lite image costs about $0.017 on the default official-cheap route and $0.034 on the official route at any resolution, billed on the tokens each request actually uses. The rates are listed in the pricing section of this page.

### Can I try Nano Banana 2 Lite without writing code?

Yes. Sign in and use the playground at the top of this page to run Nano Banana 2 Lite 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
