Back to Claude Scientific Skills

OpenRouter image model reference

skills/generate-image/references/models.md

2.62.011.8 KB
Original Source

OpenRouter image model reference

Snapshot of GET https://openrouter.ai/api/v1/images/models, verified 2026-07-31. The catalogue moves and this table will drift, so treat the live listing as authoritative:

bash
python scripts/generate_image.py --list-models            # every model, with allowed values
python scripts/generate_image.py --list-models gemini     # filtered by substring
python scripts/generate_image.py --model-info MODEL       # one model, plus pricing

No API key is needed for any of those, and nothing is billed. The script validates every request against this same metadata before spending money, so an unsupported parameter or an out-of-enum value fails locally rather than as an HTTP 400 — you do not have to memorise the tables below.

Which parameters each model accepts

n is images per request; refs is the maximum number of input_references. Prices are the output-image rate the API reports; token-billed models scale with output resolution, so a 4K image costs roughly sixteen times a 1K one.

ModelnrefsstreamParametersOutput price
google/gemini-3.1-flash-image114noaspect_ratio, input_references, n, resolution$0.00006/token
google/gemini-3.1-flash-image-preview114noaspect_ratio, input_references, n, resolution$0.00006/token
google/gemini-3-pro-image114noaspect_ratio, input_references, n, resolution$0.00012/token
google/gemini-3-pro-image-preview114noaspect_ratio, input_references, n, resolution$0.00012/token
google/gemini-3.1-flash-lite-image114noaspect_ratio, input_references, n, resolution$0.00003/token
google/gemini-2.5-flash-image13noaspect_ratio, input_references, n$0.00003/token
bytedance-seed/seedream-4.51014noaspect_ratio, input_references, n, resolution, seed$0.04/image
openai/gpt-image-21016yesaspect_ratio, background, input_references, n, output_compression, quality$0.00003/token
openai/gpt-image-11016yesaspect_ratio, background, input_references, n, output_compression, quality$0.00004/token
openai/gpt-image-1-mini1016yesaspect_ratio, background, input_references, n, output_compression, quality$0.000008/token
openai/gpt-5.4-image-21016yesbackground, input_references, n, output_compression, quality$0.00003/token
openai/gpt-5-image1016yesbackground, input_references, n, output_compression, quality$0.00004/token
openai/gpt-5-image-mini1016yesbackground, input_references, n, output_compression, quality$0.000008/token
krea/krea-2-large1noaspect_ratio, input_references, resolution, seednot published
krea/krea-2-medium1noaspect_ratio, input_references, resolution, seednot published
krea/krea-2-medium-turbo1noaspect_ratio, input_references, resolution, seednot published
microsoft/mai-image-2.511noaspect_ratio, input_references, n$0.000047/token
microsoft/mai-image-2.5-pro11noaspect_ratio, input_references, n$0.000108/token
recraft/recraft-v4.161noaspect_ratio, input_references, n$0.035/image
recraft/recraft-v4.1-pro61noaspect_ratio, input_references, n$0.21/image
recraft/recraft-v4.1-vector61noaspect_ratio, input_references, n$0.08/image
recraft/recraft-v4.1-pro-vector61noaspect_ratio, input_references, n$0.30/image
recraft/recraft-v4.1-utility61noaspect_ratio, input_references, n$0.035/image
recraft/recraft-v4.1-utility-pro61noaspect_ratio, input_references, n$0.21/image
recraft/recraft-v461noaspect_ratio, input_references, n$0.04/image
recraft/recraft-v4-pro61noaspect_ratio, input_references, n$0.25/image
recraft/recraft-v4-vector61noaspect_ratio, input_references, n$0.08/image
recraft/recraft-v4-pro-vector61noaspect_ratio, input_references, n$0.30/image
recraft/recraft-v361noaspect_ratio, input_references, n$0.04/image
sourceful/riverflow-v2.5-pro110noaspect_ratio, background, input_references, n, output_format, resolution$0.13/image; $0.15 at 2K; $0.17 at 4K
sourceful/riverflow-v2.5-fast14noaspect_ratio, background, input_references, n, output_format, resolution$0.019/image; $0.021 at 2K
sourceful/riverflow-v2-pro110noaspect_ratio, input_references, n, resolution$0.15/image; $0.33 at 4K
sourceful/riverflow-v2-fast14noaspect_ratio, input_references, n, resolution$0.02/image; $0.04 at 2K
x-ai/grok-imagine-image-quality13noaspect_ratio, input_references, n, resolution$0.05/image at 1K; $0.07 at 2K

Riverflow also bills reference images: v2 charges $0.20 per input_reference and $0.03 per input font. The Krea models publish no price through the API — check the cost the script reports after a run before using them at volume.

Which values each parameter accepts

Support is not enough: the allowed values differ per model too, and an out-of-enum value is rejected the same way an unsupported parameter is. A dash means the model does not accept the parameter at all.

