Create image
Last updated September 7, 2026
Generate with qwen/qwen-image-3.0 in Alibaba Model Studio's own shape; DashScope clients only need a new base_url.
Generate images with qwen/qwen-image-3.0 using Alibaba Model Studio's own request
shape (nested input.* / parameters.*). An existing DashScope client only
needs its base_url pointed at Amux.
This endpoint is synchronous: the request stays open until the image is ready, measured at 35–70 seconds.
https://gateway.amux.ai/api/v1/services/aigc/multimodal-generation/generationAuthorization
headerAuthorizationstringRequiredBearer <your Amux key> Your Amux API key.
Request
application/jsonmodelstringRequiredThe upstream model name. Write qwen-image-3.0 on this endpoint; the site ID qwen/qwen-image-3.0 is accepted too.
inputobjectRequiredThe input. Prompt and reference images both live here, reusing the multimodal chat message shape.
›inputobject
messagesarray<object>RequiredThe messages. Generation needs exactly one user message.
›messagesarray<object>
rolestringAlways user.
contentarray<object>Content items. Reference images first, prompt last, following the
official examples.
- {"image": "..."} — a reference image, 1 to 3. Takes a public https URL or
an inline data:image/png;base64,... value. Upstream limits: JPG / JPEG / PNG /
BMP / TIFF / WEBP / GIF, up to 10MB each, edges ideally 384–2048 pixels;
- {"text": "..."} — the prompt. Several are joined with newlines rather than
dropped.
Image-to-image simply puts another item before the prompt:
```json
"content": [
{ "image": "https://example.com/ref.png" },
{ "text": "turn the dog into a ginger cat" }
]
```
⚠️ Do not put image and text in the same item — follow the official
examples and use two.
›contentarray<object>
textstringThe prompt. Officially recommended to stay under 4,500 tokens.
parametersobjectGeneration parameters, all optional. Anything you leave out keeps the upstream default; we do not fill them in for you.
›parametersobject
sizestringThe output size, written width*height (widthxheight is accepted too and
normalised to the upstream spelling).
Two hard constraints, 400 on the spot rather than a size we quietly picked
for you:
- the area width × height must be between **262,144 (512*512) and
6,553,600 (2560*2560)**;
- the aspect ratio must be between 1:8 and 8:1.
The playground offers presets across **common aspect ratios × two resolution
tiers — not a closed list**: any size satisfying the two constraints above is
accepted.
| Ratio | 1K | 2K |
|---|---|---|
| 1:1 | 1024*1024 | 2048*2048 |
| 16:9 | 1280*720 | 2560*1440 |
| 9:16 | 720*1280 | 1440*2560 |
| 4:3 | 1152*864 | 2304*1728 |
| 3:4 | 864*1152 | 1728*2304 |
| 3:2 | 1248*832 | 2496*1664 |
| 2:3 | 832*1248 | 1664*2496 |
1K and 2K here are just names for the area bands, not a parameter you can send —
upstream has no image_size and works the tier out from the output area itself.
⚠️ The rule is area, not the longest edge: 2048*512 is only 1,048,576
pixels and bills as 1K upstream.
nintegerDefault 1How many images (1–6). Billed per image, and the reservation multiplies too.
seedintegerThe random seed, for reproducible results. Random when omitted.
negative_promptstringWhat you do not want. Free text.
prompt_extendbooleanDefault trueWhether the model rewrites and expands the prompt before generating.
prompt_extend_mode"direct" | "agent"Default "direct"How the rewrite works; only meaningful while prompt_extend is on.
- direct — a straight expansion, available for both text-to-image and
image-to-image;
- agent — the smarter rewrite, text-to-image only. Sending it together
with reference images is an error rather than a silent downgrade to
direct — the silent version leaves you thinking agent ran when it did not.
enable_thinkingbooleanDefault trueLet the model think before generating. Turning it off is faster; leaving it on usually gives steadier composition.
watermarkbooleanDefault falseWhether to stamp an "AI generated" watermark in the bottom-right corner.
Response
200responseThe image was generated.
400responseA bad parameter. When a value is outside this model's range the error says what is acceptable.
402responseThe available balance cannot cover this reservation.
503responseNo provider can serve this model right now.
Generation and image-to-image are one call
No image in content means generation; an image makes it image-to-image.
The parameters are identical, which is why there is only this one page.
At most 3 reference images, given as public https URLs or inline
data:image/png;base64,... values.
Reference images are billed per image.
Three ways to call this model
| Address | Delivery | When | |
|---|---|---|---|
| DashScope, sync | POST …/multimodal-generation/generation | hold the connection, 35–70s | existing DashScope code that can hold a long connection |
| DashScope, async | POST …/image-generation/generation | a task_id | existing DashScope code without holding a connection |
| Amux Tasks | POST /v1/tasks | an id plus an optional callback | preferred for new integrations; vendor-neutral |
All three share one set of routing, pricing, reservation and task records; they differ only in request shape and delivery.
⚠️ What you trade for synchronous
Anything along a synchronous path that times out (a reverse proxy, a gateway, a client default) loses you the image after the money is spent — upstream has already finished and charged us. 35–70 seconds sits inside most default timeouts, but not all of them.
Pricing
Billed per image, not per token — all three token fields are always 0 on this model. Two line items: input images (references) and output images; the prompt itself is not billed.
⚠️ Unit prices are deliberately not repeated here. Prices change, and this document ships with the code: every change would mean remembering to edit four specs and twenty pages, and one missed spot is a documented price we no longer charge — worse than not stating it. Current prices live on the model page and the pricing page, which read the price book directly.
We reserve an upper bound on submission, settle against actual usage and release the difference; a balance that cannot cover the reservation returns 402. Failures and expiry are not billed, and the reservation is already released.
Output has no tiers
Output images from qwen/qwen-image-3.0 are not priced by resolution. Upstream still
distinguishes 1K from 2K internally, but both cost the same on this model, so
size changes the picture and not this line of the bill.
Errors
Errors come back in Alibaba Model Studio's shape. The type values and their retry semantics are in Errors and retries.
curl https://gateway.amux.ai/api/v1/services/aigc/multimodal-generation/generation \
-H "Authorization: Bearer $AMUX_API_KEY" \
-d '{
"model": "qwen-image-3.0",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"text": "一只戴着墨镜的柴犬坐在冲浪板上,阳光明媚的海滩"
}
]
}
]
},
"parameters": {
"size": "1024*1024"
}
}'{
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"type": "image",
"image": "https://cdn.amux.ai/gen/20260907/task_01M1CG35C16CJ790D00BV1RBVM-0.png"
}
]
}
}
]
},
"request_id": "gen_01M1CG35C16CJ790D00BV1RBVM"
}