# Remove background

The background removal feature uses AI to isolate the main subject of an image by removing the background with high accuracy. This is especially useful for applications like e-commerce, social media, or design, where a subject needs to be highlighted or placed on a different background.

To enable background removal, include the `background: { remove: "auto" }` parameter in your API request. The model will process the image to detect the primary subject and automatically remove the background, outputting an image with alpha channel consisting transparency mask.

Let's remove background around bottle of perfume

<figure><img src="/files/B9Vxpbjd37aGv5VGfkmy" alt=""><figcaption></figcaption></figure>

with API request:

```json
{
    "url": "https://deep-image.ai/api-example.png",
    "background": {
       "remove": "auto"
    }
}
```

And result is:

<figure><img src="/files/GNNiFDwdxo2137Bt9SA7" alt=""><figcaption><p>Image with transparent background</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.deep-image.ai/common-usecases/remove-background.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
