---
title: "Remove Object"
method: POST
path: "/remove_object"
tags: ["Editing"]
---

# Remove Object

`POST /remove_object`

## 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`

**Description**

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**

1. A vision-language model reads `prompt` against the image, and SAM 3 segments the matching object.
2. The object's mask is sent to the [Eraser](/image-editing/editing/erase), which removes it and fills the area.

Use [`/erase`](/image-editing/editing/erase) instead when you already have a mask, or need to remove something a short description can't single out.

[`/erase_by_text`](/image-editing/editing/erase-object-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 body

- object
  - `image` string, required: 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**.
  - `prompt` string, required: The object to remove, in natural language, for example `"yellow hammer"` or `"the person on the left"`. Add color, position or size when the image holds several similar objects.
  - `composite` boolean: Selects the erase mode. - **`true` (default), pixel perfect:** Only the object's area is rebuilt and blended into the original. Everything else stays as it was. - **`false`, context aware:** The model also removes what the object casts outside its outline, such as its shadow or its reflection.
  - `sync` boolean: Specifies the response mode. - When `false` (default), the request is processed asynchronously: the API immediately returns a status URL to track progress. - When `true`, the request is processed synchronously: the API holds the connection open until the process is complete and then returns the final image URL in the response.
  - `webhook_url` string, uri: Optional URL for receiving the result via webhook when the async job completes. See [webhooks](/getting-started/async-requests#webhooks).
  - `prompt_content_moderation` boolean: When enabled, applies content moderation to `prompt`. Expected behavior: - Processing stops if the prompt fails moderation. - Returns a 422 error with details about which parameter failed.
  - `visual_input_content_moderation` boolean: When enabled, applies content moderation to input visual. Expected behavior: - Processing stops if the image fails moderation. - Returns a 422 error with details about which parameter failed.
  - `visual_output_content_moderation` boolean: When enabled, applies content moderation to result visual. Expected behavior: - If the modified image fails moderation, returns a 422 error.

## Response `200`

Successful operation (Synchronous Success)

- SyncSuccessResponse
  - `result` object, required
    - `image_url` string, required
  - `request_id` string, required

## Other responses

- `202`: Accepted (Asynchronous). You can track the progress and retrieve the final result using the status endpoint. For more details, refer to the [status endpoint](/status) section.
- `400`: Bad request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not found. Image could not be found at the provided URL.
- `415`: Unsupported media type.
- `422`: Unprocessable Entity
- `429`: Request limit exceeded.
- `460`: Failed to download image.
- `5XX`: **Internal Server Error** – A critical failure occurred in Bria's infrastructure, preventing the status endpoint from responding. - This response indicates a service outage or unexpected runtime failure. - Check [Bria's Status Page](https://status.bria.ai) for real-time updates. - Contact [Support](mailto:support@bria.ai).

## Changes

- **2026-10-18** `5db30bbc0c87`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bria-ai/apis/image-editing-api-reference/changes/remove_object/post.md)

---

[API](https://skmtc.dev/bria-ai/apis/image-editing-api-reference.md) · [All operations](https://skmtc.dev/bria-ai/apis/image-editing-api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/bria-ai/apis/image-editing-api-reference/revisions/ff15f86ae88f?raw)
