Skip to content

Image generation

The catalog has three generation models: two Google Gemini ones (the famous Nano Banana) and OpenAI GPT Image 2. All work through the same key and balance as the text models.

Model≈ per imageHow to call
google/gemini-3.1-flash-image-preview (Nano Banana)~$0.012chat + modalities
google/gemini-3-pro-image (Nano Banana Pro)~$0.028chat + modalities
openai/gpt-image-2~$0.001–0.10 (varies by size & quality)/v1/images/generations

Which to pick: Flash — bulk generation and iterations for pennies; Pro — maximum quality, complex scenes, readable in-image text; GPT Image 2 — if your tool only speaks the classic OpenAI images endpoint.

GPT Image 2 — resolutions, quality and price

Resolutions (size): 1024x1024, 1024x1536 (portrait), 1536x1024 (landscape), 2048x2048, and up to 3840px on the long edge (e.g. 3840x2160). Exactly 4096x4096 is not supported.

Quality (quality): low, medium, high, auto.

Priced by actual output tokens (not flat): the larger and higher-quality the image, the more tokens. Ballpark:

Size · qualityOutput tokensPrice
1024×1024 · low~200~$0.0014
1024×1024 · high~7,000~$0.05
1536×1024 · high~10,500~$0.076
2048×2048 · high~14,300~$0.10

The exact cost of each request is in the response — usage.output_tokens. Failed requests are not charged (the reserve is refunded automatically).

Nano Banana (Gemini) — generation

Gemini models are image-output chat models: a regular /v1/chat/completions call with the modalities field. They do not work via /v1/images/generations.

bash
curl https://nordrouter.com/v1/chat/completions \
  -H "Authorization: Bearer sk-nr-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image-preview",
    "modalities": ["image", "text"],
    "messages": [{ "role": "user", "content": "A cozy cabin in the woods, watercolor" }]
  }'
python
from openai import OpenAI

client = OpenAI(base_url="https://nordrouter.com/v1", api_key="sk-nr-YOUR-KEY")

resp = client.chat.completions.create(
    model="google/gemini-3.1-flash-image-preview",
    modalities=["image", "text"],
    messages=[{"role": "user", "content": "A cozy cabin in the woods, watercolor"}],
)
img_b64 = resp.choices[0].message.images[0]["image_url"]["url"]  # data:image/png;base64,...

Images arrive in message.images[] as data URLs (base64) — save everything after the comma to a file.

Nano Banana — photo editing

Nano Banana's killer feature: send your photo + a text command — get the edited image back. It works as a dialogue: refine with "now also…" in follow-up messages.

python
resp = client.chat.completions.create(
    model="google/gemini-3.1-flash-image-preview",
    modalities=["image", "text"],
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "Repaint the car blue and remove the background"},
            {"type": "image_url", "image_url": {"url": "data:image/png;base64,<YOUR-PHOTO>"}},
        ],
    }],
)

The input photo bills as ~1,000–1,200 input tokens (pennies); the result bills as a regular generation.

GPT Image 2

The classic OpenAI images endpoint:

bash
curl https://nordrouter.com/v1/images/generations \
  -H "Authorization: Bearer sk-nr-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "prompt": "Coffee shop logo, minimalist, emerald on white",
    "size": "1024x1024",
    "n": 1
  }'
python
resp = client.images.generate(
    model="openai/gpt-image-2",
    prompt="Coffee shop logo, minimalist, emerald on white",
    size="1024x1024",
)
img_b64 = resp.data[0].b64_json

How it's billed

  • Gemini (Nano Banana): an image = output tokens (~1,100–1,500 per picture), visible in usage.completion_tokens_details.image_tokens. At catalog prices: Flash ~$0.012, Pro ~$0.028 per image.
  • GPT Image 2: by actual output tokens (usage.output_tokens) — price scales with size and quality (see the table above). From ~$0.0014 for a small low image to ~$0.10 for 2K high.
  • Failed requests (provider errors) are not charged — the reserve is refunded automatically.

Bulk generation

Ten images on Nano Banana Flash ≈ $0.12. Use Flash for drafts and iteration, Pro for the final shot.

Seedream 5.0 Pro — the cheapest image

bytedance/seedream-5.0-pro — photorealistic images at a flat $0.0083 per image (the lowest price on the platform). Same POST /v1/images/generations endpoint (response carries data[0].b64_json, ~1–2 min per image), also available in the studio and the Telegram bot.