AI Item Removal Mask
Submit Item Removal Mask Order
Last updated
Submit Item Removal Mask Order
Last updated
Kindly bear in mind that this feature is currently available. However, to activate it, please reach out to noshad@aihomedesign.com.
The Item Removal Mask service allows users to remove unwanted objects from an image by applying a mask. Users can mask areas of an image and submit it for processing. This document outlines the API endpoints required for fetching the latest masked image, applying manual masks, and submitting the final image.
Retrieve the latest masked image.
Apply masking by brushing the image and submitting the masked version.
Submit the final masked image.
Retrieve the updated masked image for verification.
Finalize order
The front-end implementation involves using a canvas to allow users to brush over areas they want to remove. The brushed image must then be sent to the back-end API in the correct format to ensure accurate processing.
Check out example code for Front-End Canvas Implementation from .
Image Handling
Load the latest masked image from the Retrieve the Latest Masked Image.
Display the image on an HTML5 canvas to allow user interaction.
Ensure that the size of the canvas matches the original image size to maintain accurate alignment.
Brushing Requirements
Users should be able to brush over the image to mark areas for removal.
The brush color must be #7878CD
(a specific shade of blue).
The brushed strokes should be opaque, meaning the marked areas will be clearly visible.
Exporting the Masked Image
Once the user finishes brushing, generate a masked image as a PNG file.
The PNG must have the exact same dimensions as the original image to ensure perfect overlap.
Only the brushed areas should be visible on the PNG, with the rest of the image being transparent.
Sending the Masked Image to the Back End
Convert the canvas to a PNG file.
Send the masked PNG file to the API Submit the Final Masked Image.
GET https://api.aihomedesign.com/v1/order/{order_id}/last-temp-image
Fetches the latest version of the masked image. This allows users to view the most recent changes before making additional edits.
order_id
: This should match the order_id
returned by the Image Upload API.
x-api-key*
{your_api_key_here}
POST https://api.aihomedesign.com/v1/order/manual-mask
Uploads a masked image where unwanted items have been selected for removal.
Ensure that your request body is in Form Data the format.
mask
: This must be the binary file of the masked part
order_id
: This should match the order_id
returned by the Image Upload API.
x-api-key*
{your_api_key_here}
POST https://api.aihomedesign.com/v1/order
Submit the final masked image for processing.
Ensure that your request body is in RAW-JSON the format.
order_id
: This should match the order_id
returned by the Image Upload API.
service_name
: this value is fixed and must be "service-item-removal-mask"
x-api-key*
{your_api_key_here}
GET https://api.aihomedesign.com/v1/order/{order_id}/last-temp-image
Fetches the updated masked image after submission to confirm the final result.
order_id
: This should match the order_id
returned by the Image Upload API.
x-api-key*
{your_api_key_here}
Finalize order to save selected result into order
order_id
: This should match the order_id
returned by the Image Upload API.
image_id
: This should match the image_id
returned by the Last Temp Image API
x-api-key*
{your_api_key_here}
POST