Hormouz AIHormouzSign in

Google: Nano Banana (Gemini 2.5 Flash Image): AI model

Gemini 2.5 Flash Image is a Google image generation and editing model that turns prompts and reference images into new visuals. Served asynchronously through Hormouz.

Context window:
32,768 tokens
Input:
$0.3/1M tokens
Output:
$2.5/1M tokens
Type:
text, image
  • Vision
  • Streaming

Gemini 2.5 Flash Image is a Google image generation and editing model. It produces new images from text prompts and can edit or combine reference images while keeping the requested composition, subjects and style. It accepts images and text as input and returns generated images.

Image requests run asynchronously: you submit a prediction and then poll for the result, which fits longer-running generation and batch workloads. Typical uses include product visuals, marketing creative, illustration, and iterative edit-and-refine workflows.

Pricing is usage-based at $0.3/M in · $2.5/M out · $30/M image-output tokens. Gemini 2.5 Flash Image is served through Hormouz behind an asynchronous predictions API, with stable access from inside Iran.

Gemini 2.5 Flash Image, a.k.a. "Nano Banana," is now generally available. It is a state of the art image generation model with contextual understanding. It is capable of image generation,...

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-2.5-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

VendorGoogle
TypeText, Image
Context window32,768 tokens
Pricing$0.30/M in · $2.50/M out
APIChat Completions
CapabilitiesStreaming · Vision
Graphic Design
Top 87%
1,154Elo
Win rate: 52.5%Avg time: 8.5s
Image
Top 87%
1,181Elo
Win rate: 53.4%Avg time: 7.4s
Logo
Top 81%
1,170Elo
Win rate: 51.4%Avg time: 7.3s

Metrics sourced from Design Arena

Code example

cURL
# 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-2.5-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}"
Python
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-2.5-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))
JavaScript
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-2.5-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 (Gemini 2.5 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 (Gemini 2.5 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.
Create an accountBuy Gemini API access, paid in rial

Use via Hormouz

Connect to this model and 600+ others with one API key, then see usage down to each request.

Request company access

FAQ

What does Gemini 2.5 Flash Image produce?
It generates and edits images from images and text. Requests run asynchronously via the predictions API. Submit, then poll for the result.
What is the context window of Gemini 2.5 Flash Image?
Up to 33K tokens, suitable for long documents and multi-turn conversations.
How much does Gemini 2.5 Flash Image cost?
Usage-based pricing: $0.3/M in · $2.5/M out · $30/M image-output tokens.
What is Gemini 2.5 Flash Image good for?
Product visuals, marketing creative, illustration, and iterative image edits where you refine a result across turns.
How do I access Gemini 2.5 Flash Image from inside Iran?
Create an account on Hormouz and generate an API key. Hormouz provides stable access from inside Iran via an asynchronous predictions API.

Updated 2026-10-13