# Hairstyle Tryon

Our **Virtual Hairstyle Try-On** endpoint provides realistic hair transformations using just one photo of a person. Explore a wide range of hairstyles and hair colors with exceptional accuracy. It’s our most advanced AI model for hair try-on experiences, designed to deliver high-quality and lifelike results.

{% hint style="info" %}
Model Specifications

* **Processing Resolution**: 864×1296 pixels
* **Processing Time**: 6 seconds
* **Tryon Cost**: 1 per image
  {% endhint %}

### Request <a href="#request" id="request"></a>

Generate a virtual try-on by sending a face image to the following endpoint:

> **POST** `https://tryiton.now/api/v1/tryon/hairstyle`

**Request Examples**

{% tabs %}
{% tab title="cURL" %}

```python
curl -X POST "https://tryiton.now/api/v1/tryon/hairstyle" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "face_image": "https://example.com/path/to/face.png",
    "haircut": "TwinBraids"
  }'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch('https://tryiton.now/api/v1/tryon/hairstyle', {
  method: 'POST',
  body: JSON.stringify({
    face_image: "https://example.com/path/to/face.png",
    haircut: "TwinBraids"
  }),
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  }
});
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
 
response = requests.post(
  "https://tryiton.now/api/v1/tryon/hairstyle",
  headers={
    "Authorization": "Bearer YOUR_API_KEY", 
    "Content-Type": "application/json"
  },
  json={
    "face_image": "https://example.com/path/to/face.png",
    "haircut": "TwinBraids"
  }
)
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}
Returns a job ID for status polling:

<details>

<summary><strong>Response</strong></summary>

```python
{
  "id": "64b7f1a9d9a3b8e5c7f9a123",
  "error": null
}
```

</details>
{% endtab %}
{% endtabs %}

### Request Parameters <a href="#request-parameters" id="request-parameters"></a>

#### Required Parameters <a href="#required-parameters" id="required-parameters"></a>

{% hint style="info" %}

#### `face_image`                                                                                                                                            image URL | base64

Primary image of the person's face on whom the virtual try-on will be performed.
{% endhint %}

{% hint style="danger" %}
**Base64 Format**

Base64 images must include the proper prefix (for example, `data:image/jpg;base64,<YOUR_BASE64>`)
{% endhint %}

<figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F61RnoGUfkmmEWsntnl5w%2Fhaircut_tryon_photo_guidelines.png?alt=media&#x26;token=0bbd3c4b-470f-49a2-b471-11728e2fdc46" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### `haircut`                                                                                                                             'BuzzCut' | 'SlickBack' | ...

The desired hairstyle to be tried on the `face_image`. You can select from a wide range of styles below.
{% endhint %}

{% tabs %}
{% tab title="Men's Hairstyles" %}

<div align="center"><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FoOQ5hprGras2qKuZSkTU%2FOriginalImage-hairstyle-1.webp?alt=media&#x26;token=4b7a2c84-66b3-42ec-bc8b-f46d896351fc" alt="" width="256"><figcaption><p><strong>Original Image</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FvblvpYXcCDsQPAzipU6r%2FResultImage-hairstyle-1-BuzzCut-2.webp?alt=media&#x26;token=577da282-fd92-4b2d-a690-fd68bd6a0c55" alt=""><figcaption><p><strong>BuzzCut</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FmeM5v2A9aWCoqocolBLv%2FResultImage-hairstyle-1-UnderCut-2.webp?alt=media&#x26;token=2d0c9b23-e281-4dfb-ae67-f8cfcb466830" alt=""><figcaption><p><strong>UnderCut</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FU8eSZozMrbxmRYjoWj9y%2FResultImage-hairstyle-1-Pompadour-2.webp?alt=media&#x26;token=5bc5a2f0-151d-4013-918b-20595110d9ad" alt=""><figcaption><p><strong>Pompadour</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FQB87IG9SLGhuk60B6GGh%2FResultImage-hairstyle-1-SlickBack-2.webp?alt=media&#x26;token=2010c832-b929-44ca-8988-4d3a4b7d599b" alt=""><figcaption><p><strong>SlickBack</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FKTmnXq8lufPzde2TBztC%2FResultImage-hairstyle-1-CurlyShag-2.webp?alt=media&#x26;token=18f541b3-7322-4997-bf07-716bb98158d2" alt=""><figcaption><p><strong>CurlyShag</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FHJeHcMtZ9GHif59nzf7N%2FResultImage-hairstyle-1-WavyShag-2.webp?alt=media&#x26;token=72bdda40-0eb4-4803-96d3-922e57330265" alt=""><figcaption><p><strong>WavyShag</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F7AuRIW6PM0FvXiVO6XD7%2FResultImage-hairstyle-1-FauxHawk-2.webp?alt=media&#x26;token=0e3559f6-961c-4386-bd71-cf1a716a53a0" alt=""><figcaption><p><strong>FauxHawk</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F5PRdAZqxTFnluCtd7Xml%2FResultImage-hairstyle-1-Spiky-2.webp?alt=media&#x26;token=610b1c78-951c-4064-97ec-3dd672ead5de" alt=""><figcaption><p><strong>Spiky</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FJmTMsmUyIurPbVhq0vHF%2FResultImage-hairstyle-1-CombOver-2.webp?alt=media&#x26;token=0dc3b1b6-50d1-4cc9-abbf-c3fd43db1cb9" alt=""><figcaption><p><strong>CombOver</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2Frw7S5Jv2iXHGqPbQzMpd%2FResultImage-hairstyle-1-HighTightFade-2.webp?alt=media&#x26;token=dad6495b-af1a-452f-89ba-a70ba2cac468" alt=""><figcaption><p><strong>HighTightFade</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2Frx3XyWEEfwAOpeslCXDB%2FResultImage-hairstyle-1-ManBun-2.webp?alt=media&#x26;token=3c8316e3-e2c0-4ead-9227-cf2a3d3b1af2" alt=""><figcaption><p><strong>ManBun</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FYfSOJfqHTY7vUa5p8l2F%2FResultImage-hairstyle-1-Afro-2.webp?alt=media&#x26;token=4378650e-1012-481f-ac40-b119ce0ce307" alt=""><figcaption><p><strong>Afro</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FCcbjf3m2eREb9LJBiwMk%2FResultImage-hairstyle-1-LowFade-2.webp?alt=media&#x26;token=a8ee5977-3387-4ed2-a60d-ad5f4b679690" alt=""><figcaption><p><strong>LowFade</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F5zyvELsFnDae9d2wDhsM%2FResultImage-hairstyle-1-UndercutLongHair-2.webp?alt=media&#x26;token=20cb0223-9788-4f63-ba17-df05de19dd8e" alt=""><figcaption><p><strong>UndercutLongHair</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FBye4gEx9e2tWAD0Ki6iS%2FResultImage-hairstyle-1-TwoBlockHaircut-2.webp?alt=media&#x26;token=51cd1c59-33ac-40c4-9514-41e803bc4039" alt=""><figcaption><p><strong>TwoBlockHaircut</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F4iCqUaQaY9qeI4hiurTb%2FResultImage-hairstyle-1-TexturedFringe-2.webp?alt=media&#x26;token=a98e8316-d7af-4662-8e1c-30aa7d691f50" alt=""><figcaption><p><strong>TexturedFringe</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FtmwzZ64vpl86wf77dUoL%2FResultImage-hairstyle-1-BluntBowlCut-2.webp?alt=media&#x26;token=f2babd34-0a98-402d-b57b-140c6f734fe3" alt=""><figcaption><p><strong>BluntBowlCut</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FoYIj55ONEwzr0SrvJfQ8%2FResultImage-hairstyle-1-LongWavyCurtainBangs-2.webp?alt=media&#x26;token=2336ab11-8fe1-4869-b5df-4f6e3d0a3c2e" alt=""><figcaption><p><strong>LongWavyCurtainBangs</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FNbUWyWvSmgPOPRwO9zpy%2FResultImage-hairstyle-1-MessyTousled-2.webp?alt=media&#x26;token=7b0beb20-5b70-4bc1-a19b-3b653f2385da" alt=""><figcaption><p><strong>MessyTousled</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FDJXfcn9YcfLjxMZmhail%2FResultImage-hairstyle-1-CornrowBraids-2.webp?alt=media&#x26;token=be872d35-0751-4adf-ae3e-112db1df38b7" alt=""><figcaption><p><strong>CornrowBraids</strong></p></figcaption></figure></div>

<div align="center" data-full-width="false"><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F84mI7oXtiSm5uZsxep2u%2FResultImage-hairstyle-1-LongHairTiedUp-2.webp?alt=media&#x26;token=e493fff1-734c-43f0-bfc3-014c1ab9cde3" alt="" width="128"><figcaption><p><strong>LongHairTiedUp</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F0otekJDRiwYCicpEiOWQ%2FResultImage-hairstyle-1-Middle-parted-2.webp?alt=media&#x26;token=85106837-00e2-44b9-9385-90dcb3a4a2b6" alt="" width="128"><figcaption><p><strong>Middle-parted</strong></p></figcaption></figure></div>
{% endtab %}

{% tab title="Women's Hairstyles" %}

<figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2Fdl0EaKyAObK7qWPi5vMM%2FOriginalImage-hairstyle-3.webp?alt=media&#x26;token=40ccb338-bea6-4d72-adae-5277af006d6f" alt="" width="256"><figcaption><p><strong>Original Image</strong></p></figcaption></figure>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FvaSqEZ2cZHBnVIaTlDCC%2FResultImage-hairstyle-3-ShortPixieWithShavedSides-1.webp?alt=media&#x26;token=aa8cd45f-b794-490c-9b92-5f48a00d42d5" alt=""><figcaption><p><strong>ShortPixieWithShavedSides</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FVRobukhhSKfCsnIhX1cf%2FResultImage-hairstyle-3-ShortNeatBob-1.webp?alt=media&#x26;token=ac361afa-44f2-4ad4-a641-a18c3ccf3389" alt=""><figcaption><p><strong>ShortNeatBob</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FzzLcYuhh1rVduYbIo7VP%2FResultImage-hairstyle-3-DoubleBun-1.webp?alt=media&#x26;token=e36c69a1-e9b0-4a2b-8431-2746b03dc1fe" alt=""><figcaption><p><strong>DoubleBun</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F3xjErvW1eczObBrFX3rQ%2FResultImage-hairstyle-3-Updo-1.webp?alt=media&#x26;token=7e6d2b4a-8318-409d-933f-8d1edc534fe3" alt=""><figcaption><p><strong>Updo</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FmbaQFh2ak7ZHvj93CYla%2FResultImage-hairstyle-3-Spiked-1.webp?alt=media&#x26;token=46ae059d-e2bd-49c5-a476-098952cc5fff" alt=""><figcaption><p><strong>Spiked</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FaS5Wj3wT64MTZ3RoaHeA%2FResultImage-hairstyle-3-bowlCut-1.webp?alt=media&#x26;token=86990f1c-b7c4-4463-8494-09d69574dfe6" alt=""><figcaption><p><strong>bowlCut</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FFOFO5i4YDo5L5n5BmjOP%2FResultImage-hairstyle-3-Chignon-1.webp?alt=media&#x26;token=f80f9e19-99fc-4f4d-80e0-a49e5e54efb0" alt=""><figcaption><p><strong>Chignon</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F58IgGCp7lfj6SxNx1Dj6%2FResultImage-hairstyle-3-PixieCut-1.webp?alt=media&#x26;token=0d8080b1-80da-48b0-b232-0d5b1ec7796b" alt=""><figcaption><p><strong>PixieCut</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F5Hc4UH26vkuGpRgUT1vz%2FResultImage-hairstyle-3-SlickedBack-1.webp?alt=media&#x26;token=3911f2ea-be8c-48e6-85e8-b1b1c936392c" alt=""><figcaption><p>S<strong>lickedBack</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FdIPk0u8PajlbyS16hdg3%2FResultImage-hairstyle-3-LongCurly-1.webp?alt=media&#x26;token=0f04259c-0403-415d-aed5-8e335968f3a1" alt=""><figcaption><p><strong>LongCurly</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FA1jR92Jg1xSAwjIYakBq%2FResultImage-hairstyle-3-CurlyBob-1.webp?alt=media&#x26;token=97c07011-4f6d-4590-aab1-a1bb50c99cd5" alt=""><figcaption><p><strong>CurlyBob</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FjKuOCZP1sWPgnEFSm5Iw%2FResultImage-hairstyle-3-StackedCurlsInShortBob-1.webp?alt=media&#x26;token=6228c02e-a451-4e8d-bb26-4d2a84b24ce5" alt=""><figcaption><p><strong>StackedCurlsInShortBob</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FkEpVWMicuTnkaW3oMAMK%2FResultImage-hairstyle-3-WavyFrenchBobVibesfrom1920-1.webp?alt=media&#x26;token=6d786ffa-6157-4b7a-af68-e1cfab968d3d" alt=""><figcaption><p><strong>WavyFrenchBobVibesfrom1920</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FOyKGNNzETnUqhK4ZIIK8%2FResultImage-hairstyle-3-BobCut-1.webp?alt=media&#x26;token=7d4a561d-1796-4e0e-9016-dbfd8304709b" alt=""><figcaption><p><strong>BobCut</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2Fn8HGTcQxPoIuG3wGB2c6%2FResultImage-hairstyle-3-ShortTwintails-1.webp?alt=media&#x26;token=cc05c3ec-1202-4200-8c8b-2ff9ebd9b8bd" alt=""><figcaption><p><strong>ShortTwintails</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F5Gcrje5k0F7LWGK1opZx%2FResultImage-hairstyle-3-BoxBraids-1.webp?alt=media&#x26;token=620abc78-a371-45b5-91af-2a36dc24a107" alt=""><figcaption><p><strong>BoxBraids</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FogmlXJ6mNC9DpnK0xABe%2FResultImage-hairstyle-3-ShortCurlyPixie-1.webp?alt=media&#x26;token=42feb2d6-c43e-4a98-9620-8417b21382af" alt=""><figcaption><p><strong>ShortCurlyPixie</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FFC89E6fGwfTaEReBdm2t%2FResultImage-hairstyle-3-LongStraight-1.webp?alt=media&#x26;token=1f5f0ee9-0b53-4847-97d8-822a2b0f5b70" alt=""><figcaption><p><strong>LongStraight</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FFOGR4Dpu6h9gYApLgqhB%2FResultImage-hairstyle-3-LongWavy-1.webp?alt=media&#x26;token=8d7975ef-f95d-4891-9df3-f3072286757c" alt=""><figcaption><p><strong>LongWavy</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FW7JIeC0XOhVu0O0FoI7j%2FResultImage-hairstyle-3-FishtailBraid-1.webp?alt=media&#x26;token=048252c5-565e-43d1-a847-de4b31e8934b" alt=""><figcaption><p><strong>FishtailBraid</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FfhRGql4LqnrtXMhXIP0Q%2FResultImage-hairstyle-3-TwinBraids-1.webp?alt=media&#x26;token=9285d6c0-394e-4274-8402-e606fe2ea59d" alt=""><figcaption><p><strong>TwinBraids</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FKa4HmtBA8I1HS8ga1Yel%2FResultImage-hairstyle-3-Ponytail-1.webp?alt=media&#x26;token=91842a69-f884-4d2c-a921-ddca0d779933" alt=""><figcaption><p><strong>Ponytail</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FPeODgiHBOdOxhvICl9Kc%2FResultImage-hairstyle-3-Dreadlocks-1.webp?alt=media&#x26;token=f95db4f8-987a-4107-9387-574cc3535193" alt=""><figcaption><p>D<strong>readlocks</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FauWJMSDxMQ46V6jLyOXH%2FResultImage-hairstyle-3-Cornrows-1.webp?alt=media&#x26;token=7e24aeb5-6208-4f28-9c48-dad4fad62b28" alt=""><figcaption><p><strong>Cornrows</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F1iafS738qSPrfmusq4T3%2FResultImage-hairstyle-3-ShoulderLengthHair-1.webp?alt=media&#x26;token=a05ebf3c-cbff-496b-b91e-dc2430e68c64" alt=""><figcaption><p><strong>ShoulderLengthHair</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FAOVjKuPR5x3FVXC3YVW7%2FResultImage-hairstyle-3-LooseCurlyAfro-1.webp?alt=media&#x26;token=1403dac7-0b35-46f0-8268-aafe749278a2" alt=""><figcaption><p><strong>LooseCurlyAfro</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FEZm56SbRwVgjuUDVdWok%2FResultImage-hairstyle-3-LongTwintails-1.webp?alt=media&#x26;token=933a56b9-76dd-4cc1-894c-315d087f4cc6" alt=""><figcaption><p><strong>LongTwintails</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FBSgDD946ynsRATvicnWw%2FResultImage-hairstyle-3-LongHimeCut-1.webp?alt=media&#x26;token=103011e6-b2f2-4a2a-8f19-605ac1e0f826" alt=""><figcaption><p><strong>LongHimeCut</strong></p></figcaption></figure></div>
{% endtab %}
{% endtabs %}

#### Optional Parameters <a href="#optional-parameters" id="optional-parameters"></a>

{% hint style="info" %}

#### `hair_color`                                                                                                                  'blonde' | 'platinumBlonde' | ...

The desired hair color to be tried on the `haircut`. You can select from a wide range of colors below.
{% endhint %}

{% tabs %}
{% tab title="Hairstyle Colors" %}

<figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FLkRRoN2na2TI3my8Zkhr%2FOriginalImage-color-1.webp?alt=media&#x26;token=5928c269-28f7-4a2b-b085-0173651692bb" alt="" width="375"><figcaption><p><strong>Original Image</strong></p></figcaption></figure>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FytLQbHVeVBSebPMeFzZy%2FResultImage-color-1-blonde-1.webp?alt=media&#x26;token=f58fe9d1-4446-4c00-993d-29e90f64367f" alt=""><figcaption><p><strong>blonde</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FiC8nABvy2gUkCfcynwtN%2FResultImage-color-1-platinumBlonde-1.webp?alt=media&#x26;token=373423c2-ecb2-4b35-80f2-394a421f5829" alt=""><figcaption><p><strong>platinumBlonde</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FdqJ2JfV0s1tO54AF1PWT%2FResultImage-color-1-brown-1.webp?alt=media&#x26;token=6fee2d74-644e-45bf-aefd-3f49558baa23" alt=""><figcaption><p><strong>brown</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F4ohQ7jiDB4QvYk6yxX0L%2FResultImage-color-1-lightBrown-1.webp?alt=media&#x26;token=bb8de3ff-949b-4e8f-9881-fade8ef505f1" alt=""><figcaption><p><strong>lightBrown</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FyCKmD66aG7vPbtGEyBVB%2FResultImage-color-1-blue-1.webp?alt=media&#x26;token=c15e39d6-c1f9-4fd9-94cd-872de2e45bfc" alt=""><figcaption><p><strong>blue</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FdmfnH8WqJiXUVOihCtBd%2FResultImage-color-1-darkBlue-1.webp?alt=media&#x26;token=8ac708f5-8667-40e8-9d0d-4406744beca1" alt=""><figcaption><p><strong>darkBlue</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FKWwzMrXlgWqp0FsWNnML%2FResultImage-color-1-lightBlue-1.webp?alt=media&#x26;token=ca584eff-918e-478d-9c52-dd5cb42eae1c" alt=""><figcaption><p><strong>lightBlue</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F8VCTn8B3Qdplvo4Ju3Qh%2FResultImage-color-1-purple-1.webp?alt=media&#x26;token=8f9c1235-ded3-4e47-b8eb-689e4cb52e64" alt=""><figcaption><p><strong>purple</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FvBen2pRgRY74N8HQUj4x%2FResultImage-color-1-lightPurple-1.webp?alt=media&#x26;token=8dce8643-5fef-4112-b030-5b3192d61cf5" alt=""><figcaption><p><strong>lightPurple</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2Fs7M5sRSmSLk7FYPCpMK1%2FResultImage-color-1-pink-1.webp?alt=media&#x26;token=0297d8a0-ae2c-4ec8-b754-3ed228b3f9b5" alt=""><figcaption><p><strong>pink</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FRLVYz18TKWCnlI8m4INP%2FResultImage-color-1-black-1.webp?alt=media&#x26;token=037845ce-e7ec-4480-a814-80e932cfd1ae" alt=""><figcaption><p><strong>black</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F8sH4pCTkpLLhL86MocCe%2FResultImage-color-1-white-1.webp?alt=media&#x26;token=f9769958-d606-4a39-92a1-fab819219f48" alt=""><figcaption><p><strong>white</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FG7ooudRmDLYQow1riUaU%2FResultImage-color-1-grey-1.webp?alt=media&#x26;token=fdb5602a-db63-4add-a96b-c0d05b371b46" alt=""><figcaption><p><strong>grey</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FiR4aMH4wCgfaqKU35bPT%2FResultImage-color-1-silver-1.webp?alt=media&#x26;token=493ddbfd-3ae0-4e75-84c9-18b93d7ca8bd" alt=""><figcaption><p><strong>silver</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FrBDpT6usdehN6Qil5vHt%2FResultImage-color-1-red-1.webp?alt=media&#x26;token=a77c3d07-d708-4782-86cc-6af2b6420516" alt=""><figcaption><p><strong>red</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FjkRv3CLT270oHKuB3zfv%2FResultImage-color-1-burgundy-1.webp?alt=media&#x26;token=af2ed2c7-d84c-4297-af78-a265277bb9fb" alt=""><figcaption><p><strong>burgundy</strong></p></figcaption></figure></div>

<div><figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FU94FOdwyUbuR3lQpkvq4%2FResultImage-color-1-orange-1.webp?alt=media&#x26;token=09464506-7790-4118-9940-398667c4681e" alt=""><figcaption><p><strong>orange</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2F2rJm4eKHIiDWeSiXM4rO%2FResultImage-color-1-green-1.webp?alt=media&#x26;token=fd5260e1-9b0d-4c58-bcc5-9f7757e5a3af" alt=""><figcaption><p><strong>green</strong></p></figcaption></figure> <figure><img src="https://4046465772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9mxyggOXuin4a0MnaNH5%2Fuploads%2FIVB9RE8LFCOPpp0eqrBo%2FResultImage-color-1-darkGreen-1.webp?alt=media&#x26;token=fd43430a-d481-4c9f-aafc-b1fcd7586c39" alt=""><figcaption><p><strong>darkGreen</strong></p></figcaption></figure></div>
{% endtab %}
{% endtabs %}

### Response Polling <a href="#response-polling" id="response-polling"></a>

After submitting your request, poll the status endpoint using the returned job ID. See [API Fundamentals](https://docs.tryiton.now/api-overview/api-fundamentals) for complete polling details.

#### Successful Response <a href="#successful-response" id="successful-response"></a>

When your virtual try-on completes successfully, the status endpoint will return:

```json
{
  "id": "64b7f1a9d9a3b8e5c7f9a123",
  "status": "completed",
  "output": [
    "https://cdn.tryiton.now/hairstyle/XXX.png"
  ],
  "error": null
}
```

The `output` array contains URLs to your generated try-on images showing the model wearing the specified garment.&#x20;

### Runtime Errors <a href="#runtime-errors" id="runtime-errors"></a>

If an error occurs during inference (while the model is running), the API will return a 200 status code with a prediction `status: failed`. The response will also include an error object under the error key.

#### The Error Object <a href="#the-error-object" id="the-error-object"></a>

```json
{
  "error": {
    "name": "ErrorName",
    "message": "The error message"
  }
}
```

Example of an error when polling the `/status` endpoint:

```json
{
  "id": "64b7f1a9d9a3b8e5c7f9a123",
  "status": "failed",
  "error": {
    "name": "ImageLoadError",
    "message": "The image could not be found at the specified URL (404)."
  }
}
```

If you encounter an unrecognized error, please contact us at <contact@tryiton.now>
