API Reference
Erase content from pictures

Erase content from pictures

Action RemoveContents

Introduction

This interface is used to erase the content in the picture

Request

Parameter NameTypeDescriptionRequired
ActionStringThe corresponding API command name, the current API is RemoveContents
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
MaskStringBase64 of the mask that needs to erase the content, where the white part is the redrawn part
InvertMaskBoolWhether to invert the mask, default value: false
MaskBlurIntMask edge blur radius (0~64), default value: 12

Request Example

{
	"Action": "RemoveContents",
	"PublicKey": "ALLak9M4cNdHXKOJAJJ4k8Hh1hZS2EgJF1D0FlPwfl",
	"Signature": "2e3ded4d95337e8e0e76c05f056ff958eb98f062",
	"request_uuid": "15ba36f2-2d69-40bd-9e0c-3e73f0f5acd0",
	"RawImage": "data:image/png;base64,xxx",
	"Mask": "data:image/png;base64,xxx"
}

Response

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": "RemoveContents",
	"RetCode": 0,
	"Message": "",
	"request_uuid": "8482d350-04f9-421b-817b-1d98b3a4dcfa",
	"TaskUID": "cktlm6lrh4xxx8ng9nf0"
}