> 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/subject-outline.md).

# Subject Outline

## Overview

The Image Editing API allows you to easily add a **colored outline** around the subject of your images.

### `outline.color`

To add a **colored outline** to the subject of an image, set the `outline.color` argument to a solid color value.&#x20;

It can be any hexadecimal color code **without** the # symbol (examples: `FF0000`, `FF0000EE`) or a supported color name (see list below).

|                                                                                                                     *(original image)*                                                                                                                    |                                                                                                                          `outline.color=white`                                                                                                                          |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FbZimXoj4ReQ3ipWkA17Z%2Fshoes.png?alt=media&amp;token=2fdf267e-f873-45ce-a7bb-1044d2e17acc" alt="" data-size="original"> | <img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2Flyzq4QF4lCyNZYHNcVty%2Fshoes-white-outline.png?alt=media&amp;token=5977209c-3b3c-431f-b11c-f81d40a2a98f" alt="" data-size="original"> |

<details>

<summary>List of supported color names</summary>

* `aqua`
* `black`
* `blue`
* `cyan`
* `fuchsia`
* `gray`
* `green`
* `lime`
* `magenta`
* `maroon`
* `navy`
* `olive`
* `purple`
* `red`
* `silver`
* `teal`
* `white`
* `yellow`

</details>

{% hint style="warning" %}
To preserve the background, you must also set `removeBackground` to `false`.
{% endhint %}

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

```bash
curl --request POST \
 --url 'https://image-api.photoroom.com/v2/edit' \
 --header 'x-api-key: YOUR_API_KEY_HERE' \
 --form 'imageFile=@"/path/to/image.png"' \
 --form 'outline.color="white"' \
 --form 'referenceBox="originalImage"' \
 --form 'removeBackground="false"' \
 --output result.png
```

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

## Additional Parameters

### `outline.width`

To control the width (thickness) of the outline, set the argument `outline.width` to a value between `0` and `0.1`.

The value represents a ratio of the image size, where `0.1` (10%) is the maximum thickness.

When this argument is not provided, the API applies a default value of `0.03`.

**Suggested values:**

* `0.01-0.02`: Subtle/thin outline
* `0.03-0.05`: Standard/medium outline
* `0.06-0.1`: Bold/thick outline

|                                                                                                                             `outline.width=0.01`                                                                                                                             |                                                                                                                           `outline.width=0.03`                                                                                                                          |                                                                                                          `outline.width=0.1`                                                                                                          |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FPa7vUiV7PKNAk4Ffappa%2Fshoes-outline-width-0-01.png?alt=media&amp;token=0c241444-ea6f-40c8-87b0-d7e2964be353" alt="" data-size="original"> | <img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2F8pNr9dk7caLDxii06hRZ%2Fshoes-white-outline.png?alt=media&amp;token=eb92ffa4-d64e-4988-8331-e931e91abb44" alt="" data-size="original"> | ![](https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FBv8oW8RR5rfhBlQj5H8H%2Fshoes-outline-width-0-1.png?alt=media\&token=e38c6837-e0a8-44a6-9542-d4acedae1d29) |

### `outline.blurRadius`

You can apply blur to the outline to create a glow or soft edge effect.

To control the blur strength of the outline, set the `outline.blurRadius` argument to a value between `0` (no blur) and `0.025` (maximum blur).

When this argument is not provided, the API applies a default value of `0`.

|                                                                                                       `outline.blurRadius=0`                                                                                                      |                                                                                                       `outline.blurRadius=0.01`                                                                                                       |                                                                                                       `outline.blurRadius=0.025`                                                                                                       |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ![](https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FlQkLReDW1TGbfXz3g8oU%2Fshoes-white-outline.png?alt=media\&token=86709449-1b15-4362-a30e-a612631d4efb) | ![](https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2F1EciKUsyYAcGU8hdqvdw%2Fshoes-outline-blur-0-01.png?alt=media\&token=6d3bf245-681a-4da5-a924-5477c514843a) | ![](https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2F2EKuffxXjfprMUS8E6uT%2Fshoes-outline-blur-0-025.png?alt=media\&token=eb845380-fc0c-452d-a7b4-ace97ab4e4cb) |

## Examples

<table data-header-hidden><thead><tr><th align="center" valign="top"></th><th align="center" valign="top"></th></tr></thead><tbody><tr><td align="center" valign="top"><em>(original image)</em></td><td align="center" valign="top"><em>(edited image)</em></td></tr><tr><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FF2ciNLYfIX5tl5ew56FV%2Ffashion-wide-black-tshirt.jpg?alt=media&amp;token=1af2f926-2880-41dc-93e3-878c08d9fc1f" alt="" data-size="original"></td><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FTCRQtpOaAWbeGHKiQQDn%2Ffashion-wide-black-tshirt-outline.png?alt=media&amp;token=c5c5cbc8-b298-4c92-a6ea-bc643d1999a5" alt=""><br><br><code>outline.color=white &#x26; outline.width=0.03 &#x26; removeBackground=false</code> </td></tr><tr><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2F8lQo5wE17Vr02NDJWG7b%2Fcosmetics.webp?alt=media&amp;token=938b2546-fbb0-4120-b991-0fa9925ff899" alt="" data-size="original"></td><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FZCpAqsxeC2YwfkRbDaKF%2Fcosmetics-outline.png?alt=media&amp;token=03cdf3e4-cb79-42d2-a7f4-fab989f4cfc1" alt="" data-size="original"><br><br><code>outline.color=white &#x26; outline.width=0.02 &#x26; outline.blurRadius=0.02 &#x26; removeBackground=false</code></td></tr><tr><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2Fv9gUTURykNHqUaIu8KkH%2Fplant.jpg?alt=media&amp;token=c2f57fd1-e1a8-4083-bf7a-69d4fe36cdd3" alt="" data-size="original"></td><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FJQhx7myJD323csVyGaar%2Fplant-outline-black.png?alt=media&amp;token=99f85600-9f09-4f4d-84ad-5d5fbed8be7e" alt=""><br><br><code>outline.color=black &#x26; outline.width=0.02 &#x26; removeBackground=true</code></td></tr><tr><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2Fl8CWmaAusKTpffD88nFk%2Fdonut.jpeg?alt=media&amp;token=a08b5ad3-26bc-48b1-956c-44db7bfd7cf8" alt="" data-size="original"></td><td align="center" valign="top"><img src="https://2855892273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1SYxn7dWbQYsNtUdJE3f%2Fuploads%2FfJCB1noc1V6UTTpwR4FN%2Fdonut-outline.png?alt=media&amp;token=a5e5d2b2-7243-4032-8ac5-31b637856eed" alt=""><br><br><code>outline.color=fcfc03 &#x26; outline.width=0.1 &#x26; outline.blurRadius=0.01 &#x26; removeBackground=false</code>    </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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.photoroom.com/image-editing-api-plus-plan/subject-outline.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
