Guided Remove Background
Changed onDescription
The Guided Remove Background endpoint removes the background and lets you say in plain words what the cutout keeps. It starts from the same cut as Remove Background and changes only what the prompt names:
- Add something the default cut drops: "the person with the mat and the plant".
- Drop something the default cut keeps: "the woman at her desk without the lamp".
- Narrow the cut to one item: "only the chair".
A missing or blank prompt returns the standard Remove Background cutout.
Example with the prompt "the person with the mat and the plant":
<table> <tr> <th style="text-align: center;">Input</th> <th style="text-align: center;">Result</th> </tr> <tr> <td align="center" style="vertical-align: middle;"> <img src="https://labs-assets.bria.ai/api-examples/guided-remove-background/yoga_studio_input.jpg" width="250" style="border-radius: 8px;"> </td> <td align="center" style="vertical-align: middle;"> <img src="https://labs-assets.bria.ai/api-examples/guided-remove-background/yoga_studio_with_mat_and_plant_result.png" width="250" style="border-radius: 8px;"> </td> </tr> </table>Output Characteristics
- Returns the original image at its original resolution with a new alpha channel. No pixels are repainted.
- Anything the prompt drops becomes transparent, including parts of the main subject.
- When preserve_alpha=true and the input image includes an alpha channel, the output maintains original transparency values (both full and partial).
Processing Time
A request with a prompt takes about 15 to 20 seconds. sync defaults to false, so the API returns a request_id and a status_url right away. Get the result from the status endpoint or with a webhook.
Content Moderation
This endpoint includes granular content moderation controls to ensure safe usage across all stages of processing:
- 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.
Request
- Base URL: https://engine.prod.bria-api.com/v2/image/edit
- URL: https://engine.prod.bria-api.com/v2/image/edit/remove_background/guided
- Auth: API key in header api_token
Request body
Response
Successful operation (Synchronous Success)
Changes
- info
endpoint added
- info