Google: Nano Banana 2 (Gemini 3.1 Flash Image): AI model
Gemini 3.1 Flash Image is a Google image model delivering Pro-level visual quality at Flash speed for generation and editing. Served asynchronously through Hormouz from inside Iran.
- Context window:
- 131,072 tokens
- Input:
- $0.5/1M tokens
- Output:
- $3/1M tokens
- Type:
- text, image
- Vision
- Streaming
- Long context
Thinking levels: high · minimal
Gemini 3.1 Flash Image is Google's image generation and editing model that pairs high visual quality with fast, cost-efficient inference. It combines strong contextual understanding with quick turnaround, making complex generation and iterative edits more accessible.
A single flow handles text-to-image, image editing and multi-image composition, and aspect ratios can be set through an image-configuration parameter. It is served through Hormouz behind an asynchronous predictions API. Submit a prediction, then poll until the image is ready.
Pricing is token-based: $0.5 per million input tokens, $3 per million output tokens and $60 per million image-output tokens. Hormouz provides stable access to Gemini 3.1 Flash Image from inside Iran, with no foreign credit card or circumvention tooling required.
Gemini 3.1 Flash Image, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines advanced...
Quickstart
# The image comes back as a data: URI on message.images, not as text.
URL=$(curl -s https://api.hormouz.net/v1/chat/completions \
-H "Authorization: Bearer ng-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3.1-flash-image",
"modalities": ["image", "text"],
"messages": [{"role": "user", "content": "A red apple on a wooden table"}]
}' | jq -r '.choices[0].message.images[0].image_url.url')
# Take the extension from the URI itself — this model may answer png or jpeg.
EXT=$(printf '%s' "$URL" | sed -n 's|^data:image/\([a-z]*\);.*|\1|p')
printf '%s' "$URL" | sed 's/^data:[^,]*,//' | base64 -d > "output.${EXT:-png}"Specs
| Vendor | |
|---|---|
| Type | Text, Image |
| Context window | 131,072 tokens |
| Pricing | $0.50/M in · $3.00/M out |
| API | Chat Completions |
| Capabilities | Streaming · Vision |
Code example
# The image comes back as a data: URI on message.images, not as text.
URL=$(curl -s https://api.hormouz.net/v1/chat/completions \
-H "Authorization: Bearer ng-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3.1-flash-image",
"modalities": ["image", "text"],
"messages": [{"role": "user", "content": "A red apple on a wooden table"}]
}' | jq -r '.choices[0].message.images[0].image_url.url')
# Take the extension from the URI itself — this model may answer png or jpeg.
EXT=$(printf '%s' "$URL" | sed -n 's|^data:image/\([a-z]*\);.*|\1|p')
printf '%s' "$URL" | sed 's/^data:[^,]*,//' | base64 -d > "output.${EXT:-png}"import base64
from openai import OpenAI
client = OpenAI(api_key="ng-YOUR_API_KEY", base_url="https://api.hormouz.net/v1")
response = client.chat.completions.create(
model="google/gemini-3.1-flash-image",
messages=[{"role": "user", "content": "A red apple on a wooden table"}],
modalities=["image", "text"],
)
# message.content is None on an image reply — the picture is in message.images.
for i, img in enumerate(response.choices[0].message.images or []):
header, b64 = img["image_url"]["url"].split(",", 1)
ext = "png" if "image/png" in header else "jpg"
with open(f"output_{i}.{ext}", "wb") as f:
f.write(base64.b64decode(b64))import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({ apiKey: "ng-YOUR_API_KEY", baseURL: "https://api.hormouz.net/v1" });
const response = await client.chat.completions.create({
model: "google/gemini-3.1-flash-image",
messages: [{ role: "user", content: "A red apple on a wooden table" }],
modalities: ["image", "text"],
});
// message.content is null on an image reply — the picture is in message.images.
(response.choices[0].message.images ?? []).forEach((img, i) => {
const url = img.image_url.url;
const ext = url.startsWith("data:image/png") ? "png" : "jpg";
fs.writeFileSync(`output_${i}.${ext}`, Buffer.from(url.slice(url.indexOf(",") + 1), "base64"));
});Buy the Google: Nano Banana 2 (Gemini 3.1 Flash Image) API, paid in rial
- Buy credit with an Iranian bank card; no foreign card or account needed.
- One Hormouz key reaches Google: Nano Banana 2 (Gemini 3.1 Flash Image) and 600+ other models, and you pay only for what you use.
- No VPN and no risk of a banned account; just change the base URL to api.hormouz.net/v1.
Use via Hormouz
Connect to this model and 600+ others with one API key, then see usage down to each request.
Request company accessFAQ
- How much does Gemini 3.1 Flash Image cost?
- Billing is token-based: $0.5 per million input tokens, $3 per million output tokens and $60 per million image-output tokens. Current rates are shown in the Hormouz dashboard.
- How do I access Gemini 3.1 Flash Image from inside Iran?
- Create an account on Hormouz and generate an API key. Hormouz provides a stable path to Gemini 3.1 Flash Image from inside Iran, with no foreign credit card or circumvention tooling required.
- How is Gemini 3.1 Flash Image served on Hormouz?
- On Hormouz, Gemini 3.1 Flash Image is served behind an asynchronous predictions API: submit a prediction, then poll until the result is ready. Point your base URL at Hormouz and use a Hormouz key.
- What is special about Gemini 3.1 Flash Image?
- It delivers Pro-level visual quality at Flash speed and cost, handling text-to-image, editing and multi-image composition in one flow, with aspect ratio set via an image-configuration parameter. It runs on an asynchronous predictions API.
Updated 2026-10-13