---
title: "Hairstyle Extraction"
method: POST
path: "/api/cutout/portrait/hairstyle-extraction"
tags: ["AI BACKGROUND REMOVAL > Portrait"]
---

# Hairstyle Extraction

`POST /api/cutout/portrait/hairstyle-extraction`

Hairstyle Extraction API extracts hairstyle regions from portrait images and returns the extracted hairstyle result.

## Response `200`

Success

- object
  - `request_id` string, required — Request ID for debugging.
  - `log_id` string, required — Log ID for debugging.
  - `error_detail` ErrorDetail, required
    - `code` string, required — Error Code. See [Error Codes](/docs/response-description#error-codes).
    - `code_message` string, required — Error summary.
    - `message` string, required — Detailed error message.
  - `data` object — The content of the result data returned.
    - `elements` object[] — The keying result of each child element.
      - `image_url` string — Result image URL.
      - `width` number, float — The width of the result map.
      - `height` number, float — The height of the resultant graph.
      - `x` number, float — Top left x-coordinate.
      - `y` number, float — Top left y-coordinate.

---

[API](https://skmtc.net/ailabtools/apis/ailabapi.md) · [All operations](https://skmtc.net/ailabtools/apis/ailabapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ailabtools/ailabapi/revisions/e66fbf89c240/schema)
