Remove Object

Remove a masked object from a given image synchronously. Supply the image and a binary mask marking the region to remove (white = remove); the masked region is regenerated to blend with the surrounding scene. Supported image formats include JPEG, PNG, and WebP. Image links are available for a limited period of time; if you would like to keep the image, you must download it.

Authentication

Api-Keystring

API key for access control. Use in the header with the name “Api-Key”

Request

A request to remove a masked object from an image.
imagefileRequired

The image to remove an object from (max size 25MB); only JPEG, WebP and PNG formats are supported at this time.

maskfileRequired

A binary mask the same size as the image; white (>= 128) marks the region to remove. Only JPEG, WebP and PNG formats are supported.

seedinteger or nullOptional0-2147483647
Optional random seed for reproducible output. When omitted, a random seed is chosen.
num_inference_stepsinteger or nullOptional1-128

Optional number of diffusion steps. Higher is slower but can improve quality; values are clamped to [1, 128]. When omitted, the model default is used.

guidance_scaledouble or nullOptional

Optional classifier-free guidance (CFG) scale. Higher follows the removal instruction more strongly; values are clamped to [1, 10]. When omitted, the model default is used.

rendering_speedenumOptionalDefaults to DEFAULT
The rendering speed to use.
Allowed values:

Response

Object removed successfully.
createddatetime
The time the request was created.
datalist of objects
A list containing the single edited image. The endpoint always returns exactly one entry.

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
429
Too Many Requests Error