Skip to content

Erase Object by Text

Request

Remove specific objects or unwanted elements from an image using natural language descriptions.

Example: object_name: "table"

Input ImageOutput Image
Headers
api_tokenstringrequired
Bodyapplication/json
imagestringrequired

The source image to be handled by the API.
Supported input types:

  • Base64-encoded string - URL pointing to an image file that is publicly accessible and available at the time of processing.

Accepted formats: JPEG, JPG, PNG, WEBP.

object_namestringrequired

The name of the object to remove (e.g., "the lamp").

webhook_urlstring, (uri)

Optional URL for receiving the result via webhook when the async job completes. See Webhooks.

POST
/erase_by_text
curl -i -X POST \
  https://engine.prod.bria-api.com/v2/image/edit/erase_by_text \
  -H 'Content-Type: application/json' \
  -H 'api_token: string' \
  -d '{
    "image": "string",
    "object_name": "string",
    "webhook_url": "http://example.com"
  }'

Responses

Successful operation (Synchronous Success)

Bodyapplication/json
resultobjectrequired
request_idstringrequired
warningstring

Returned only when ip_signal = true and the instruction field included IP content.

Response
{ "result": { "image_url": "string", "seed": 0, "structured_instruction": "string" }, "request_id": "string", "warning": "string" }