POST
/
v3
/
remove-background
curl --request POST \
  --url https://api.ppinfra.com/v3/remove-background \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "extra": {
    "response_image_type": "<string>"
  },
  "image_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 内容,图片长和宽均不超过 1024 像素,文件最大不超过 30 Mb。

响应参数

image_file
string

图片结果的 Base64 编码内容。

image_type
string

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