curl --request POST \
--url https://api.ppinfra.com/v3/replace-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 通过提示词来控制将图片中的背景替换成指定内容。
请求头
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
额外参数
返回的图片格式,默认为 PNG。Enum: png, webp, jpeg
图片二进制的 base64 内容,图片长和宽均不超过 4096 像素,文件最大不超过 30 Mb。
原始图片的 base64 编码内容,支持的最大分辨率为 2048 * 2048,文件最大不超过 30 Mb。
响应参数