Based on the stable diffusion model, it supports dozens of different hairstyles and colors, with each generated result being unique. It can simultaneously produce up to four result images for easy comparison and selection of the most suitable hairstyle.
https://www.ailabapi.com/api/portrait/effects/hairstyle-editor-proPOSTmultipart/form-dataPNG JPG JPEG| Image Validity | Reason for Invalidity | |
|---|---|---|
| ✅ | ![]() ![]() ![]() ![]() | |
| ❌ | ![]() ![]() | No face |
![]() ![]() | Incomplete face | |
![]() ![]() | Face obscured | |
![]() ![]() | Face proportion too small | |
![]() ![]() | The face is too large to edit the hairstyle |
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
task_type | YES | string | async | “async: Asynchronous tasks. | |
auto | YES | integer | 1 | 1 | “1: Automatic mode. |
image | YES | file | Main image. | ||
hair_style | YES | string | Scope | Hairstyle. More Details | |
color | NO | string | Scope | Color. More Details | |
image_size | NO | integer | 1, 2, 3, 4 | 1 | Returns the number of images. |
hair_style| Category: Gender | hair_style | Description |
|---|---|---|
| Male | BuzzCut | Buzz Cut hair |
| UnderCut | UnderCut hair | |
| Pompadour | Pompadour hair | |
| SlickBack | Slick Back hair | |
| CurlyShag | Curly Shag hair | |
| WavyShag | Wavy Shag hair | |
| FauxHawk | Faux Hawk hair | |
| Spiky | Spiky hair | |
| CombOver | Comb-over hair | |
| HighTightFade | High and Tight Fade hair | |
| ManBun | Man Bun hair | |
| Afro | Afro hair | |
| LowFade | Low Fade hair | |
| UndercutLongHair | Undercut With Long Hair | |
| TwoBlockHaircut | Two Block Haircut | |
| TexturedFringe | Textured Fringe Hair | |
| BluntBowlCut | Blunt Bowl Cut | |
| LongWavyCurtainBangs | Long Wavy Curtain Bangs Hair | |
| MessyTousled | Messy Tousled hair | |
| CornrowBraids | Cornrow Braids hair | |
| LongHairTiedUp | Long Hair Tied Up Hair | |
| Middle-parted | Middle-parted Hair | |
| ManGreased | Man greased slick-back hair | |
| WavyMiddlePart | Wavy middle-part hair | |
| Natural_Side-Part | Natural side-part hair | |
| Wolf_Crop | Wolf crop hair | |
| Wind-Tousled_Crop | Wind-tousled crop hair | |
| Side-Parted_Textured | Side-parted textured hair | |
| FluffyMiddlePart | Fluffy middle-part hair | |
| FreshSide-Parted | Fresh side-parted hair | |
| Smooth_Crop | Smooth crop hair | |
| Korean_Wavy_Crop | Korean wavy crop hair | |
| Comma_Hair | Comma hair | |
| Side-Part_Crop | Side-part crop hair | |
| Natural_Middle_Part | Natural middle-part hair | |
| Female | ShortPixieWithShavedSides | Short Pixie With Shaved Sides |
| ShortNeatBob | Short neat bob hair | |
| DoubleBun | Double bun hair | |
| Updo | Updo hair | |
| Spiked | Spiked hair | |
| bowlCut | Bowl cut hair | |
| Chignon | Chignon hair | |
| PixieCut | Pixie Cut hair | |
| SlickedBack | Slicked back hair | |
| LongCurly | Long curly hair | |
| CurlyBob | Curly bob hair | |
| StackedCurlsInShortBob | Stacked curls in short bob hair | |
| SidePartCombOverHairstyleWithHighFade | Side Part Comb-Over Hairstyle With High Fade hair | |
| WavyFrenchBobVibesfrom1920 | Wavy French Bob Vibes from 1920 | |
| BobCut | Bob haircut hair | |
| ShortTwintails | Short twintails hair | |
| ShortCurlyPixie | Short curly pixie | |
| LongStraight | Long straight hair | |
| LongWavy | Long wavy hair | |
| FishtailBraid | Fishtail braid hair | |
| TwinBraids | Twin braids hair | |
| Ponytail | Ponytail hair | |
| Dreadlocks | Dreadlocks hair | |
| Cornrows | Cornrows hair | |
| ShoulderLengthHair | Shoulder length straight hair | |
| LooseCurlyAfro | Loose curly afro hair | |
| LongTwintails | Long twintails hair | |
| LongHimeCut | Long Hime cut hair | |
| BoxBraids | Box braids hair | |
| Layered_Waves | Layered waves hair | |
| Side_Flip_Perm | Side flip perm hair | |
| Textured_Crop | Textured crop short hair | |
| Mushroom_Curl | Mushroom curl hair | |
| Vintage_Curls | Vintage short curls hair | |
| Magic_Perm | Magic perm hair | |
| Side-Parted_Waves | Side-parted waves hair | |
| Fluffy_Short | Fluffy short hair | |
| Smooth_Inward_Bob | Smooth inward bob hair | |
| Neat_Short | Neat short hair | |
| Natural_Short | Natural airy short hair | |
| Chic_Tapered_Bob | Chic layered bob hair | |
| Edgy_Textured_Pixie | Edgy textured pixie cut | |
| Elegant_Wavy_Crop | Elegant wavy short crop | |
| Chic_Wavy_Pixie | Chic wavy pixie cut | |
| Elegant_Side_Wave | Elegant side-part wave hair | |
| Soft_Layered_Curl | Soft layered curl hair | |
| Executive_Pixie | Executive neat pixie cut | |
| Curved_Chic_Bob | Curved chic bob hair | |
| Airy_Short_Curls | Airy short curls hair | |
| Playful_Curly_Bob | Playful curly bob hair | |
| Playful_Wavy_Bob | Playful wavy bob hair | |
| Elegant_Soft_Curl | Elegant soft large curls | |
| Elegant_Smooth_Bob | Elegant smooth short bob | |
| Retro_Airy_Curl | Retro airy curl hair | |
| Soft_Wavy_Bob | Soft wavy bob hair | |
| Light_Inward_Bob | Light inward short bob hair | |
| Neat_Curly_Crop_Cut | Neat curly crop short hair | |
| Elegant_Volumized_Bob | Elegant volumized bob hair | |
| Modern_Curls_Chic | Modern chic large curl hair | |
| Mocha_Volume_Pixie | Mocha-toned volumized pixie cut | |
| Elegant_Side_Flow | Elegant side-flowing short hair |
colorcolor | Description |
|---|---|
blonde | blonde hair |
platinumBlonde | platinum blonde hair |
brown | brown hair |
lightBrown | light brown hair |
blue | blue hair |
lightBlue | light blue hair |
purple | purple hair |
lightPurple | light purple hair |
pink | pink hair |
black | black hair |
white | white hair |
grey | grey hair |
silver | silver hair |
red | red hair |
orange | orange hair |
green | green hair |
gradient | gradient hair |
multicolored | multicolored hair |
darkBlue | dark blue hair |
burgundy | burgundy hair |
darkGreen | dark green hair |
| Field | Type | Scope | Description |
|---|---|---|---|
task_type | string | async | Task Type. “async: Asynchronous tasks. |
task_id | string | Asynchronous task ID. Please use this field when calling the Querying Async Task Results API. |
Querying Async Task Results Response| Field | Type | Scope | Description |
|---|---|---|---|
task_status | integer | 0, 1, 2 | Asynchronous task status. 0`: The task is queued.` 1: Asynchronous processing. “2: Processing was successful. |
data | object | The content of the result data returned. | |
+images | array | Array of resultant image addresses. |
API Key for authentication
Success
The response is of type object.