人物肖像抠图去背景


接口描述

人物肖像抠图去背景

GET https://www.idcd.com/api/image-remove-bg

输入参数

以下请求参数列表仅列出了接口请求参数,不包含公共参数,完整公共参数列表见 公共请求参数。

参数名称 类型 必选 描述
image_url String 图片网络地址,image_url 和 image_base64 二者选一
image_base64 String 图片base64编码, image_base64 和 image_url 二者选一

输出参数

参数名称 类型 必选 描述
url String 去除背景后的图片URL

示例

  1. 输入示例
curl --request POST \
  --url https://www.idcd.com/api/image-remove-bg \
  --header 'Accept: */*' \
  --header 'Accept-Encoding: gzip, deflate, br' \
  --header 'ClientID: df77f2de-2924-4499-adda-1c4cc243625a' \
  --header 'Connection: keep-alive' \
  --header 'Content-Type: application/json' \
  --header 'Nonce: 727a9cba04688f59087c063d5f28b1a6' \
  --header 'Signature: a47f7a02c220455e0ec67552a72e6d10d1a0be46ef6ed556d20a16d349e98fcf' \
  --header 'SignatureMethod: HmacSHA256' \
  --header 'Timestamp: 1739707145' \
  --data '{"image_url": "https://www.kktt.cn/images/example/remove-moire1.jpg"}'
  1. 输出示例
{
	"status": true,
	"code": 200,
	"message": "OK",
	"request_id": "f70d6168-d494-4aa7-a443-e57f314b9c4e",
	"data": {
		"url": "https://open.19981.com/files/remove_bg/output_download_image_20250216195826.png"
	}
}