Skip to main content
Wan2.7

Wan 2.7 synchronous

Synchronous Wan 2.7 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.7-image-pro",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "A serene mountain lake at sunrise, with mist rising from the water, surrounded by pine trees, photorealistic"
          }
        ]
      }
    ]
  },
  "parameters": {
    "n": 1,
    "size": "2K",
    "watermark": false,
    "thinking_mode": true
  }
}'
{
  "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": 18790,
    "output_tokens": 2,
    "size": "2985*1405",
    "total_tokens": 18792
  },
  "request_id": "a3f4befe-cacd-49c9-8298-xxxxxx"
}
This synchronous endpoint supports wan2.7-image-pro and wan2.7-image. 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

The model name. Valid values: wan2.7-image-pro, wan2.7-image.

wan2.7-image-pro,wan2.7-image
wan2.7-image-pro
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.

a3f4befe-cacd-49c9-8298-xxxxxx