Nano Banana 2 Lite

GoogleImages

The light tier of Nano Banana 2: the same editing model at half the price, 1K.

Our price
$0.028
per image
Official
$0.034
17% vs official

First request

from openai import OpenAI

client = OpenAI(
    base_url="https://api.altrouter.ai/v1",
    api_key="ar-...",
)

img = client.images.generate(
    model="nano-banana-2-lite",
    prompt="a red fox in the snow",
)
print(img.data[0].url)
API

OpenAI-compatible image generation endpoint. The result is re-hosted on our CDN and returned as a URL.

POST/v1/images/generations
Body parameters
modelstringrequired"nano-banana-2-lite"
The model id.
promptstringrequired
The text description of the image.
imagestringURL or base64
Reference images for editing.
aspect_ratioenumauto · 1:1 · 2:3 · 3:2 · 3:4 · 4:3 · 4:5 · 5:4 · 9:16 · 16:9 · 21:9 · 1:4 · 4:1 · 1:8 · 8:1default auto
Output aspect ratio.
Response
createdinteger
Unix creation time (seconds).
dataarray
Images. Each: url (our CDN), b64_json, revised_prompt.
Example
cURLPythonJSON
curl https://api.altrouter.ai/v1/images/generations \
  -H "Authorization: Bearer ar-..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "nano-banana-2-lite",
  "prompt": "a red fox in the snow",
  "aspect_ratio": "auto"
}'
Errors
400Invalid request.
401Missing or invalid API key.
402Insufficient credits, or the key’s spending cap is exhausted.
404Model not found.
429Rate limit exceeded.

More from Google