Remove Object
Changed onDescription
Remove an object you describe in plain language, with no mask to draw. Name the object in prompt (for example "yellow hammer"), and the route finds it, segments it, and erases it, filling the area behind it so it looks like the object was never there.
How It Works
- A vision-language model reads prompt against the image, and SAM 3 segments the matching object.
- The object's mask is sent to the Eraser, which removes it and fills the area.
Use /erase instead when you already have a mask, or need to remove something a short description can't single out.
/erase_by_text runs this same route under its older name, reading the object from object_name instead of prompt.
Erase Modes
The composite parameter picks one of two modes, the same as on /erase. Pixel perfect (true, the default) rebuilds only the object's area and blends it into the original, so everything else stays as it was. Context aware (false) also removes what the object casts outside its outline, such as its shadow or its reflection.
When Nothing Matches
If nothing in the image matches prompt, the request still succeeds and returns the input image unchanged.
Output Characteristics
- The modified image is returned at the original resolution.
- With composite set to true, everything outside the object's area stays as it was.
- Transparency is not kept: an input with an alpha channel comes back fully opaque.
Content Moderation
This endpoint includes granular content moderation controls to ensure safe usage across all stages of processing:
- Prompt Moderation - Checks prompt and stops processing if it contains inappropriate or restricted content. On by default.
- Input Image Moderation - Scans the uploaded image and stops processing if inappropriate or restricted content is detected.
- Output Image Moderation - Evaluates the generated image and blocks the response if it violates safety guidelines.
Constraints
The Bria API supports JPEG, PNG and WEBP files in RGB, RGBA, or CMYK color modes. When the file is of a different type or color mode, the status code 415 will be returned.
Request
- Base URL: https://engine.prod.bria-api.com/v2/image/edit
- URL: https://engine.prod.bria-api.com/v2/image/edit/remove_object
- Auth: API key in header api_token
Request body
Response
Successful operation (Synchronous Success)
Changes
- info
endpoint added
- info