v1.0 </> API Reference

Replace image background

POST https://app.seelab.ai/api/predict/image-edit

Preserve the main subject of the image, while modifying the background based on a prompt.

Query Params

projectId integer
Associate the request with a specific project.

Body Params

mode string Defaults to replaceBackground
Enable the replace background edition mode
Allowed: replaceBackground
params object required
Image generation parameters.
imageBase64 string required
The base image to edit. The image must be specified as a base64-encoded byte string. Size limit is 10 MB.
prompt string required
The text prompt guides the model in generating the background.
reposition boolean Defaults to false
Controls whether the detected object maintains its original position or can be repositioned. For non-square images, value always set to TRUE.
samples string Defaults to 1
The Number of images to generate per prediction.
Allowed: 1 2 3 4
seed integer Defaults to 0
Apply value to get more deterministic results. It is recommended that the seed be set to 0 to randomize the seed every time.

Responses

202 202
400 400
429 429