# Keep existing transparency

When the input image already contains transparency information inside an alpha channel, the Image Editing API lets you decide whether to conserve or discard this information.

For this, set the parameter `keepExistingAlphaChannel` to:

* `never` (default): an existing alpha channel will be ignored and the image will be processed through Photoroom's background removal
* `auto`: if the image has an alpha channel, its value will be used to create the cutout mask

{% hint style="danger" %}
It's possible for an image to contain an alpha channel and for that alpha channel to contain no transparency. (i.e. all pixels are 100% opaque)

In such a case, if `keepExistingAlphaChannel` is set to `auto` then no cutout will happen.
{% endhint %}

<table data-header-hidden data-full-width="true"><thead><tr><th align="center"></th><th align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FEeYzADR8MkMDH170LGYY%2Fshoes-with-transparency.png?alt=media&#x26;token=a14d921f-4e82-48d3-a45f-007d15ee0eed" alt=""></td><td align="center"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2F1AX2ThBnAwZp8OCJLhxn%2Fresponse.png?alt=media&#x26;token=bf91ff7a-4e09-4472-90d4-faee51884d37" alt=""></td><td align="center"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FBEBz9jAZHSHFeQsCOY0d%2Fresponse.png?alt=media&#x26;token=4b42bfc0-cf5e-4e78-baeb-507163e4dc1f" alt=""></td></tr><tr><td align="center"><em>(original image)</em></td><td align="center"><p><code>keepExistingAlphaChannel=never</code></p><p><em>and</em></p><p><code>background.color=blue</code></p></td><td align="center"><p><code>keepExistingAlphaChannel=auto</code></p><p><em>and</em></p><p><code>background.color=blue</code></p></td></tr></tbody></table>


---

# 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/keep-existing-transparency.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.
