Large Language ModelsGenerate imagesGenerate videos

OpenRouter Image Generation: Models, API and Pricing

OpenRouter puts image models from Google, OpenAI, Black Forest Labs, ByteDance and others behind one endpoint. This article shows the request format, the parameters that change quality and cost, the price spread between models, and when a dedicated image platform fits better.

OpenRouter Image Generation: Models, API and Pricing
Cristian Da Conceicao
Founder of Picasso IA

OpenRouter built its name as one door to hundreds of text models, and it now does the same for pictures. One account, one bill and one request shape let you move between image models from Google, OpenAI, Black Forest Labs, ByteDance and others by changing a single string. That convenience is real, but a few details decide whether an image feature stays cheap or quietly turns expensive.

This article walks through OpenRouter image generation from the first request to the monthly invoice: the models you can pick, the exact API call, the parameters that change quality, and a straight look at what one image costs. It also shows where a dedicated platform like PicassoIA fits when you want browser-based control instead of code.

What OpenRouter Image Generation Does

One Endpoint, Many Providers

Image generation on OpenRouter runs through a dedicated endpoint, POST /api/v1/images. You send a model slug and a prompt, and base64 image data comes back. Behind that single door sit separate providers, each with its own model, limits and price. OpenRouter handles the routing, the authentication and the billing, so your code never talks to those providers directly.

The catalog is wide. At the time of writing it includes image models from Google, OpenAI, Black Forest Labs, xAI, ByteDance, Microsoft, Recraft, Krea and Sourceful, and the list changes often. Filtering OpenRouter's public model list by image output shows what is available on any given day.

Who It Suits Best

A single gateway pays off in a few situations:

  • Prototyping: test five models against the same prompt without opening five accounts.
  • Fallbacks: if one provider is slow or down, route the same request somewhere else.
  • Unified billing: one invoice instead of one per vendor.
  • Mixed pipelines: an app that already sends text prompts through OpenRouter can add images with the same token.

It pays off less when you need a visual editor, a gallery of past results or hands-on control over every setting. That is a browser job, and we come back to it near the end.

Wall of camera lenses in a rental shop, one gateway to many image models

Calling the Images Endpoint

The Smallest Working Request

You need an OpenRouter account, a secret token with credit behind it, and a model slug. Store the token in an environment variable. This article calls it OPENROUTER_TOKEN, but the name is yours to choose.

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

That is the whole request. The slug follows the pattern author/model-name, and here it points at Seedream 4.5. Everything else is optional, which is why a first test takes about two minutes.

Developer typing a request at a standing desk in a bright loft

Parameters That Change the Result

The images endpoint accepts a long list of optional fields. These are the ones that matter most:

ParameterWhat it controlsExample values
resolutionOutput size tier512, 768, 1K, 2K, 4K
aspect_ratioFrame shape1:1, 16:9, 9:16, 4:3, 3:4
sizeShorthand for a tier or explicit pixelsA tier name or a width and height
qualityRendering effortauto, low, medium, high
output_formatFile typepng, jpeg, webp, svg
backgroundTransparencyauto, transparent, opaque
output_compressionFile size for webp and jpeg0 to 100
nImages per request1 to 10, where supported
seedRepeatable outputAny integer, where supported
input_referencesReference images for image to image workA list of images
streamPartial previews over server-sent eventstrue or false

Not every model accepts every field. Each model has an endpoints route that lists the supported parameters, the pricing and whether streaming works, so read it before you rely on a setting. The svg output format only makes sense with vector-capable models.

Streaming deserves a special mention. With stream enabled, the endpoint sends partial images as they form, so a user interface can show a rough preview within moments instead of a blank spinner. Previews are free: only a finished image is billed. If your app has a waiting screen, this is the cheapest way to make it feel faster.

💡 Tip: Change one thing at a time. If you swap the model and the prompt together, you can't tell which one moved the result. Pin a seed where the model supports it and vary a single field per run.

Photographer's hands turning the aperture ring of a camera lens

Reading the Response

Images arrive as base64 text inside a data array. Each item carries b64_json, the encoded bytes, and media_type, such as image/png or image/svg+xml. The response also includes a usage object, and usage.cost tells you what that job billed.

import base64, os, requests

