Amux

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.

POSThttps://gateway.amux.ai/api/v1/services/aigc/multimodal-generation/generation

Authorization

header
AuthorizationstringRequired

Bearer <your Amux key> Your Amux API key.

Request

application/json
modelstringRequired

The upstream model name. Write qwen-image-3.0 on this endpoint; the site ID qwen/qwen-image-3.0 is accepted too.

inputobjectRequired

The input. Prompt and reference images both live here, reusing the multimodal chat message shape.

inputobject
messagesarray<object>Required

The messages. Generation needs exactly one user message.

messagesarray<object>
rolestring

Always 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>
textstring

The prompt. Officially recommended to stay under 4,500 tokens.

parametersobject

Generation parameters, all optional. Anything you leave out keeps the upstream default; we do not fill them in for you.

parametersobject
sizestring

The 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

tiersnot a closed list**: any size satisfying the two constraints above is

accepted.

Ratio1K2K
1:11024*10242048*2048
16:91280*7202560*1440
9:16720*12801440*2560
4:31152*8642304*1728
3:4864*11521728*2304
3:21248*8322496*1664
2:3832*12481664*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 1

How many images (1–6). Billed per image, and the reservation multiplies too.

seedinteger

The random seed, for reproducible results. Random when omitted.

negative_promptstring

What you do not want. Free text.

prompt_extendbooleanDefault true

Whether 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 true

Let the model think before generating. Turning it off is faster; leaving it on usually gives steadier composition.

watermarkbooleanDefault false

Whether to stamp an "AI generated" watermark in the bottom-right corner.

Response

200response

The image was generated.

400response

A bad parameter. When a value is outside this model's range the error says what is acceptable.

402response

The available balance cannot cover this reservation.

503response

No 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

AddressDeliveryWhen
DashScope, syncPOST …/multimodal-generation/generationhold the connection, 35–70sexisting DashScope code that can hold a long connection
DashScope, asyncPOST …/image-generation/generationa task_idexisting DashScope code without holding a connection
Amux TasksPOST /v1/tasksan id plus an optional callbackpreferred 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
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"
}