Published: 2026-10-20
Docs · Image generation
Tell me which model drew this
auto/image sits behind an OpenAI-shaped POST /v1/images/generations. Several models are available, and the alias resolves to one of them per request. The part worth noticing: the response tells you which one actually answered — because with images, that is not a detail you can infer after the fact.
The call
curl https://freemodel.online/v1/images/generations \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{"model":"auto/image","prompt":"a lighthouse at dusk, long exposure","size":"1024x1024"}'
{
"created": 1790524404,
"data": [ { "url": "https://dashscope-result-….aliyuncs.com/…png" } ],
"model": "qwen-image-3.0-pro",
"usage": { … }
}
The url is a temporary object-store link. Download it if you are keeping the image.
Why the model name is in the response
Image models do not differ by quality alone. They differ by look. One renders cleaner text in signage, another handles skin tones better, another is faster and rougher. If you generate a set of product shots and a third of them come back in a visibly different style, you want to know that happened — and you want the field in the response that says so.
So the alias reports the model that actually served the request, not the alias you asked for. When the value differs from what you sent, the alias fell through to a different candidate, and that is worth a glance before you ship the batch.
The fall-through itself is narrow. The alias moves to the next candidate only when the current model has been retired upstream (404 or 410). A timeout, a rate limit or an upstream 5xx returns an error naming the model that failed, rather than a picture drawn by something you did not choose.
Text-to-image only. The *-edit models take one to three input images and live behind POST /v1/images/edits instead — a different operation with a different request shape, not a variant of this one.
Request fields
| Field | Required | Notes |
|---|---|---|
model | Yes | auto/image. A specific model name works too. |
prompt | Yes | The description. |
size | No | Pixel dimensions, e.g. 1024x1024. |
n | No | Number of images. |
negative_prompt | No | What to avoid. |
prompt_extend | No | Let the model expand a short prompt. |
Related capabilities
Same naming scheme, one alias per capability — all listed in /v1/models:
auto/video
Text to video. Asynchronous, about two minutes.
auto/embed
1024-dimension vectors, one candidate.
auto/rerank
Reordering retrieved documents by relevance.
auto/tts
Text to speech.
auto/asr
Speech to text.
Sources
Every third-party figure quoted on this site was read from the vendor documentation linked below, on the date stated. None of these links are affiliate links and none of these vendors paid to be listed. If a number here disagrees with the page it came from, the page is right — tell us and it gets corrected.
- OpenRouter — credit-purchase fees and free-model rate limits
- OpenRouter — rate-limit reference
- OpenRouter — public model list
- LiteLLM — licence, deployment options and supported models
- Cloudflare AI Gateway — features and pricing
- Vercel AI Gateway — features
- Portkey — plans
- Helicone — plans
- Model Context Protocol — specification
- OpenAI Python SDK — base_url and OPENAI_BASE_URL
- Anthropic Messages API — request format
What this is
auto/image generates an image from a prompt behind POST /v1/images/generations and reports which model actually answered.
Key numbers
- 1 个别名
- 每次请求返回 1 个 URL
- 2 个必填字段
- 1 alias, several image models behind it, resolved per request.
- The response carries
model— the name of the model that answered, not the alias you sent. - The image arrives as a temporary object-store
url; download it if you are keeping it. - Size is a request field; the example asks for 1024x1024.
How to use it, step by step
- Step 1. POST
{"model":"auto/image","prompt":"…","size":"1024x1024"}to/v1/images/generations. - Step 2. Read
data[0].urland download the file — the link expires. - Step 3. Record
modelfrom the response, so a mixed set can be traced back to the model that produced each image.
Pinning one image model vs using the alias: the alias picks per request, and the response names what it picked.
FAQ
Why does the response include the model name?
Image models differ by look, not only by quality. If a third of a batch came back in a visibly different style, the model field is how you find out why.
Can I pin a specific image model?
Yes — call the model name directly instead of the alias.
When to use it — and when not to
Use it for draft visuals: blog headers, social post backgrounds, mood boards, storyboard frames. The output is a starting point a human edits, not a final brand asset.
Do not use it when the image must contain exact text, a precise logo, or a product that has to match a reference photo. Text rendering and brand fidelity are the two places generated images still fail visibly, and a retry loop will not fix either.
Limits worth designing around
- Model name in the response: the field tells you which model actually served the request; log it, because style varies by model.
- One alias, one candidate set: if the alias falls back, the look can change between images in the same batch.
- Resolution and aspect ratio: pick the target ratio up front; cropping a square image to a banner loses composition.
- Moderation: prompts can be rejected. Treat a rejection as a prompt problem, not a transport error, and do not retry the identical prompt.
- Storage: generated images are large. Set a retention policy before the first batch, not after the disk fills.
Cost and latency
Image generation is priced per image and is much slower than text. A batch of 20 images can take minutes; run it as a background job with a per-image status, not inside a request handler. Retries are expensive: fix the prompt or the aspect ratio first, then retry.
For a content pipeline, generate at the smallest size that meets the placement (a 1200 px header does not need 4K), then upscale only the images that pass review.
Two more questions
Why did the same prompt produce a different style? Check the model field. If it changed, the alias served a different model; pin the model name if consistency matters more than availability.
Can I use the images commercially? That depends on the upstream provider's terms, not on the gateway. Read the provider's license before publishing, and keep the model name with each asset so you can trace it later.