resp = requests.post(
    "https://openrouter.ai/api/v1/images",
    headers={"Authorization": f"Bearer {os.environ['OPENROUTER_TOKEN']}"},
    json={
        "model": "bytedance-seed/seedream-4.5",
        "prompt": "a ceramic mug on a marble counter, soft window light",
        "aspect_ratio": "16:9",
    },
    timeout=120,
)
resp.raise_for_status()
body = resp.json()

image = body["data"][0]
with open("mug.png", "wb") as f:
    f.write(base64.b64decode(image["b64_json"]))

print(image["media_type"], body["usage"]["cost"])

Decode the bytes, write them to disk or object storage, and log usage.cost next to the prompt that produced it. After a week that log is a more honest price list than any pricing page.

Image jobs take longer than text calls, so set a generous client timeout, as the example above does with 120 seconds. A default of a few seconds will cut off perfectly good results.

Developer plugging an external drive into a laptop to save generated images

Models Worth Trying

Providers in the Catalog

Here is how the main providers line up, with the matching model pages on PicassoIA where they exist:

  • Google: the Gemini image family. The slug google/gemini-2.5-flash-image shows up in OpenRouter's own examples, and the same model lives on PicassoIA as Gemini 2.5 Flash Image.
  • OpenAI: GPT Image, where the quality setting moves the price a lot. See GPT Image 2.
  • Black Forest Labs: the Flux line, for example Flux 2 Pro.
  • ByteDance: Seedream, including Seedream 4.5.
  • Recraft: vector-friendly models that can return SVG, such as Recraft v4.1.
  • xAI, Microsoft, Krea and Sourceful: Grok Imagine, MAI-Image, Krea's models and Riverflow, which you will mostly find only through gateways like OpenRouter.

To pull the live list in code, call the models route. To inspect one model's providers, parameters and prices, add its slug and /endpoints:

curl https://openrouter.ai/api/v1/images/models \
  -H "Authorization: Bearer $OPENROUTER_TOKEN"

curl "https://openrouter.ai/api/v1/images/models/bytedance-seed/seedream-4.5/endpoints"

Picking by Job

No model wins every task. This table is a starting point for your own tests, not a ranking:

JobFirst model to tryWhy it earns a test
Photoreal marketing shotsSeedream 4.5Sharp output up to 4K
Posters and text inside imagesGPT Image 2Strong at following written layout
Fast draftsGemini 2.5 Flash ImageQuick turnaround for iteration
Logos and iconsRecraft v4.1Clean vector-style results
Edits from text or photosFlux 2 ProWorks from prompts and reference photos

Strengths shift with every release, so run your own prompts before you commit a project to one model. A fair test takes about an hour:

  1. Write ten prompts from real work, not toy examples, including two with text in the image and two with people.
  2. Run each prompt through the same three models with identical aspect_ratio and resolution values.
  3. Log usage.cost and the seconds each job took.
  4. Score the results blind, with the model names hidden, then divide the total cost by the number of images you would actually publish.

That last number, cost per usable image, settles the argument. A model at $0.02 that needs four tries to hit the mark costs $0.08 per usable image, twice as much as a model at $0.04 that gets it on the first try.

Corkboard with twenty photographs in different styles, one per image model

What One Image Really Costs

The Price Spread

OpenRouter's own tutorial priced one image at default settings across 20 models. The range ran from $0.006 to $0.134, a 22x spread. Cheap models start around a cent per image. That gap is a bigger lever on your invoice than prompt length, retries or any clever caching trick.

In practice the spread splits models into two groups. Drafting models near a cent per image suit ideas, thumbnails and quick tests. Premium models closer to the top of the range suit final renders and hero images. Many teams run both: draft cheap, render dear.

Three Billing Styles

Models do not all charge the same way:

  1. Per image: a flat price for each result, whatever the size.
  2. Per megapixel: the price grows with resolution, so 4K costs more than 1K.
  3. Per token: input and output tokens are metered. As listed when this was written, GPT-5.4 Image 2 charges $8.00 per million input tokens and $15.00 per million output tokens, with image output at $30.00 per million tokens.

Token billing is the hardest to predict. Prompt length, reference images and the quality setting all feed the final number, so usage.cost is the only figure worth trusting. Prices change, so check the model page before you plan a budget.

Calculator, receipts and coins on a wooden desk

Failed Jobs Cost Nothing

