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
| Parameter | Behaviour |
|---|---|
prompt | Required. |
model | Optional; default gpt-image-1. |
n | Number of images, default 1. Each image is generated and billed. |
aspect_ratio and resolution | Combine to request a size. Ignored (model default used) if the model does not support the combination. They are not rejected. |
size | Explicit "WxH". Overrides aspect_ratio and resolution when given. |
input_references | Switches 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. |
user | Your own stable end-user id, up to 64 characters, for per-user usage attribution; forwarded to OpenAI models for their abuse monitoring. |
stream | Not 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
| Parameter | Applies to |
|---|---|
quality | OpenAI models only; ignored elsewhere. |
output_format, background, output_compression | OpenAI 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:
- Model id. Newer GPT Image ids are not guaranteed to be cheaper or better for your task. Run the same prompt set through
gpt-image-2andopenai/gpt-image-1.5and compare cost per accepted image. quality. A draft setting for exploration and a higher one for finals is the standard pattern. Check the model page to see how it affects the price.- Size. Pricing basis differs by model: flat per size, per token, or per resolution tier. Whether a smaller size saves money depends on the basis shown on the model page.
n. Several images per call is several billed images. Keep it small in interactive UIs.- Host. The same id can be sold by several hosts at different prices. The live table shows the spread.
| Model | Cheapest host | Priciest host | Cheapest is | Hosts |
|---|---|---|---|---|
| black-forest-labs/flux.2-dev | MachGen $0.0031 / image | Fal $0.012 / image | 74% lower | 2 |
| google/nano-banana-2 | MachGen $0.034 / image | Fal $0.08 / image | 57% lower | 2 |
| google/nano-banana-pro | MachGen $0.0672 / image | Fal $0.15 / image | 55% lower | 2 |
| black-forest-labs/flux.2-pro | DeepInfra $0.015 / image | Black Forest Labs $0.03 / image | 50% lower | 3 |
| black-forest-labs/FLUX.1-dev | DeepInfra $0.009 / image | SiliconFlow $0.014 / image | 36% lower | 2 |
| alibaba/wan-2.6 | Atlas Cloud $0.021 / image | DeepInfra $0.03 / image | 30% lower | 2 |
| black-forest-labs/flux.2-max | Black Forest Labs $0.07 / image | DeepInfra $0.1 / image | 30% lower | 3 |
| seedream-5.0-pro | Atlas Cloud $0.036 / image | WaveSpeedAI $0.045 / image | 20% lower | 3 |
| recraft-4.1 | WaveSpeedAI $0.04 / image | Pika $0.042 / image | 5% lower | 2 |
| bytedance/seedream-4.0 | WaveSpeedAI $0.027 / image | DeepInfra $0.04 / image | 33% lower | 4 |
| bytedance/seedream-5.0-lite | Atlas Cloud $0.0315 / image | WaveSpeedAI $0.035 / image | 10% lower | 4 |
| qwen-image-max | WaveSpeedAI $0.07 / image | DeepInfra $0.075 / image | 7% lower | 2 |
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
- Choosing an Image Generation API — Price, Quality and Control
- Text-to-Image vs Image-to-Image API: Modes, Fields, Pitfalls
- GPT Image vs FLUX vs Seedream vs Nano Banana: How to Choose
- Image Generation API Cost Control: Billing, Drafts, Caching
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 →