> For the complete documentation index, see [llms.txt](https://docs.photoroom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.photoroom.com/image-editing-api-plus-plan/ai-ironing.md).

# AI Ironing

## Overview

The Image Editing API can turn images of wrinkly clothing into freshly pressed clothing.

To iron clothing in an image, set `ironing.mode` to `ai.auto`.

<table data-header-hidden><thead><tr><th align="center" valign="middle"></th><th align="center"></th></tr></thead><tbody><tr><td align="center" valign="middle"><em>(original image)</em></td><td align="center"><em>(edited image)</em></td></tr><tr><td align="center" valign="middle"><img src="/files/8qmfFPC8DkrLMMS1yqcy" alt="" data-size="original"></td><td align="center"><img src="/files/lAnWFN0YV9LtKEH9HptC" alt="" data-size="original"></td></tr></tbody></table>

{% hint style="info" %}
AI Ironing is meant to be used with images that feature clothing items.

Please note that alterations can be introduced.
{% endhint %}

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

```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 ironing.mode=ai.auto \
  --form removeBackground=false \
  --output ironed.png
```

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

## Additional Examples

<table data-header-hidden><thead><tr><th align="center" valign="middle"></th><th align="center"></th></tr></thead><tbody><tr><td align="center" valign="middle"><em>(original image)</em></td><td align="center"><em>(edited image)</em></td></tr><tr><td align="center" valign="middle"><img src="/files/gSIplFVTOZ6dx1pmgFDz" alt="" data-size="original"></td><td align="center"><img src="/files/PAzUoe7tmBBW3NkACC6v" alt="" data-size="original"></td></tr><tr><td align="center" valign="middle"><img src="/files/wMB1cWKuVAyhkUch3ovQ" alt=""></td><td align="center"><img src="/files/r5C5spuOv12laWzdIBFO" alt=""></td></tr><tr><td align="center" valign="middle"><img src="/files/GpWdPUnzmX6Cly7jlDY6" alt=""></td><td align="center"><img src="/files/n6QizEfk6qE269Ii3i9I" alt=""></td></tr><tr><td align="center" valign="middle"><img src="/files/r93Nqnnl9N8LSGr2iVra" alt=""></td><td align="center"><img src="/files/kVX3vCvyNnVABGcXXlpq" alt=""></td></tr><tr><td align="center" valign="middle"><img src="/files/EgijaBcPE8URP9pb5nJV" alt=""></td><td align="center"><img src="/files/vEiWtlNuyy89gnoLmzHy" alt=""></td></tr></tbody></table>


---

# 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.photoroom.com/image-editing-api-plus-plan/ai-ironing.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.
