Google
· Released 2025-10-09
Nano Banana (Gemini 2.5 Flash Image)
Gemini 2.5 Flash Image (“Nano Banana”) is Google’s state-of-the-art image generation and editing model with advanced contextual understanding. It supports image creation, editing, and multi-turn conversational refinement, enabling flexible visual workflows. Developers can control image aspect ratios through the image_config API parameter.
google/gemini-2.5-flash-image Official example
Input
Prompt
圣诞节的纽约时代广场,节日氛围浓厚!
Output

Parameters
Derived from the model input schema| Parameter | Type | Default | Description |
|---|---|---|---|
promptRequired | string | — | 提示词 |
aspect_ratio | string | 1:1 | 宽高比 |
response_modalities | array | IMAGE | 响应模态 |
imageRequired | string | — | 图片Url |
imagesRequired | array | — | 图片Url数组 |
API example
Submit a generation task, then poll for the result — one API key for every model.
Get API Key Get API Key# Submit task
curl https://router-integration.test.cogfoundry.ai/api/v1/tasks/generations \
-H "Authorization: Bearer $MODEL_CENTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash-image",
"aspect_ratio": "4:3",
"prompt": "圣诞节的纽约时代广场,节日氛围浓厚!",
"response_modalities": [
"IMAGE"
]
}'
# Poll result(REQUEST_ID 来自上一步返回的 data.request_id)
curl https://router-integration.test.cogfoundry.ai/api/v1/tasks/generations/REQUEST_ID \
-H "Authorization: Bearer $MODEL_CENTER_API_KEY" import requests
BASE = "https://router-integration.test.cogfoundry.ai/api/v1"
KEY = "$MODEL_CENTER_API_KEY"
headers = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}
# Submit task
resp = requests.post(f"{BASE}/tasks/generations", headers=headers, data='''{
"model": "google/gemini-2.5-flash-image",
"aspect_ratio": "4:3",
"prompt": "圣诞节的纽约时代广场,节日氛围浓厚!",
"response_modalities": [
"IMAGE"
]
}''')
request_id = resp.json()["data"]["request_id"]
# Poll result
result = requests.get(f"{BASE}/tasks/generations/{request_id}", headers=headers)
print(result.json()) const BASE = "https://router-integration.test.cogfoundry.ai/api/v1";
const KEY = "$MODEL_CENTER_API_KEY";
const headers = { Authorization: "Bearer " + KEY, "Content-Type": "application/json" };
// Submit task
const payload = {
"model": "google/gemini-2.5-flash-image",
"aspect_ratio": "4:3",
"prompt": "圣诞节的纽约时代广场,节日氛围浓厚!",
"response_modalities": [
"IMAGE"
]
};
const resp = await fetch(BASE + "/tasks/generations", {
method: "POST",
headers,
body: JSON.stringify(payload),
});
const { data } = await resp.json();
// Poll result
const result = await fetch(BASE + "/tasks/generations/" + data.request_id, { headers });
console.log(await result.json()); Pricing
USD · live rate| Pricing | USD |
|---|---|
| Input | $0.30 |
| 输入图像 | $0.30 |
| 输入视频 | $0.30 |
| 输入音频 | $1.00 |
| Output | $2.50 |
| 输出图像 | $30.00 |
Providers
Channels serving this model| Provider | From |
|---|---|
| Google Vertex | $0.30 |
| OpenRouter | $0.30 |