Create an image task (Qwen native shape, asynchronous)

The same request, but it returns a task_id immediately and generates in the background. Retrieve with GET /api/v1/tasks/{id} -- the same endpoint the video tasks use, rendered according to the task's modality.

X-DashScope-Async: enable is accepted and ignored: this endpoint is always asynchronous, and omitting the header is not an error.

Note that parameters are still validated at submit time. The vendor's own asynchronous endpoint does not validate them (a bad size is accepted and the task fails ten-odd seconds later); Amux rejects before the task is created, naming the parameter and the accepted range.

post/api/v1/services/aigc/image-generation/generation

Request

  • Base URL: https://gateway.amux.ai
  • URL: https://gateway.amux.ai/api/v1/services/aigc/image-generation/generation
  • Auth: HTTP bearer

Request body

modelstring required

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

webhook_urlstring uri

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.

Example request

{
  "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"
  }
}

Response

Accepted. Take output.task_id to GET /api/v1/tasks/{id} and poll.

request_idstring

An identifier for this call; it matches the generation ID in the Amux logs.

Changes

No recorded changes to this operation across all 1 revision of this API.