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

# Head Extraction

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

Head Extraction API detects and crops head regions from portraits to create clean avatars, profile images, and social media headshots.

## 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)
