Image Removal Pro

Updated at:

Image Removal Pro is tailored for e-commerce images. It automatically detects and removes text, specific names, transparent text blocks, and visual noise from images. You can specify which objects to remove to efficiently process large image batches and simplify your editing workflow. The service supports both synchronous and asynchronous invocation modes, which you can switch between by using the Async field.

1. Introduction

Image Removal Pro is designed for e-commerce images. It automatically detects and removes text, specific names, transparent text blocks, and visual noise from your images. You can specify which objects to remove to efficiently process large image batches and simplify your editing workflow. The service supports both synchronous and asynchronous modes; we recommend using the asynchronous API.

2. Use cases

  • Efficiently process e-commerce images:

Remove distracting visual elements to provide cleaner, more focused product displays and enhance the customer's shopping experience.

  • Synchronize product information across multiple platforms:

Quickly remove specific text and visual noise to comply with the image standards of various e-commerce platforms.

  • Preserve user-specified elements:

Specify which elements to preserve, such as text, logos, or other image components. The model retains these elements while removing unwanted content.

3. Features

  1. First, understand the definitions of image subject and image background. When specifying objects for removal, you can apply the removal to either the image subject or the image background area. The service can be integrated through an API or an editor.

    1. Image subject: The core product area within the image.

    2. Image background: The rest of the image, excluding the image subject.

  2. Second, the service can remove four types of objects: text, specific names, transparent text blocks, and visual noise. Refer to the following examples to determine how to configure the service for your needs.

  3. You can specify which information to preserve in the image, such as "size rulers and size codes" or "all non-brand logo text on the product." The model will retain these elements.

4. Results comparison

Original image

Processed image

image.jpeg

image.png

image.jpeg

image.png

Preserve: Size rulers and size codes

image.png

image.png

5. Quick start

6. Developer guide

This service supports both synchronous and asynchronous invocation modes. To make an asynchronous request, use the ImageRemovalProAsync operation. The request parameters are the same for both modes, but the response structures differ. The synchronous mode directly returns the URL of the processed image, while the asynchronous mode returns a TaskId. You can then use the query API to retrieve the result.

6.1 Request parameters

Parameter

Type

Required

Description

ImageUrl

String

Yes

The URL of the original image. The image must be in JPG, JPEG, PNG, BMP, or WEBP format.

· Synchronous mode: The resolution must be between 256×256 and 3000×3000 pixels. The file size cannot exceed 10 MB.

· Asynchronous mode: The resolution must be 256×256 pixels or greater. The long side cannot exceed 1920 pixels and the short side cannot exceed 1080 pixels. The file size cannot exceed 5 MB.

Example: "https://ae01.alicdn.com/kf/S342f0070dc9f4be09a6cbed34e90dc8fs.jpg"

Async

Boolean

No

For the synchronous API only. A synchronous call is made by default (if this parameter is unspecified or set to false). Set to true to make an asynchronous call.

Mode

String

No

Specifies the removal mode. Supported values are lite (default) and plus. The lite mode removes elements without preserving user-specified content. The plus mode allows you to specify content to preserve by using the Prompt parameter.

Prompt

String

No

In plus mode, this parameter allows you to specify content to preserve. For example: "Preserve the size rulers and size codes, and all non-brand logo text on the product."

6.2 Request example

{
  "ImageUrl": "https://gw.alicdn.com/imgextra/i3/O1CN01iHeLh71pOM6Hb1Wh4_!!6000000005350-0-tps-800-800.jpg",
  "Async": false,
  "Mode": "lite",
  "Prompt": "Preserve the size rulers and size codes, and all non-brand logo text on the product."
  
}

6.3 Response

6.3.1 Synchronous mode response

In synchronous mode, the API directly returns the URL of the processed image.

Response parameters

Parameter

Type

Description

Code

String

The status code, such as "success".

Success

Boolean

Indicates whether the request was successful. true indicates success, and false indicates failure.

Message

String

The status message. For a successful request, the value is "Success". Otherwise, it provides an error message, for example, "The parameter contains sensitive information. Please try another input."

RequestId

String

The unique ID of the request.

Data

Object

The structure that contains the returned results.

Data.ImageUrl

