POST
/
v3
/
cleanup
curl --request POST \
  --url https://api.ppinfra.com/v3/cleanup \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "extra": {
    "response_image_type": "<string>"
  },
  "image_file": "<string>",
  "mask_file": "<string>"
}'
{
  "image_file": "<string>",
  "image_type": "<string>"
}

对象擦除 API 能将图片中的指定区域擦除干净。

请求头

Content-Type
string
required

枚举值: application/json

Authorization
string
required

Bearer 身份验证格式,例如:Bearer {{API 密钥}}。

请求体

extra
object

额外参数

image_file
string
required

原始图片的 base64 编码内容,支持的最大分辨率小于 16 megapixels,文件最大不超过 30 Mb。

mask_file
string
required

遮罩图片的 base64 编码内容,支持的最大分辨率小于 16 megapixels,文件最大不超过 30 Mb。

响应参数

image_file
string

图片结果的 Base64 编码内容。

image_type
string

图片格式枚举值: png, webp, jpeg