# AI Text Removal

The Image Editing API allows you to automatically remove any unwanted text from your images.

To remove text from the input image, set the argument `textRemoval.mode` with one of the following values:

* `ai.artificial`: artificial text will be automatically removed. Artificial text includes all text added on an image through post-precessing, such as company name, watermarks, discounts, etc.
* `ai.natural`: natural text will be automatically removed. Natural text includes text that naturally occurs in an image such as writing on buildings or clothings, road signs, etc.
* `ai.all`: all text (natural and artificial) will be automatically removed.

If we take the example of this image:

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

Here are the results you will get for each possible value of `textRemoval.mode`:

<table data-header-hidden data-full-width="false"><thead><tr><th width="225" align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><em>(original image)</em></td><td align="center"><img src="/files/0Lo65uVSeBVEcOsFaib1" alt=""></td></tr><tr><td align="center"><code>ai.artificial</code></td><td align="center"><img src="/files/Ol6F33JzW0VPBDlx2PnM" alt=""></td></tr><tr><td align="center"><code>ai.natural</code></td><td align="center"><img src="/files/BekLFaSfK0IfSoljGZaA" alt=""></td></tr><tr><td align="center"><code>ai.all</code></td><td align="center"><img src="/files/UzruNksowS7lwdxkW9EN" alt=""></td></tr></tbody></table>

If you want to give it a try, here's the code to reproduce the examples above:

{% code overflow="wrap" %}

```bash
curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'x-api-key: YOUR_API_KEY' \
  --form imageFile=@/path/to/your/image.jpg \
  --form removeBackground=false \
  --form referenceBox=originalImage \
  --form textRemoval.mode=ai.all \
  --output result-with-text-removed.png
```

{% endcode %}

<a href="https://try-api.photoroom.com/?removeBackground=false&#x26;referenceBox=originalImage&#x26;textRemoval.mode=ai.all" class="button primary">Try it now!</a>


---

# 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://docs.photoroom.com/image-editing-api-plus-plan/ai-text-removal.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.
