> For the complete documentation index, see [llms.txt](https://docs.cloudimage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudimage.io/transformations/image-operations/background-removal.md).

# Background removal

{% hint style="info" %}
Background removal is powered by Visual Operations Credits; full details on consumption rates can be found here: [Visual Operation Credits table](https://docs.cloudimage.io/account-management/usage#visual-operation-credits-table)
{% endhint %}

<mark style="color:orange;">**bg\_remove=1**</mark>

Background removal automatically detects the foreground object and isolates it by removing the background of an image using advanced AI technology. It can help you create a solid or transparent background for your pictures. This can give your application or website an overall polished look. Moreover, product images with a clear-defined foreground can be indexed better in search engines which rely on AI classification.

{% hint style="info" %}
Please keep in mind that the background removal operation is asynchronous which means that the first request will return the original image (with short cache value) while the image is being processed in the background. The status is checked on each consecutive request and after the operation is complete, the origin image is replaced and the standard caching settings are set.
{% endhint %}

## Examples

| Preview                                                             | Syntax                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <img src="/files/3yJZ3F0YIBRNBIJBatrn" alt="" data-size="original"> | [/samples.scaleflex.com/face.png?<mark style="color:orange;">**w=400**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/face.png?w=400)                                                                                                                                       |
| <img src="/files/QqKswrOqjpAdmuG9j3MM" alt="" data-size="original"> | [/samples.scaleflex.com/face.png?<mark style="color:orange;">**w=400**</mark>&<mark style="color:orange;">**bg\_remove=1**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/face.png?w=400\&bg_remove=1)                                                                      |
| <img src="/files/eKJADtzVpnSiHcat5KWh" alt="" data-size="original"> | [/samples.scaleflex.com/purse.jpg?<mark style="color:orange;">**w=400**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/purse.jpg?w=400)                                                                                                                                     |
| <img src="/files/eav1XeQwbOq9APmSykK3" alt="" data-size="original"> | [/samples.scaleflex.com/purse.jpg?<mark style="color:orange;">**w=400**</mark>&<mark style="color:orange;">**bg\_remove=1**</mark>&<mark style="color:orange;">**bg\_color=456**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/purse.jpg?w=400\&bg_remove=1\&bg_color=456) |

Feel free to try the background removal algorithm with your own images on our [AI demo page](https://ai.scaleflex.com/demo/#/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cloudimage.io/transformations/image-operations/background-removal.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
