Gemini 2.5 Flash Image (Nano Banana) overview
Gemini 2.5 Flash Image (Nano Banana) specs
- Model ID
google/gemini-2.5-flash-image- Developer
- Context window
- 32,768 tokens
- Max output
- 32,768 tokens
- Input
- Image, Text
- Output
- Image
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
What is Gemini 2.5 Flash Image API?
Gemini 2.5 Flash Image is a text-to-image model powered by Gemini 2.5 Flash for fast, high-quality image generation.
Where to Use Gemini 2.5 Flash Image
High-volume image generation
Produce product visuals, thumbnails, and marketing assets programmatically at scale.
Use cases
- Professional product photography editing
- AI influencer and UGC content creation
- Marketing and social media creative workflows
- Architectural and environmental renderings with layout-aware outpainting
- Complex multi-step visual content editing (face, object, background)
- Film, game assets post-production and style transfer
- Real-time, iterative image refinement in creative applications
Gemini 2.5 Flash Image (Nano Banana) API pricing
| Usage | Price | Unit |
|---|---|---|
| Usage | $0.039 | per generation |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Gemini 2.5 Flash Image (Nano Banana) vs other model models: prices
AI/ML API rates for 3 models, per generation.
| Model | Per generation |
|---|---|
| $0.039 | |
| $0.15 | |
| $0.25 |
How to use the Gemini 2.5 Flash Image (Nano Banana) 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-2.5-flash-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-2.5-flash-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-2.5-flash-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
Gemini 2.5 Flash Image (Nano Banana) FAQ
What inputs and outputs does Gemini 2.5 Flash Image (Nano Banana) support?
Gemini 2.5 Flash Image (Nano Banana) takes image, text as input and returns image.
When was Gemini 2.5 Flash Image (Nano Banana) released?
Gemini 2.5 Flash Image (Nano Banana) became available on February 23, 2026.
How much does Gemini 2.5 Flash Image (Nano Banana) cost?
Gemini 2.5 Flash Image (Nano Banana) costs $0.039 per generation on AI/ML API, billed as you go with no subscription.
How is Gemini 2.5 Flash Image (Nano Banana) billed?
Gemini 2.5 Flash Image (Nano Banana) is billed per generation, a fixed charge per output rather than by prompt length.
Can Gemini 2.5 Flash Image (Nano Banana) take an existing image as input?
Yes, Gemini 2.5 Flash Image (Nano Banana) accepts image input as well as a text prompt.
Who created Gemini 2.5 Flash Image (Nano Banana)?
Gemini 2.5 Flash Image (Nano Banana) was built by Google.
How do I call Gemini 2.5 Flash Image (Nano Banana) on AI/ML API?
Send a request to https://api.aimlapi.com/v1/images/generations with google/gemini-2.5-flash-image as the model id.
Is Gemini 2.5 Flash Image (Nano Banana) available through a single API key?
Yes. Gemini 2.5 Flash Image (Nano Banana) is served through AI/ML API, so the same key and endpoint format used for other models applies.
What is the Gemini 2.5 Flash Image (Nano Banana) model ID?
Use google/gemini-2.5-flash-image as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.
What is the context window of Gemini 2.5 Flash Image (Nano Banana)?
Gemini 2.5 Flash Image (Nano Banana) accepts up to 32,768 tokens of context and returns up to 32,768 output tokens.


.webp)