Home › Guides › GPT Image parameters

Every GPT Image parameter on /v1/images, and what it changes

Updated 2026-10-02

GPT Image models (gpt-image-2, openai/gpt-image-1.5 and the earlier gpt-image-1) are called through the same POST /v1/images endpoint as every other image model. That is convenient, and also the source of most surprises: some parameters apply only to OpenAI models, some are silently ignored on models that do not support them, and size controls behave differently from model to model. This page goes through the documented parameters and says which are universal, which are OpenAI-only, and which levers are about quality or cost.

The minimal request

curl https://videorouter.sh/api/v1/images \
  -H "Authorization: Bearer llmr_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
        "model": "gpt-image-2",
        "prompt": "a ceramic mug on a walnut desk, soft window light, product photo",
        "aspect_ratio": "1:1"
      }'

Only prompt is required. If you omit model, the default is gpt-image-1. There is no automatic model router for images, so pin the id you want. You can list the valid ids with GET /v1/images/models, which is unbilled.

Universal parameters

ParameterBehaviour
promptRequired.
modelOptional; default gpt-image-1.
nNumber of images, default 1. Each image is generated and billed.
aspect_ratio and resolutionCombine to request a size. Ignored (model default used) if the model does not support the combination. They are not rejected.
sizeExplicit "WxH". Overrides aspect_ratio and resolution when given.
input_referencesSwitches the call to image-to-image. A list of {"type":"image_url","image_url":{"url":...}} entries; each URL may be an https URL or a base64 data: URI. Only edit-capable models accept it.
userYour own stable end-user id, up to 64 characters, for per-user usage attribution; forwarded to OpenAI models for their abuse monitoring.
streamNot supported. true is rejected with a 400.

The quiet failure to design around is the size fallback. If you ask for a combination the model does not support, you still get an image, just not the one you asked for. Read the dimensions of what comes back, and do not assume a request was honoured because it succeeded.

OpenAI-only parameters

ParameterApplies to
qualityOpenAI models only; ignored elsewhere.
output_format, background, output_compressionOpenAI models only; ignored elsewhere.
moderation ("low" or "auto")OpenAI models, generation mode only. The edit path does not accept it.
input_fidelity ("low" or "high")OpenAI models, edit mode only (needs input_references). How much fine detail from the input image to preserve.

Sending these to a non-OpenAI model is harmless, but they do nothing there. That matters when you A/B test models with one shared request template: a quality value in the template is a real variable for GPT Image and a no-op for the other candidates, so you are not comparing like with like. The values each option accepts are the ones OpenAI defines, so check OpenAI's own documentation for the accepted set.

Reading the response

import base64, requests

r = requests.post("https://videorouter.sh/api/v1/images",
    headers={"Authorization": "Bearer llmr_sk_live_..."},
    json={"model": "openai/gpt-image-1.5", "prompt": "a lighthouse at dusk, flat vector style", "n": 1}).json()

img = r["data"][0]
if img.get("b64_json"):
    open("out.png", "wb").write(base64.b64decode(img["b64_json"]))
elif img.get("url"):
    open("out.png", "wb").write(requests.get(img["url"]).content)
print(img.get("revised_prompt"), r["usage"].get("cost"))

data[i] carries b64_json (or a real url on a few models), revised_prompt and media_type. The usage block includes cost, the price of the call including the platform fee. Log it per request. Some OpenAI models also echo background, output_format, quality and size at the top level, mirroring OpenAI's own response, which is a quick way to see what was actually applied.

Editing with GPT Image

There is no separate edit endpoint. Adding input_references selects image-to-image, and for OpenAI models input_fidelity then controls how closely the result sticks to the input. A practical test: run the same edit at both fidelity values on three to five of your own images, and decide which failure you can tolerate, drifting details or an over-literal result. The text vs image input guide covers reference handling and pitfalls.

Quality and cost levers

Quality and cost move together, but not always in the way the parameter name suggests. Treat these as hypotheses to measure on your prompts:

ModelCheapest hostPriciest hostCheapest isHosts
black-forest-labs/flux.2-devMachGen
$0.0031 / image
Fal
$0.012 / image
74% lower2
google/nano-banana-2MachGen
$0.034 / image
Fal
$0.08 / image
57% lower2
google/nano-banana-proMachGen
$0.0672 / image
Fal
$0.15 / image
55% lower2
black-forest-labs/flux.2-proDeepInfra
$0.015 / image
Black Forest Labs
$0.03 / image
50% lower3
black-forest-labs/FLUX.1-devDeepInfra
$0.009 / image
SiliconFlow
$0.014 / image
36% lower2
alibaba/wan-2.6Atlas Cloud
$0.021 / image
DeepInfra
$0.03 / image
30% lower2
black-forest-labs/flux.2-maxBlack Forest Labs
$0.07 / image
DeepInfra
$0.1 / image
30% lower3
seedream-5.0-proAtlas Cloud
$0.036 / image
WaveSpeedAI
$0.045 / image
20% lower3
recraft-4.1WaveSpeedAI
$0.04 / image
Pika
$0.042 / image
5% lower2
bytedance/seedream-4.0WaveSpeedAI
$0.027 / image
DeepInfra
$0.04 / image
33% lower4
bytedance/seedream-5.0-liteAtlas Cloud
$0.0315 / image
WaveSpeedAI
$0.035 / image
10% lower4
qwen-image-maxWaveSpeedAI
$0.07 / image
DeepInfra
$0.075 / image
7% lower2

Per image, before VideoRouter's 2% platform fee. For tiered models each row compares the resolution tier with the widest host-to-host gap. Built 2026-10-02 from the live catalog.

The cost control guide goes further on drafts, caching and caps, and the family comparison covers when GPT Image is the right family at all. See the models index for hosts per model, the quickstart for a first call, and videorouter.sh/signup for a key.

Frequently asked questions

Which parameters only work on GPT Image models?

quality, output_format, background, output_compression, moderation (generation only) and input_fidelity (edit only). They are ignored on other models rather than rejected.

What is the default image model?

If you omit model, /v1/images uses gpt-image-1. There is no automatic router for images, so pin the id you want.

Why is my image a different size than I asked for?

aspect_ratio and resolution are ignored when the model does not support the combination, and the model default is used instead of an error. An explicit size overrides both.

How do I see what an image cost?

The response's usage.cost field reports the cost of the call including the platform fee. Log it on every request.

Keep reading

Using image generation is one part of the job.

VideoRouter puts it next to dozens of other video and image models behind one API key, so you can compare providers, prices and fail over automatically. Compare providers on VideoRouter →