Nano Banana 2
nano-banana-2 HotGemini 3.1 Flash Image: fast generation and editing, accurate text in images, up to 14 references.
Pricing: $0.02 per image · failed tasks — $0 · ~1.5 min
Output

The result will appear here.
It usually takes ~1.5 min.
recordInfo response (data):
Run a task to see the JSON.
A small robot watering flowers on a windowsill, watercolor, morning light
1. Create a task POST /api/v1/jobs/createTask
curl -X POST https://ai.aimixmedia.site/api/v1/jobs/createTask \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-123" \
-d '{
"model": "nano-banana-2",
"callBackUrl": "https://your-app.example/callback",
"input": {
"prompt": "A small robot watering flowers on a windowsill, watercolor, morning light",
"image_input": [
"https://example.com/photo.jpg"
],
"aspect_ratio": "auto",
"resolution": "1K",
"output_format": "jpg"
}
}'import time, requests
API = "https://ai.aimixmedia.site/api/v1"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
task = requests.post(f"{API}/jobs/createTask", headers=HEADERS, json={
"model": "nano-banana-2",
"callBackUrl": "https://your-app.example/callback",
"input": {
"prompt": "A small robot watering flowers on a windowsill, watercolor, morning light",
"image_input": [
"https://example.com/photo.jpg"
],
"aspect_ratio": "auto",
"resolution": "1K",
"output_format": "jpg"
}
}).json()
task_id = task["data"]["taskId"]
while True:
info = requests.get(f"{API}/jobs/recordInfo", headers=HEADERS, params={"taskId": task_id}).json()["data"]
if info["state"] in ("success", "fail"):
break
time.sleep(4)
print(info["state"], info.get("resultJson") or info.get("failMsg"))const API = "https://ai.aimixmedia.site/api/v1";
const headers = { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
const { data } = await fetch(`${API}/jobs/createTask`, {
method: "POST", headers,
body: JSON.stringify({
"model": "nano-banana-2",
"callBackUrl": "https://your-app.example/callback",
"input": {
"prompt": "A small robot watering flowers on a windowsill, watercolor, morning light",
"image_input": [
"https://example.com/photo.jpg"
],
"aspect_ratio": "auto",
"resolution": "1K",
"output_format": "jpg"
}
}),
}).then((r) => r.json());
let info;
do {
await new Promise((r) => setTimeout(r, 4000));
info = (await fetch(`${API}/jobs/recordInfo?taskId=${data.taskId}`, { headers }).then((r) => r.json())).data;
} while (!["success", "fail"].includes(info.state));
console.log(info.state, info.resultJson ?? info.failMsg);
Response: {"code":200,"msg":"success","data":{"taskId":"task_..."}}. callBackUrl and Idempotency-Key are optional.
2. Status and result GET /api/v1/jobs/recordInfo
curl "https://ai.aimixmedia.site/api/v1/jobs/recordInfo?taskId=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
data.state: waiting | queuing | generating | success | fail. On success data.resultJson is a JSON string with resultUrls.
3. Upload a photo (optional) POST /api/v1/files/upload
curl -X POST https://ai.aimixmedia.site/api/v1/files/upload \
-H "Authorization: Bearer YOUR_API_KEY" -F "file=@photo.jpg"
Returns data.url — pass it in input.image_input. Any public https URL works too.
Input parameters
| Field | Type | Values |
|---|---|---|
prompt * | string | up to 20000 chars |
image_input * | string[] (URL) | up to 14 URLs |
aspect_ratio | string | auto | 1:1 | 2:3 | 3:2 | 1:4 | 4:1 | 3:4 | 4:3 | 4:5 | 5:4 | 1:8 | 8:1 | 9:16 | 16:9 | 21:9 · default auto |
resolution | string | 1K | 2K | 4K · default 1K |
output_format | string | jpg | png · default jpg |

Nano Banana 2 (Gemini 3.1 Flash Image) is Google's main image model. It keeps characters consistent, renders legible text inside images, understands long prompts (up to 20,000 characters) and accepts up to 14 reference images for editing, compositing and style transfer.
1K is faster and lighter, 2K gives maximum detail. A generation usually takes 1–2.5 minutes.
Pricing
Image to Image · nano-banana-2 | $0.02 |
Text to Image · nano-banana-2 | $0.02 |
| Task failed | $0 (auto refund) |
| Retry with the same Idempotency-Key | $0 |
Retention
Results are kept for 30 days, run history forever. Download important files in time.
API model ID: nano-banana-2 · aliases: google/nano-banana-2