Skip to main content
Wan

Wan T2I synchronous

Real-time Wan text-to-image generation

POST
/services/aigc/multimodal-generation/generation
cURL - wan2.6-t2i (sync)
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-t2i",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "A flower shop with exquisite windows, a beautiful wooden door, and flowers on display"
          }
        ]
      }
    ]
  },
  "parameters": {
    "prompt_extend": true,
    "watermark": false,
    "n": 1,
    "negative_prompt": "",
    "size": "1280*1280"
  }
}'
{
  "output": {
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "content": [
            {
              "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/xxxx.png?Expires=xxx",
              "type": "image"
            }
          ],
          "role": "assistant"
        }
      }
    ],
    "finished": true
  },
  "usage": {
    "image_count": 1,
    "input_tokens": 0,
    "output_tokens": 0,
    "size": "1280*1280",
    "total_tokens": 0
  },
  "request_id": "815505c6-7c3d-49d7-b197-xxxxxx"
}
This synchronous endpoint is for wan2.6-t2i only. Retrieve generated images directly in a single request without polling. For wan2.5 and earlier, or asynchronous processing, use the async submit endpoint.

SDK version requirements

  • DashScope Python SDK: Version 1.25.7 or later.
  • DashScope Java SDK: Version 2.22.6 or later.

Authorizations

string
header
required

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

Body

application/json
enum<string>
required

The model name. For the wan2.6-t2i model, use wan2.6-t2i.

wan2.6-t2i
wan2.6-t2i
object
required

The input object containing the message array.

object

Parameters for wan2.6-t2i model.

Response

200-application/json
object
object

Usage statistics.

string
default"815505c6-7c3d-49d7-b197-xxxxxx"

Unique request identifier for tracing and troubleshooting.