Modelresolutionoutput_formatbackgroundqualityseed
google/gemini-3.1-flash-image512, 1K, 2K, 4K
google/gemini-3.1-flash-image-preview512, 1K, 2K, 4K
google/gemini-3-pro-image1K, 2K, 4K
google/gemini-3-pro-image-preview1K, 2K, 4K
google/gemini-3.1-flash-lite-image1K only
google/gemini-2.5-flash-image
bytedance-seed/seedream-4.51K, 2K, 4Kyes
openai/gpt-image-2auto, opaqueauto, low, medium, high
openai/gpt-image-1auto, transparent, opaqueauto, low, medium, high
openai/gpt-image-1-miniauto, transparent, opaqueauto, low, medium, high
openai/gpt-5.4-image-2auto, opaqueauto, low, medium, high
openai/gpt-5-imageauto, transparent, opaqueauto, low, medium, high
openai/gpt-5-image-miniauto, transparent, opaqueauto, low, medium, high
krea/krea-2-*1K onlyyes
microsoft/mai-image-2.5, -pro
recraft/*
sourceful/riverflow-v2.5-pro1K, 2K, 4Kpng, jpeg, webpauto, transparent, opaque
sourceful/riverflow-v2.5-fast1K, 2Kjpeg onlyauto, transparent, opaque
sourceful/riverflow-v2-pro, -fast1K, 2K, 4K
x-ai/grok-imagine-image-quality1K, 2K

Traps worth knowing, because each one is a wasted round trip:

  • transparent is not available on gpt-image-2 or gpt-5.4-image-2, the newest OpenAI models. Use gpt-image-1, gpt-image-1-mini, gpt-5-image, gpt-5-image-mini, or Riverflow 2.5.
  • 512 exists only on Gemini 3.1 Flash. flash-lite and the Krea models take 1K and nothing else.
  • output_compression is offered only by the OpenAI models, and none of them accept output_format — the container is theirs to choose.
  • No model accepts size. Shape the output with aspect_ratio and resolution.
  • No model accepts output_format: svg. SVG comes from the Recraft vector models, which return media_type: image/svg+xml regardless of that parameter.

Aspect ratio enums

aspect_ratio is the most varied parameter, and three OpenAI models do not accept it at all.

ModelsAllowed
gemini-3.1-flash-image, -preview, flash-lite1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9
gemini-3-pro-image, -preview, gemini-2.5-flash-image1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
seedream-4.51:1, 1:2, 2:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 9:19.5, 19.5:9, 9:20, 20:9, 9:21, 21:9, auto
gpt-image-21:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9, auto
gpt-image-1, gpt-image-1-mini1:1, 3:2, 2:3, auto only — no 16:9
gpt-5-image, gpt-5-image-mini, gpt-5.4-image-2not accepted at all
recraft/*1:1, 4:3, 3:4, 16:9, 9:16, auto
riverflow-*1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, auto
mai-image-2.5, -pro1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, auto
krea/krea-2-*1:1, 4:3, 3:2, 16:9, 4:5, 2:3, 9:16
grok-imagine-image-quality1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1, auto

Choosing a model

  • General quality and prompt adherencegoogle/gemini-3.1-flash-image (skill default), or google/gemini-3-pro-image for the higher tier at double the token rate.
  • Cheap iterationgoogle/gemini-3.1-flash-lite-image (half the flash rate, but 1K only) or openai/gpt-image-1-mini. Measured: one 1K flash-lite image is 1120 output tokens, $0.034.
  • Photoreal and artistic controlbytedance-seed/seedream-4.5 (flat $0.04/image, seeded) or microsoft/mai-image-2.5-pro.
  • Reproducible output from a seedbytedance-seed/seedream-4.5 and the Krea models. The Gemini and OpenAI families do not accept seed.
  • Batchesbytedance-seed/seedream-4.5 or the OpenAI family, up to 10 per request. Gemini, Riverflow, MAI, and Grok cap at 1; Recraft at 6.
  • True vector output (SVG)recraft/recraft-v4.1-vector, recraft/recraft-v4-vector, and the -pro-vector variants. These return media_type: image/svg+xml.
  • Text rendered legibly inside the image — Recraft (which takes text_layout as a passthrough parameter) and Riverflow are the strongest, but no model is dependable. Prefer overlaying text in LaTeX, PowerPoint, or HTML.
  • Transparent backgroundsgpt-image-1, gpt-image-1-mini, gpt-5-image, gpt-5-image-mini, or riverflow-v2.5-*.
  • Heavy multi-reference compositing — OpenAI (16 references), Gemini and Seedream (14), riverflow-v2*-pro (10). Recraft, MAI, and Krea accept exactly 1.

Passthrough parameters

GET /api/v1/images/models/<model>/endpoints lists allowed_passthrough_parameters — provider options the Image API forwards but the bundled script does not expose. Notable sets:

  • Recraft: style, controls, text_layout
  • Krea: styles, moodboards, image_style_references, creativity, intensity, complexity, movement, strength
  • OpenAI: moderation
  • Gemini: cachedContent
  • Riverflow: font_inputs

Send a direct request when you need one of these. --model-info MODEL prints the list.

Provider routing

The Image API accepts the same provider block as chat completions — provider.only, provider.order, provider.ignore, provider.sort (price, throughput, latency), and provider.allow_fallbacks. The bundled script does not expose these; send a direct request when routing control matters.

Billing

Image billing is all-or-nothing: a generation either completes and is billed in full, or fails and is not billed. A rejected parameter therefore costs nothing but time. Partial preview frames delivered during streaming are not charged separately.

Per-request cost comes back in usage.cost, which the script prints. On a bring-your-own-key account usage.cost is 0 and the real figure is in cost_details.upstream_inference_cost, where the upstream provider bills you directly — the script reports that instead of claiming the generation was free.