cd /news/ai-tools/unified-image-api · home topics ai-tools article
[ARTICLE · art-37488] src=openrouter.ai ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Unified Image API

OpenRouter launched a Unified Image API providing standardized access to over 30 image generation models from providers including Google, OpenAI, and Black Forest Labs. The API includes a model discovery endpoint with typed capability descriptors, per-provider granularity for parameters and pricing, and support for streaming previews on GPT Image models. This simplifies model switching and reduces integration errors for developers and AI agents.

read4 min views1 publishedJun 24, 2026

Brian Thomas ·

On this page #

Image generation on OpenRouter now has a dedicated API with unified access to 30+ models.

Like all our media generation APIs, we’ve standardized the interface for easy model switching, allowed passthrough for unique model capabilities, and provided programmatic access to discover the details of each individual model. We support models from Google, OpenAI, Black Forest Labs, Recraft, ByteDance, Sourceful, Microsoft, and xAI, with more being added all the time.

Browse image models | API docs | Try it in the playground

Know What Each Model Can Do #

Image models differ in ways that break requests. Seedream 4.5 supports 18 aspect ratios; Gemini 3.1 Flash Image supports 14 (overlapping, but not identical). Some models generate up to 10 images per call; others cap at 1. Some accept 16 input references; others accept 4.

The /api/v1/images/models

endpoint returns typed capability descriptors for every model:

{
  "id": "bytedance-seed/seedream-4.5",
  "supported_parameters": {
    "resolution": { "type": "enum", "values": ["1K", "2K", "4K"] },
    "aspect_ratio": { "type": "enum", "values": ["1:1", "16:9", "9:16", "..."] },
    "n": { "type": "range", "min": 1, "max": 10 },
    "input_references": { "type": "range", "min": 0, "max": 14 },
    "seed": { "type": "boolean" }
  },
  "supports_streaming": false
}

Your code can adapt to any model without hardcoding provider differences or battling 400 errors over unacceptable parameters.

This is especially useful for agents. Give your coding agent the /api/v1/images/models

response and it has everything it needs to pick a model, validate inputs, and generate images without trial-and-error.

Per-Provider Granularity #

Each model may be served by multiple providers. The per-endpoint records (/api/v1/images/models/{id}/endpoints

) give you the definitive truth for each one: which parameters this specific endpoint accepts, what passthrough keys are allowed, streaming support, and granular pricing.

curl "https://openrouter.ai/api/v1/images/models/google/gemini-3.1-flash-image/endpoints"

Each endpoint also returns a pricing

array with the exact billing structure. Different providers charge in different units:

"pricing": [
  { "billable": "output_image", "unit": "image", "cost_usd": 0.04 }
]

Seedream 4.5 charges a flat $0.04 per image. FLUX.2 Pro bills at $0.03 per megapixel (so resolution affects cost). GPT-5.4 Image 2 and Gemini 3.1 Flash Image bill per token. No more guessing why a generation cost what it did; the usage

object in every response includes the exact cost in USD.

One Request Shape, Any Model #

The API normalizes the fragmented world of image generation into one schema:

curl -X POST "https://openrouter.ai/api/v1/images" \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance-seed/seedream-4.5",
    "prompt": "a red panda astronaut floating in space, studio lighting",
    "resolution": "2K",
    "aspect_ratio": "16:9"
  }'

Resolution, aspect ratio, quality, output format, background transparency, input references, streaming: all normalized across every provider. When you need provider-specific features (like Black Forest Labs’ steps

or guidance

), pass them through provider.options

keyed by the provider slug from the endpoints API.

Streaming Previews for GPT Image Models #

OpenAI’s GPT Image models (GPT-5 Image, GPT-5 Image Mini, GPT-5.4 Image 2) support native SSE streaming through the Image API. Set "stream": true

and you’ll receive partial image previews as they’re rendered, so users see progress instead of waiting for the full generation. Check the supports_streaming

field on any endpoint to see if it’s available.

FAQ #

What happens to image generation through chat completions?

Until now, we supported image generation via completions and responses. All existing image models continue to be supported here, however new image models will be added exclusively to the dedicated Image API.

If you’re using openai/gpt-5-image

, openai/gpt-5-image-mini

, or openai/gpt-5.4-image-2

, we recommend switching to one of the dedicated image models. The GPT 5 and 5.4 versions generate images through an LLM, so they don’t provide access to the full set of supported parameters and may incur extra inference cost.

Can I use provider-specific features?

Yes. Each endpoint exposes an allowed_passthrough_parameters

list. Pass provider-specific keys under provider.options

keyed by the provider slug. The endpoints API tells you exactly which keys are accepted.

How does pricing work?

Each endpoint returns granular pricing lines with a billable unit, cost in USD, and optional variant tiers (e.g., resolution-based pricing). The usage

object in every response includes the exact cost.

Tell us what you think and which models you want next in #feedback on Discord.

── more in #ai-tools 4 stories · sorted by recency
── more on @openrouter 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/unified-image-api] indexed:0 read:4min 2026-06-24 ·