跳转到主要内容
AI试衣

AI试衣 — 创建任务

提交AI试衣任务

POST
/services/aigc/image2image/image-synthesis
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "aitryon",
    "input": {
        "person_image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/ubznva/model_person.png",
        "top_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/epousa/short_sleeve.jpeg"    
    },
    "parameters": {
        "resolution": -1,
        "restore_face": true
    }
 }'
{
  "output": {
    "task_status": "PENDING",
    "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
  },
  "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}

鉴权

string
header
必填

千问云 API Key。详见获取 API Key

Header 参数

string
默认值"application/json"
必填

请求类型,固定值为 application/json。

string
必填

千问云 API Key。详见获取 API Key

enum<string>
默认值"enable"
必填

固定值为 enable,表示使用异步调用方式。

enable

请求体

application/json
enum<string>
默认值"aitryon"
必填

指明需要调用的模型。aitryon(基础版)生成更快;aitryon-plus(Plus版)在清晰度和纹理还原方面更出色,但耗时更长。

aitryon,aitryon-plus
object
必填

输入参数。

object

可选参数。

响应

200-application/json
object
string

本次请求的唯一ID。