removebg-createmask endpoint result
Make sure you add your s3 details for image_editing server, so you can receive image generated in your bucket. Images generated without s3 details being added will be delete after 24hours

Request

Make a POST request to below endpoint and pass the required parameters as a request body to the endpoint.
curl
--request POST 'https://modelslab.com/api/v1/enterprise/image_editing/removebg_mask' \

Body

json
{    
  "key":"",    
  "seed":12345,    
  "image":"https://huggingface.co/datasets/diffusers/test-arrays/resolve/main/stable_diffusion_inpaint/boy.png",    
  "post_process_mask": false,    
  "only_mask": false,    
  "alpha_matting":false,    
  "webhook": null,    
  "track_id": null  
}

Body Attributes

key
string
required
Your API Key used for request authorization
image
string
required
URL of the image you want to remove and create its mask
alpha_matting
boolean
default:"false"
Whether to perform alpha matting. Accepts true or false
post_process_mask
boolean
default:"false"
To post process the mask image. Accepts true or false
only_mask
boolean
default:"false"
Whether to return only mask image or not. Accepts true or false
seed
integer
Seed is used to reproduce results. Same seed will give same image. Pass null for a random number
alpha_matting_foreground_threshold
integer
default:"240"
Threshold for alpha matting foreground
alpha_matting_background_threshold
integer
default:"20"
Threshold for alpha matting background
alpha_matting_erode_size
integer
default:"5"
Erode size for alpha matting
webhook
string
Set a URL to get a POST API call once the image generation is complete
track_id
string
This ID is returned in the response to the webhook API call. This will be used to identify the webhook request