Create task
Last updated September 7, 2026
Submit an async qwen/qwen-image-3.0-pro task through the Amux entry point. Flat body, reference images as uploaded files.
Submit a qwen/qwen-image-3.0-pro generation task to /v1/tasks: you get an id
immediately and the image is produced in the background.
This endpoint does not separate generation from editing — no image means
generation, an image makes it image-to-image.
The parameter table below is the multipart/form-data form, which is the
superset. Without reference images the same fields can be sent as JSON.
https://gateway.amux.ai/v1/tasksAuthorization
headerAuthorizationstringRequiredBearer <your Amux key> Your Amux API key.
Request
multipart/form-datamodelstringRequiredThe site model ID, optionally with a :provider suffix to pin one.
promptstringRequiredWhat you want. With reference images it describes the edit.
imagearray<string>Reference images, optional — without them this is plain generation,
with them it is image-to-image. At most 3.
⚠️ On this endpoint reference images can only arrive as uploaded files
(multipart/form-data). The media field carries role-tagged inputs for video
models; sending it to an image model is an error on the spot — silently ignoring
it would mean paying for a plain generation while the reference never took part.
Both image and image[] are accepted.
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.
webhook_urlstringWhen the task reaches a terminal state we POST the result here, in exactly
the same shape as the POST /v1/tasks callback (a {event, sent_at, task}
envelope, an Amux-Signature header, and backoff retries).
⚠️ This field is ours; upstream has no equivalent. DashScope's async tasks do
have callbacks, but they are configured as EventBridge rules in the Alibaba Cloud
console — the address cannot travel in the request.
It is accepted both here (a sibling of input / parameters) **and inside
parameters**. Giving both with different values is an error rather than a
silent pick.
https only, and never a private address — we deliver from our servers. The
address is validated at submission, so a typo fails immediately instead of
after the task has run.
Response
202responseThe task was created. Poll with id, or wait for the callback.
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.
⚠️ Reference images can only be uploaded as files
On this endpoint they go in the image field (image[] works too), at most
3.
The media field carries role-tagged inputs for video models (first and last
frames, reference video…); sending it to an image model fails on the spot.
It is not silently ignored — being silent would mean you pay for a plain
generation while the reference never took part, and the image you get back has
nothing to do with what you asked for.
Three ways to get the result
| How | When | |
|---|---|---|
| Polling | GET /v1/tasks/{id} | simplest; every 5–10 seconds |
| Callback | send webhook_url when submitting | when you would rather not hold a connection |
| Wait in place | send Prefer: wait=60 when submitting | when you want it synchronously without writing a poller |
Task lifecycle, callback signing with a verification example, and idempotency keys are the same for every model — see Create task.
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.
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 is tiered by resolution
Upstream splits output images into 1K and 2K tiers by pixel area, and the boundary is not published. We do not guess it — settlement reads the tier upstream reports back, which is exact.
The reservation happens before upstream has answered, so it freezes the upper bound and releases the difference when it lands on the lower tier. The cost is a slightly larger hold; the benefit is that our billing does not go wrong the day that boundary moves.
Errors
Errors come back in OpenAI's shape. The type values and their retry semantics are in Errors and retries.
curl https://gateway.amux.ai/v1/tasks \
-H "Authorization: Bearer $AMUX_API_KEY" \
-F "model=qwen/qwen-image-3.0-pro" \
-F "prompt=把这只狗换成一只戴红围巾的橘猫" \
-F "image=@/path/to/image.png" \
-F "size=1024*1024" \
-F "webhook_url=https://hooks.example.com/amux"{
"id": "task_01M1CG35C16CJ790D00BV1RBVM",
"status": "queued",
"model": "qwen/qwen-image-3.0-pro",
"created_at": "2026-09-07T11:25:44Z",
"output": {
"images": [
{
"index": 0,
"url": "https://cdn.amux.ai/gen/20260907/task_01M1CG35C16CJ790D00BV1RBVM-0.png"
}
],
"videos": [
{}
]
},
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0
},
"cost": "0.043",
"error": {
"message": "<string>",
"code": "<string>"
}
}