Image Elements Removal API Reference
Image Elements Removal
GET/POST
/ai/image/removal
Image Elements Removal is tailored for e-commerce images, capable of automatically identifying and removing Semi-Transparent Elements, Specific Name, Character, Color-Blocks with Characters from e-commerce images. It allows for the specification of objects to be removed within the images, achieving efficient and precise processing of large volumes of images, thus simplifying the image editing process.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | No | URL of the original image; cannot be empty at the same time as Base64. It is recommended to upload the image URL, and it will be prioritized if provided. The image should be in JPG, JPEG, PNG, or BMP format, with a resolution between 512x512 and 3000x3000 pixels, and a file size of no more than 10MB.
|
| String | No | Base64 of the original image (The image should be in JPG, JPEG, PNG, or BMP format, with a resolution between 512x512 and 3000x3000 pixels, and a file size of no more than 10MB.). |
| Number[] | Yes | Elements to be removed from the image's main subject (1=Semi-Transparent Elements; 2=Specific Name; 3=Character; 4=Color-Blocks with Characters). The main subject of the image refers to the core product area within the image. For more examples, refer to the product introduction document:Image Elements Removal.
|
| Number[] | No | Elements to be removed from non-main subjects of the image (1=Semi-Transparent Elements; 2=Specific Name; 3=Character; 4=Color-Blocks with Characters). Cannot be empty at the same time as remove_non_product_area_elements. For more examples, refer to the product introduction document: Image Elements Removal.
|
| String | No | The specific area for removal. It is optional and requires use with an editor. The input format is RLE. If provided, it will take precedence over the remove_non_product_area_elements and remove_product_area_elements parameters.
|
Sample Request
Response Parameters
Name | Type | Description |
---|---|---|
| Number | Response code; 200 represents a successful call, other response codes can refer to the error code information. |
| Object | The structure of the returned result. |
| String | Request ID; used to identify a unique request call. |
| Boolean | Whether the operation was successful; true for success, false for failure. |
| String | Error message, such as "content has sensitive data, please try other input". |
Sample Response
Errors
Error Code | Error Message | Description |
---|---|---|
501 | rate limit exceed | The current interface has reached the rate limit. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) to increase the limit. |
700 | invalid input | The input parameter format does not meet the requirements; resMessage will return details. |
701 | image url error | Failed to Download Image from URL, please retry. |
702 | image base64 error | Image Base64 Download or Recognition Failed. |
703 | image size exceeds the limit | The image size exceeds the limit, please provide an image within the limit. |
704 | invalid image form | The image format is not supported. |
705 | image file size exceeds the limit | The image file size after parsing should be within 10 MB. |
801 | model failed | Internal call exception, please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting. |
900 | tpp url error | Internal call exception, please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting. |
1000 | content has sensitive data, please try other input | The request contains sensitive information, not supported at the moment, please try other inputs. |
1001 | content control failed, please retry | Content control service failed, please retry, and please contact us via navigation bar or email us (aidge_support@service.alibaba.com) if the error persists. |
1002 | content risk filter failed, please contact us | Content risk filter service failed, please contact us via navigation bar or email us (aidge_support@service.alibaba.com). |
Last updated