Skip to main content
POST
/
image_editing
/
object_removal
Object removal
curl --request POST \
  --url https://modelslab.com/api/v6/image_editing/object_removal \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "init_image": "<string>",
  "mask_image": "<string>",
  "webhook": "<string>",
  "track_id": 123
}'
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "meta": {}
}

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/v6/image_editing/object_removal' \

Body

json
{    
  "key": "your_api_key",    
  "init_image": "https://assets.modelslab.com/generations/cc002943-8327-4a0e-899e-d0567527f84b",    
  "mask_image": "https://assets.modelslab.com/generations/e0cc8b55-9250-43eb-8764-9040e1eeb1ec",    
  "track_id":null,    
  "webhook":null
}

Body

application/json
key
string
required

Your API Key used for request authorization

init_image
string<uri>
required

Link to the actual image

mask_image
string<uri>
required

Link to the mask area you want to remove

webhook
string<uri>

URL to receive POST API call when complete

track_id
integer

ID for webhook identification

Response

200 - application/json

Object removal response

  • Option 1
  • Option 2
  • Option 3
status
enum<string>
Available options:
success
generationTime
number

Time taken to generate the image in seconds

id
integer

Unique identifier for the generation request

output
string<uri>[]

Array of generated image URLs

Array of proxy image URLs

meta
object

Metadata about the generation process

I