跳转到主要内容
图像擦除补全

图像擦除补全 — 创建任务

异步提交图像擦除补全任务

POST
/services/aigc/image2image/image-synthesis
curl
curl --location --request POST '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-raw '{
    "model": "image-erase-completion",
    "input": {
            "image_url": "http://xxx/input.png",
            "mask_url": "http://xxx/mask.png",
            "foreground_url": "http://xxx/foreground.png"
        },
    "parameters":{
        "dilate_flag":true
    }
}'
{
  "output": {
    "task_status": "PENDING",
    "task_id": "53950fb7-281a-4e60-b543-xxxxxxxxxxxx"
  },
  "request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51"
}

鉴权

string
header
必填

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

Header 参数

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

必须设置为 enable,表示使用异步方式提交任务。

enable

请求体

application/json
enum<string>
必填

模型名称,固定值为 image-erase-completion

image-erase-completion
object
必填
object

响应

200-application/json
string

请求唯一标识。

object