Choose a model for the work you need to doMe
← Model directory

qwen-image-2.0-pro

ALIBABA CLOUD· qwen-image-2.0-pro

Official APISingaporeVersion 1

Tongyi image generation from Chinese prompts. A workspace for the selected region is required.

Image generation
Add to comparison
Changing the channel loads its own configuration
API BASE URLhttps://${WORKSPACE_ID}.ap-southeast-1.maas.aliyuncs.com/api/v1
Actual API model IDqwen-image-2.0-pro
Request method / pathPOST /services/aigc/multimodal-generation/generation
AuthenticationAuthorization: Bearer $API_KEY
Edit request parameters

Edit JSON within the verified parameter ranges. Copy and export stop if types, required fields, or enum values are invalid.

# 先在当前终端设置环境变量:API_KEY, WORKSPACE_ID
# 下面只创建请求文件,不执行文本中的任何命令。
cat > request.json <<'MODEL_ATLAS_REQUEST'
{
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "一幅简洁的春日植物插画"
          }
        ]
      }
    ]
  },
  "model": "qwen-image-2.0-pro"
}
MODEL_ATLAS_REQUEST

# 替换 request.json 内的用户占位符后再运行请求。
curl --fail-with-body --request POST "https://${WORKSPACE_ID}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation" \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer ${API_KEY}" \
  --data-binary @request.json
Template v1.0.0 · Catalog version 1