String

The URL of the processed image.

Data.UsageMap

Object

The usage information.

Data.UsageMap.ProcessedImageCount

Number

The number of processed images.

Data.UsageMap.Mode

String

The removal mode, which can be lite or plus.

Response example

{
    "Data": {
        "ImageUrl": "https://aib-image.oss-ap-southeast-1.aliyuncs.com/ai_desc%2Fc2a0fb38-bdb4-4464-8409-6e18a82171d80.jpg",
        "UsageMap": {
            "ProcessedImageCount": 1,
            "Mode": "lite"
        }
    },
    "RequestId": "9894FF16-EC66-1CFC-97FD-4E15EECA0DF5",
    "Message": "Success",
    "Success": true
}

6.3.2 Asynchronous mode response

In asynchronous mode, submitting a request returns a TaskId. You can then use this TaskId with the query API to retrieve the final result.

(1) Submission response

Response parameters

Parameter

Type

Description

Code

String

The status code, such as "success".

Success

Boolean

Indicates whether the request was successful. true indicates success, and false indicates failure.

Message

String

The status message. "Success" indicates success.

RequestId

String

The unique ID of the request.

Data

Object

The structure that contains the returned results.

Data.TaskId

String

The ID of the asynchronous task. You can use this ID to query the task result later.

Response example

{
  "Data": {
    "TaskId": "8cec9166-4839-95a5-9f4b-c85e9a8dc852"
  },
  "RequestId": "B0853623-B73A-1231-84A5-6184F9A02425",
  "Message": "Success",
  "Success": true
}
(2) Query API

For more information, see Asynchronous result query API.

Request parameters

Parameter

Type

Required

Description

TaskId

String

Yes

The ID of the asynchronous task that was returned when the task was submitted.

Example: "ef581b28-781b-9f98-8ac6-68e3e0ce186d"

Request example

{
  "TaskId": "8cec9166-4839-95a5-9f4b-c85e9a8dc852"
}

Response parameters

Parameter

Type

Description

Code

String

The status code, such as "success".

Message

String

A description of the status, such as "Success".

Success

Boolean

Indicates whether the request was successful. true indicates success, and false indicates failure.

RequestId

String

The unique ID of the request.

Data

Object

The structure that contains the returned results.

Data.TaskId

String

The ID of the asynchronous task.

Data.Status

String

The status of the task, such as "COMPLETED".

Data.Result

Object

The execution result of the task, formatted as a JSON string.

Data.Result.imageUrl

String

The URL of the processed image.

Data.UsageMap

Object

The usage information.

Data.UsageMap.ProcessedImageCount

Number

The number of processed images.

Data.UsageMap.Mode

String

The removal mode, which can be lite or plus.

Response example

{
  "Data": {
    "Status": "COMPLETED",
    "UsageMap": {
            "ProcessedImageCount": 1,
            "Mode": "lite"
        },
    "TaskId": "8cec9166-4839-95a5-9f4b-c85e9a8dc852",
    "Result": "{\"imageUrl\":\"https://aib-image.oss-ap-southeast-1.aliyuncs.com/ai_desc%2Fcaa4611c-c004-4454-a8cb-b431857b84470.jpg\"}"
  },
  "RequestId": "4726E6DF-D702-1EF8-B23E-46181F16482E",
  "Message": "Success",
  "Code": "success",
  "Success": true
}

6.4 Error codes

For more information, see Error Codes.

7. Pricing

lite (original mode): CNY 0.12 per image

plus (new mode): CNY 0.18 per image

8. Limits

  • Invocation mode: Both synchronous and asynchronous modes are supported. The default QPS is 5. The maximum timeout for a single synchronous request is 30 seconds.

  • Input image: The supported formats are JPG, JPEG, PNG, BMP, and WEBP.

    • Synchronous: The resolution must be between 256×256 and 3000×3000 pixels. The file size cannot exceed 10 MB.

    • Asynchronous: The resolution must be at least 256×256 pixels. The longer side cannot exceed 1920 pixels, the shorter side cannot exceed 1080 pixels, and the file size cannot exceed 5 MB.

  • Billing: Charges are calculated based on the ProcessedImageCount and Mode.