Skip to main content
Wan2.6

Wan 2.6 synchronous

Synchronous Wan 2.6 image generation and editing

POST
/services/aigc/multimodal-generation/generation
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--data '{
  "model": "wan2.6-image",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "Generate a tomato and egg stir-fry based on the style of image 1 and the background of image 2"
          },
          {
            "image": "https://cdn.wanx.aliyuncs.com/tmp/pressure/umbrella1.png"
          },
          {
            "image": "https://img.alicdn.com/imgextra/i3/O1CN01SfG4J41UYn9WNt4X1_!!6000000002530-49-tps-1696-960.webp"
          }
        ]
      }
    ]
  },
  "parameters": {
    "prompt_extend": true,
    "watermark": false,
    "n": 1,
    "enable_interleave": false,
    "size": "1K"
  }
}'
{
  "output": {
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "content": [
            {
              "image": "https://dashscope-result-intl.oss-cn-singapore.aliyuncs.com/xxx.png?Expires=xxx",
              "type": "image"
            }
          ],
          "role": "assistant"
        }
      }
    ],
    "finished": true
  },
  "usage": {
    "image_count": 1,
    "input_tokens": 0,
    "output_tokens": 0,
    "size": "1376*768",
    "total_tokens": 0
  },
  "request_id": "a3f4befe-cacd-49c9-8298-xxxxxx"
}
This synchronous endpoint is for wan2.6-image only. Retrieve generated images directly in a single request without polling. For asynchronous processing, use the async submit endpoint.

Authorizations

string
header
required

DashScope API Key. Create one in the Qwen Cloud console.

Body

application/json
enum<string>
required

Model name. Set to wan2.6-image.

wan2.6-image
wan2.6-image
object
required

Input data containing the messages array.

object

Image processing parameters.

Response

200-application/json
object
object

Usage statistics.

string
default"a3f4befe-cacd-49c9-8298-xxxxxx"

Unique request identifier for tracing and troubleshooting.

a3f4befe-cacd-49c9-8298-xxxxxx