Erase Object by Text
Changed onTry out this capability in Bria's sandbox Description
Remove specific objects or unwanted elements from an image using natural language descriptions.
This route runs the same pipeline as Remove Object: the object named in object_name is found and segmented, then erased by the Eraser. It takes the same composite modes. The only difference is the field name: this route reads object_name, and /remove_object reads prompt.
If nothing in the image matches object_name, the request still succeeds and returns the input image unchanged.
Content Moderation
- Prompt Moderation - Checks object_name 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.
Example: object_name: "table"
<table> <tr> <th style="text-align: center;">Input Image</th> <th style="text-align: center;">Output Image</th> </tr> <tr> <td align="center" style="vertical-align: middle;"> <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/an_empty_table_in_living_room.png" width="300" style="border-radius: 8px;"> </td> <td align="center" style="vertical-align: middle;"> <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/hq-RlUr_t6xqVk8j7HU7G_2a39319420e6403f9d4e01c70beaa076.png" width="300" style="border-radius: 8px;"> </td> </tr> </table>Request
- Base URL: https://engine.prod.bria-api.com/v2/image/edit
- URL: https://engine.prod.bria-api.com/v2/image/edit/erase_by_text
- Auth: API key in header api_token
Request body
Response
Successful operation (Synchronous Success)
Changes
- breaking
request body became required
- breaking
the
request property's minLength was increased from0to1 - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - warning
removed the optional property
from the response with the status - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the non-success response with the status
- breaking
- warning
deleted the
headerrequest parameterapi_token - info
api tag
Editingadded - info
api tag
v2 endpointsremoved
- warning