Billing is all or nothing. A generation either finishes and is billed in full, or it fails and is not billed. Cancelled streams are not charged either, and partial previews that arrive before a stream ends do not create partial charges. That makes retries safer than they sound: you pay once for the result you keep. Still, handle errors properly. Check the HTTP status, wait before retrying a failed job, and stop after a few attempts so a bad prompt cannot loop forever.

Budget Math for 1,000 Images

Take three price points from that spread and scale them:

Price per image1,000 images10,000 images
$0.006$6$60
$0.04$40$400
$0.134$134$1,340

💡 Tip: Add your retry rate. If one prompt in three needs a second attempt because the first result missed, add roughly a third to the budget. Failed jobs cost nothing, but disappointing ones still do.

Brass balance scale weighing photographs against coins

3 Mistakes That Inflate Your Bill

Leaving Quality on Auto

With quality set to auto, the provider decides how much effort to spend. On models whose price follows quality, a high result can cost far more than a low one. Use low while you iterate on a prompt and switch to high only for the final render.

Storing Base64 Inside Your Database

A 2K image encoded as base64 is often several megabytes of text. Saving that string in a database row slows every query that touches it. Write the file to object storage, keep only its URL in the database, and use webp or jpeg with output_compression when file size matters more than lossless detail.

Ignoring Provider Routing

Several providers can serve the same model, and their endpoints can differ in price and supported parameters. If you never set a preference, OpenRouter chooses for you. Pin the order and decide whether fallbacks are acceptable:

{
  "model": "google/gemini-2.5-flash-image",
  "prompt": "A minimalist logo for a coffee roaster",
  "provider": {
    "order": ["google-ai-studio", "google-vertex"],
    "allow_fallbacks": true
  }
}

Turn allow_fallbacks off when you need identical output and pricing on every call, and leave it on when uptime matters more.

How to Use Seedream 4.5 on PicassoIA

If you would rather skip the code, the same model from OpenRouter's examples is available in the browser. Seedream 4.5 creates images up to 4K from a text prompt, and there is nothing to install.

  1. Open the model page for Seedream 4.5 and sign in.
  2. Write the prompt with four parts: subject, setting, light and lens. Try: a ceramic coffee mug on a marble counter, soft window light from the left, 85mm lens, shallow depth of field, Kodak Portra 400 film grain.
  3. Choose the aspect ratio: 16:9 for blog headers, 1:1 for product tiles, 9:16 for vertical posts.
  4. Generate and review. Change one detail, then run it again, the same way you would change one API field.
  5. Download the winner, or run the identical prompt through Flux 2 Pro, GPT Image 2 and Nano Banana Pro for a side-by-side comparison.

💡 Tip: Rough ideas make weak prompts. Ask a language model such as Claude Sonnet 5 or Gemini 3.5 Flash to expand a one-line idea into a detailed photo prompt with light, lens and texture, then paste the result into the image model.

PicassoIA's Developer API

PicassoIA also runs its own developer API for pipelines and scripts. The base URL is https://api.picassoia.com/v1, and requests authenticate with a bearer token that starts with pia_sk_. The flow is asynchronous and will look familiar if you have used other prediction-style APIs: create a job, poll it, then fetch the result.

  • POST /v1/models/{owner}/{name}/predictions creates a job.
  • GET /v1/predictions/{id} checks its status and returns the output.
  • POST /v1/predictions/{id}/cancel stops a job that is still running.
  • GET /v1/predictions lists your recent jobs.

For images, the API offers PicassoIA Image and PicassoIA Image Editor Pro, along with two video models. An account can run 5 predictions at once, and prompts are limited to 4,000 characters. API access is tied to specific plans, so confirm which one on the pricing page before you build around it. The browser catalog is much larger, with more than 200 text to image models to test before you choose one for a script.

Graphic designer reviewing a large coastal landscape print in a sunlit studio

Make Your First Images Today

The best way to settle the gateway question is to run one prompt both ways. Send it through OpenRouter's images endpoint, log usage.cost, then paste the same text into a model page on Picasso IA and compare the look, the speed and the effort.

Pick a prompt from your own work: a product shot, a blog header, a portrait for a landing page. Try two or three models on Picasso IA, change one detail per run, and keep the results you would actually publish. You will know within an afternoon which route fits your project, and you will have real images to show for it.

Three colleagues sorting freshly printed photographs around a table

Share this article