Amux

Create image

Last updated September 7, 2026

Generate images in Alibaba Model Studio's own shape. DashScope clients only need a new base_url; the call is synchronous.

This endpoint is compatible with Alibaba Model Studio's (DashScope) multimodal generation API. With existing DashScope code, point base_url at Amux and the request and response shapes stay exactly as your client already has them.

Prompt and reference images both live in input.messages[].content[] — that is the multimodal chat message shape, reused for generation.

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

Authorization

header
AuthorizationstringRequired

Bearer <your Amux key> An Amux key created in the console. If you lose it, you can view it again on the keys page.

Request

application/json
modelstringRequired

The Amux model ID. Today this endpoint serves alibaba/qwen-image-3.0 and alibaba/qwen-image-3.0-pro.

inputobjectRequired

Chat-shaped input. The prompt and the reference images both live here, not in two separate fields.

inputobject
messagesarray<object>

One user message is enough.

messagesarray<object>
rolestring

Always user.

contentarray<object>

The prompt and reference images, mixed. At least one text item is required.

contentarray<object>
textstring

The prompt. Multiple items are joined with newlines, in order.

imagestring

A reference image: a public https URL, or data:image/...;base64,.... Up to 3.

parametersobject

Generation parameters, all optional.

parametersobject
sizestring

width*height. The area must be between 262144 (512x512) and 6553600 (2560x2560), with an aspect ratio between 1:8 and 8:1. The 1024x1024 spelling is accepted too and normalised before it reaches the upstream.

nintegerDefault 1

How many images to produce, 1-6.

seedinteger

Random seed, 0-2147483647.

negative_promptstring

Negative prompt: what should stay out of the picture.

prompt_extendboolean

Whether the model rewrites and expands the prompt first. On by default upstream.

watermarkbooleanDefault false

Whether to stamp a watermark on the output.

webhook_urlstring

POSTs the result here once the task reaches a terminal state. This field is ours, not the vendor's (Model Studio callbacks are configured as EventBridge rules in the console). The payload matches the callback on POST /v1/tasks exactly.

Response

200response

Generation finished. The URLs point at Amux storage, not the upstream temporary address.

400response

Invalid parameters: the size area or aspect ratio is out of range, more than 3 reference images, or a missing prompt.

402response

Available balance does not cover the reservation.

503response

No provider can currently serve this model.

Supported models

Two models today:

ModelIts own docs
qwen/qwen-image-3.0Qwen-Image 3.0
qwen/qwen-image-3.0-proQwen-Image 3.0 Pro

They take field-for-field identical parameters and differ only in quality and pricing: 3.0 has no output tiers, while Pro splits its output into 1K and 2K. Unit prices live on each model page — they change, and a number written here would eventually disagree with what you are charged.

If you call only one of them, read its own page — every value there is one it really takes.

This endpoint is synchronous

The connection stays open and the image comes back on it, measured at 35–70 seconds. That is not our overhead; upstream's synchronous endpoint runs in that range.

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. Two ways to avoid holding the connection:

AddressShape
DashScope, asyncPOST /api/v1/services/aigc/image-generation/generationDashScope-native
Amux TasksPOST /v1/tasksflat, vendor-neutral

Generation and image-to-image are one call

No {"image": "…"} in content[] means generation; adding one makes it image-to-image, with the same parameters. At most 3 reference images, given as public https URLs or inline data:image/png;base64,... values.

Billed per image

Billed per image, not per token — all three token fields are always 0 on this endpoint. Input images (references) and output images are each counted; the prompt itself is not billed.

Pro's output images are split into 1K and 2K tiers, and the tier is computed upstream from the pixel area and reported back in usage. We reserve the upper bound on submission and settle against the tier upstream reports, releasing the difference.

Two differences from the official API

  1. Artifact URLs do not expire as quickly. Upstream returns a signed temporary address; we copy the image to our own storage first. That address is still cleaned up periodically, so download anything you need to keep;
  2. Parameters are validated at submission. A size outside the area range (262,144–6,553,600) or the aspect ratio range (1:8–8:1) is a 400 on the spot, with the acceptable range in the message, rather than a size we quietly picked for you.

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": "alibaba/qwen-image-3.0",
    "input": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "text": "A red paper boat drifting down a rain gutter"
            }
          ]
        }
      ]
    },
    "parameters": {
      "size": "1024*1024"
    }
  }'
{
  "output": {
    "choices": [
      {
        "finish_reason": "<string>",
        "message": {
          "role": "<string>",
          "content": [
            {
              "type": "<string>",
              "image": "<string>"
            }
          ]
        }
      }
    ]
  },
  "request_id": "<string>"
}