> ## Documentation Index
> Fetch the complete documentation index at: https://ailabtools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Hairstyle Changer Pro

> Hairstyle Changer Pro API generates a single AI hairstyle and hair color preview from a portrait photo.



## OpenAPI

````yaml /docs/openapi.json post /api/portrait/effects/hairstyle-editor-pro
openapi: 3.0.0
info:
  title: AILabAPI
  description: >-
    [<b>AILabTools</b>](https://www.ailabtools.com) is an advanced tool that
    offers a vast array of simple and flexible API endpoints to suit your
    specific needs. With just one [<b>API
    KEY</b>](https://www.ailabtools.com/doc/get-api-key), you can easily call
    any of the endpoints and integrate them quickly into your application or
    workflow, allowing for smooth and efficient operations. 
     
    [<b>AILabTools</b>](https://www.ailabtools.com) is continuously evolving,
    and you can anticipate even more API endpoints being added in the future,
    further enhancing its capabilities and usefulness for your artificial
    intelligence and machine learning requirements.
  version: 1.0.0
servers:
  - url: https://www.ailabapi.com
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: AI IMAGE
  - name: AI IMAGE > Image Enhancement
  - name: AI IMAGE > Image Effects
  - name: AI IMAGE > Image Editing
  - name: AI IMAGE > Image Scoring
  - name: AI BACKGROUND REMOVAL
  - name: AI BACKGROUND REMOVAL > Portrait
  - name: AI BACKGROUND REMOVAL > General
  - name: AI PORTRAIT
  - name: AI PORTRAIT > Portrait Effects
  - name: AI PORTRAIT > Portrait Enhance
  - name: AI PORTRAIT > Portrait Editing
  - name: AI PORTRAIT > Portrait Analysis
  - name: AI COMMON
paths:
  /api/portrait/effects/hairstyle-editor-pro:
    post:
      tags:
        - AI PORTRAIT > Portrait Effects
      summary: Hairstyle Changer Pro
      description: >-
        Hairstyle Changer Pro API generates a single AI hairstyle and hair color
        preview from a portrait photo.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - image
                - hair_style
              properties:
                image:
                  type: string
                  format: binary
                  description: >-
                    Source image. 

                    - Image format: `JPEG` `JPG` `PNG` 

                    - Image size: No more than 5 MB. 

                    - Image resolution: Larger than 200x200px, smaller than
                    4090x4090px. 

                    - Minimum Face Proportion: To ensure effectiveness, the
                    proportion of the face in the image cannot be less than
                    10%. 

                    - Facial Integrity: To ensure effectiveness, the face in the
                    image should ideally not be obscured. 

                    - Facial Angle: To ensure effectiveness, the face in the
                    image should ideally be front-facing, with no more than a
                    30-degree rotation to the left or right.
                hair_style:
                  type: string
                  description: >-
                    Hairstyle. See [Supported hair_style
                    values](/docs/ai-portrait/effects/hairstyle-editor-pro/api#hair_style).
                  enum:
                    - BuzzCut
                    - UnderCut
                    - Pompadour
                    - SlickBack
                    - CurlyShag
                    - WavyShag
                    - FauxHawk
                    - Spiky
                    - CombOver
                    - HighTightFade
                    - ManBun
                    - Afro
                    - LowFade
                    - UndercutLongHair
                    - TwoBlockHaircut
                    - TexturedFringe
                    - BluntBowlCut
                    - LongWavyCurtainBangs
                    - MessyTousled
                    - CornrowBraids
                    - LongHairTiedUp
                    - Middle-parted
                    - ManGreased
                    - WavyMiddlePart
                    - Natural_Side-Part
                    - Wolf_Crop
                    - Wind-Tousled_Crop
                    - Side-Parted_Textured
                    - FluffyMiddlePart
                    - FreshSide-Parted
                    - Smooth_Crop
                    - Korean_Wavy_Crop
                    - Comma_Hair
                    - Side-Part_Crop
                    - Natural_Middle_Part
                    - ShortPixieWithShavedSides
                    - ShortNeatBob
                    - DoubleBun
                    - Updo
                    - Spiked
                    - bowlCut
                    - Chignon
                    - PixieCut
                    - SlickedBack
                    - LongCurly
                    - CurlyBob
                    - StackedCurlsInShortBob
                    - SidePartCombOverHairstyleWithHighFade
                    - WavyFrenchBobVibesfrom1920
                    - BobCut
                    - ShortTwintails
                    - ShortCurlyPixie
                    - LongStraight
                    - LongWavy
                    - FishtailBraid
                    - TwinBraids
                    - Ponytail
                    - Dreadlocks
                    - Cornrows
                    - ShoulderLengthHair
                    - LooseCurlyAfro
                    - LongTwintails
                    - LongHimeCut
                    - BoxBraids
                    - Layered_Waves
                    - Side_Flip_Perm
                    - Textured_Crop
                    - Mushroom_Curl
                    - Vintage_Curls
                    - Magic_Perm
                    - Side-Parted_Waves
                    - Fluffy_Short
                    - Smooth_Inward_Bob
                    - Neat_Short
                    - Natural_Short
                    - Chic_Tapered_Bob
                    - Edgy_Textured_Pixie
                    - Elegant_Wavy_Crop
                    - Chic_Wavy_Pixie
                    - Elegant_Side_Wave
                    - Soft_Layered_Curl
                    - Executive_Pixie
                    - Curved_Chic_Bob
                    - Airy_Short_Curls
                    - Playful_Curly_Bob
                    - Playful_Wavy_Bob
                    - Elegant_Soft_Curl
                    - Elegant_Smooth_Bob
                    - Retro_Airy_Curl
                    - Soft_Wavy_Bob
                    - Light_Inward_Bob
                    - Neat_Curly_Crop_Cut
                    - Elegant_Volumized_Bob
                    - Modern_Curls_Chic
                    - Mocha_Volume_Pixie
                    - Elegant_Side_Flow
                    - Chestnut
                    - ChoppyBangs
                    - StructuredWavyShag
                    - TinfoilPerm
                    - ClassicWavyBob
                    - Fluffy_Pixie_Cut
                    - FrenchBangs
                    - JapaneseShort
                    - MediumLongLayered
                    - male_hairstyle_0001
                    - male_hairstyle_0002
                    - male_hairstyle_0003
                    - male_hairstyle_0004
                    - male_hairstyle_0005
                    - male_hairstyle_0006
                    - male_hairstyle_0007
                    - male_hairstyle_0008
                    - male_hairstyle_0009
                    - male_hairstyle_0010
                    - male_hairstyle_0011
                    - male_hairstyle_0012
                    - male_hairstyle_0013
                    - male_hairstyle_0014
                    - male_hairstyle_0015
                    - male_hairstyle_0016
                    - male_hairstyle_0017
                    - male_hairstyle_0018
                    - male_hairstyle_0019
                    - male_hairstyle_0020
                    - male_hairstyle_0021
                    - male_hairstyle_0022
                    - male_hairstyle_0023
                    - male_hairstyle_0024
                    - male_hairstyle_0025
                    - male_hairstyle_0026
                    - male_hairstyle_0027
                    - male_hairstyle_0028
                    - male_hairstyle_0029
                    - male_hairstyle_0030
                    - male_hairstyle_0031
                    - male_hairstyle_0032
                    - male_hairstyle_0033
                    - male_hairstyle_0034
                    - male_hairstyle_0035
                    - male_hairstyle_0036
                    - male_hairstyle_0037
                    - male_hairstyle_0038
                    - male_hairstyle_0039
                    - male_hairstyle_0040
                    - male_hairstyle_0041
                    - male_hairstyle_0042
                    - male_hairstyle_0043
                    - male_hairstyle_0044
                    - male_hairstyle_0045
                    - male_hairstyle_0046
                    - male_hairstyle_0047
                    - male_hairstyle_0048
                    - male_hairstyle_0049
                    - male_hairstyle_0050
                    - male_hairstyle_0051
                    - male_hairstyle_0052
                    - male_hairstyle_0053
                    - male_hairstyle_0054
                    - male_hairstyle_0055
                    - male_hairstyle_0056
                    - male_hairstyle_0057
                    - male_hairstyle_0058
                    - male_hairstyle_0059
                    - male_hairstyle_0060
                    - male_hairstyle_0061
                    - male_hairstyle_0062
                    - female_hairstyle_0001
                    - female_hairstyle_0002
                    - female_hairstyle_0003
                    - female_hairstyle_0004
                    - female_hairstyle_0005
                    - female_hairstyle_0006
                    - female_hairstyle_0007
                    - female_hairstyle_0008
                    - female_hairstyle_0009
                    - female_hairstyle_0010
                    - female_hairstyle_0011
                    - female_hairstyle_0012
                    - female_hairstyle_0013
                    - female_hairstyle_0014
                    - female_hairstyle_0015
                    - female_hairstyle_0016
                    - female_hairstyle_0017
                    - female_hairstyle_0018
                    - female_hairstyle_0019
                    - female_hairstyle_0020
                    - female_hairstyle_0021
                    - female_hairstyle_0022
                    - female_hairstyle_0023
                    - female_hairstyle_0024
                    - female_hairstyle_0025
                    - female_hairstyle_0026
                    - female_hairstyle_0027
                    - female_hairstyle_0028
                    - female_hairstyle_0029
                    - female_hairstyle_0030
                    - female_hairstyle_0031
                    - female_hairstyle_0032
                    - female_hairstyle_0033
                    - female_hairstyle_0034
                    - female_hairstyle_0035
                    - female_hairstyle_0036
                    - female_hairstyle_0037
                    - female_hairstyle_0038
                    - female_hairstyle_0039
                    - female_hairstyle_0040
                    - female_hairstyle_0041
                    - female_hairstyle_0042
                    - female_hairstyle_0043
                    - female_hairstyle_0044
                    - female_hairstyle_0045
                    - female_hairstyle_0046
                    - female_hairstyle_0047
                    - female_hairstyle_0048
                    - female_hairstyle_0049
                    - female_hairstyle_0050
                    - female_hairstyle_0051
                    - female_hairstyle_0052
                    - female_hairstyle_0053
                    - female_hairstyle_0054
                    - female_hairstyle_0055
                    - female_hairstyle_0056
                    - female_hairstyle_0057
                    - female_hairstyle_0058
                    - female_hairstyle_0059
                    - female_hairstyle_0060
                    - female_hairstyle_0061
                    - female_hairstyle_0062
                    - female_hairstyle_0063
                    - female_hairstyle_0064
                    - female_hairstyle_0065
                    - female_hairstyle_0066
                    - female_hairstyle_0067
                    - female_hairstyle_0068
                    - female_hairstyle_0069
                    - female_hairstyle_0070
                    - female_hairstyle_0071
                    - female_hairstyle_0072
                    - female_hairstyle_0073
                  example: BuzzCut
                color:
                  type: string
                  description: >-
                    Hair color preset. See [Supported color
                    values](/docs/ai-portrait/effects/hairstyle-editor-pro/api#color).
                  enum:
                    - blonde
                    - platinumBlonde
                    - brown
                    - lightBrown
                    - blue
                    - lightBlue
                    - purple
                    - lightPurple
                    - pink
                    - black
                    - white
                    - grey
                    - silver
                    - red
                    - orange
                    - green
                    - gradient
                    - multicolored
                    - darkBlue
                    - burgundy
                    - darkGreen
                  default: blonde
      responses:
        '200':
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PublicResponseFields'
                  - type: object
                    properties:
                      task_id:
                        $ref: '#/components/schemas/AsyncTaskId'
              example:
                request_id: ''
                log_id: ''
                error_detail:
                  code: ''
                  code_message: ''
                  message: ''
                task_id: ''
          description: Success
components:
  schemas:
    PublicResponseFields:
      type: object
      required:
        - request_id
        - log_id
        - error_detail
      properties:
        request_id:
          type: string
          description: Request ID for debugging.
        log_id:
          type: string
          description: Log ID for debugging.
        error_detail:
          $ref: '#/components/schemas/ErrorDetail'
    AsyncTaskId:
      type: string
      description: >-
        Task ID for querying [Querying Async Task
        Results](/docs/ai-common/async-task-results/api).
    ErrorDetail:
      type: object
      required:
        - code
        - code_message
        - message
      properties:
        code:
          type: string
          description: >-
            Error Code. See [Error
            Codes](/docs/response-description#error-codes).
        code_message:
          type: string
          description: Error summary.
        message:
          type: string
          description: Detailed error message.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: ailabapi-api-key
      description: API Key for authentication

````