Nano Banana 2 Lite overview
Nano Banana 2 Lite specs
- Model ID
google/gemini-3.1-flash-lite-image- Developer
- Context window
- 65,536 tokens
- Max output
- 58,982 tokens
- Input
- Text, Image
- Output
- Image
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
What is Nano Banana 2 Lite API?
Nano Banana 2 Lite is the most cost-efficient model in Google's Gemini 3.1 family. The model (google/gemini-3.1-flash-lite-image) handles text understanding, image input, and native image generation in a single unified architecture, without switching between separate models.
It ships under Google's standard commercial terms and is available via AI/ML API with no special tier requirement.
[Performance Benchmarks embed]
Use cases
Rapid prototyping and brainstorming visual ideas are documented use cases for Nano Banana 2 Lite, with Google describing it as ideal for rapid prototyping and brainstorming visual ideas.
Generating large batches of images is another stated use case, especially where high volume and speed matter.
Interactive prototyping and rapid visual drafting are explicitly mentioned, with the model described as well-suited for interactive prototyping and rapid visual drafting.
Contextual scene creation, including accurate contextual scenes and rough data visualizations, is also called out as a fit for the model.
Nano Banana 2 Lite API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.25 | 1M tokens |
| Output | $30 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Nano Banana 2 Lite vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.25 | $30 | |
| $0.3 | $2.5 | |
| $0.75 | $3.75 | |
| $0.75 | $3.75 | |
| $2 | $10 |
How to use the Nano Banana 2 Lite API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "google/gemini-3.1-flash-lite-image",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "google/gemini-3.1-flash-lite-image",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "google/gemini-3.1-flash-lite-image",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Nano Banana 2 Lite FAQ
What inputs and outputs does Nano Banana 2 Lite support?
Nano Banana 2 Lite takes image, text as input and returns image.
How much does Nano Banana 2 Lite cost?
Nano Banana 2 Lite costs $0.25 input and $30 output per 1M tokens on AI/ML API, billed as you go with no subscription.
How is Nano Banana 2 Lite billed?
Nano Banana 2 Lite is billed per token, charged separately for input and output.
Can Nano Banana 2 Lite take an existing image as input?
Yes, Nano Banana 2 Lite accepts image input as well as a text prompt.
Who created Nano Banana 2 Lite?
Nano Banana 2 Lite was built by Google.
How do I call Nano Banana 2 Lite on AI/ML API?
Send a request to https://api.aimlapi.com/v1/images/generations with google/gemini-3.1-flash-lite-image as the model id.
Is Nano Banana 2 Lite available through a single API key?
Yes. Nano Banana 2 Lite is served through AI/ML API, so the same key and endpoint format used for other models applies.
Is Nano Banana 2 Lite a scaled-down version of another model?
Yes, it is a lighter and cheaper variant of Nano Banana 2, built for high-volume image generation.
What is the Nano Banana 2 Lite model ID?
Use google/gemini-3.1-flash-lite-image as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.
What is the context window of Nano Banana 2 Lite?
Nano Banana 2 Lite accepts up to 65,536 tokens of context and returns up to 58,982 output tokens.


.webp)