API Reference
Extract Image Content

Extract Image Content

Action ExtractContents


This interface is used to extract part of the image content


Parameter NameTypeDescriptionRequired
ActionStringThe corresponding API command name, the current API is ExtractContents
PublicKeyStringUser's public key, can be obtained from User Center (opens in a new tab)
SignatureStringUser signature generated based on public key and API command, see Signature
request_uuidStringRequest UUID, randomly generated using UUID generation method
RawImageStringBase64 of pictures that need to remove the background
IncludePointList[]PointThe coordinate point containing the content
ExcludePointList[]PointExclude content coordinates
ErodeSizeIntSubject edge pixel blur area (0~40), default: 15
ForegroundThresholdIntForeground threshold (0~255), default: 240
BackgroundThresholdIntBackground threshold (0~255),default: 15
HairOptimizationStringImage Hair Optimization, reference value: auto、on、off,default: auto
OnlyMaskBoolonly return masked images? default: false


Parameter NameTypeDescriptionRequired
XIntX coordinate value of pixel point(0~1440)
YIntY coordinate value of pixel point(0~1440)

Request Example



Parameter NameTypeDescriptionRequired
RetCodeIntReturn status code, 0 for successful return, non-zero for failure
ActionStringOperation command name
MessageStringReturn error message, provide detailed description when RetCode is non-zero
request_uuidStringReturns the requested uuid
TaskUIDStringTask UID, used to query task details and get results

Response Example

	"Action": "ExtractContents",
	"RetCode": 0,
	"Message": "",
	"request_uuid": "8482d350-04f9-421b-817b-1d98b3a4dcfa",
	"TaskUID": "cktlm6lrh4xxx8ng9nf0"