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

qwen-image-edit-plus

ALIBABA CLOUD· qwen-image-edit-plus

Official APIBeijingVersion 1

Edit a source image with text instructions. Use masks and compositing when the product must be preserved precisely.

Image editing
Add to comparison
Changing the channel loads its own configuration
API BASE URLhttps://${WORKSPACE_ID}.cn-beijing.maas.aliyuncs.com/api/v1
Actual API model IDqwen-image-edit-plus
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, IMAGE_URL
# 下面只创建请求文件,不执行文本中的任何命令。
cat > request.json <<'MODEL_ATLAS_REQUEST'
{
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "image": "${IMAGE_URL}"
          },
          {
            "text": "将背景改为明亮的咖啡馆,尽量保持主体不变。"
          }
        ]
      }
    ]
  },
  "model": "qwen-image-edit-plus"
}
MODEL_ATLAS_REQUEST

# 替换 request.json 内的用户占位符后再运行请求。
curl --fail-with-body --request POST "https://${WORKSPACE_ID}.cn-beijing.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