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.
Hairstyle Changer Pro
(Async)This API is an asynchronous API, please save the task_id
; then, use the task_id
to request ‘Retrieve Task Results by task_id’ to obtain the task results.
Image requirements
Image format: PNG
JPG
JPEG
Image size: No more than 3 MB.
Image resolution: Larger than 200x200px, smaller than 1999x1999px.
Minimum Face Proportion: To ensure effectiveness, the proportion of the face in the image cannot be less than 20%.
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 45-degree rotation to the left or right.
Request Parameters
Field | Required | Type | Scope | Default | Description |
---|---|---|---|---|---|
task_type |
YES | string |
async |
Task Type. async : Asynchronous tasks. |
|
auto |
YES | integer |
1 |
0 |
1 : Automatic mode. |
image |
YES | file |
Main image. | ||
hair_style |
YES | string |
BuzzCut UnderCut Pompadour SlickBack CurlyShag WavyShag FauxHawk Spiky CombOver HighTightFade ManBun Afro LowFade UndercutLongHair TwoBlockHaircut TexturedFringe BluntBowlCut LongWavyCurtainBangs MessyTousled MediumLengthWavy CornrowBraids LongHairTiedUp Middle-parted 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 |
BuzzCut : Buzz Cut hairUnderCut : UnderCut hairPompadour : Pompadour hairSlickBack : Slick Back hairCurlyShag : Curly Shag hairWavyShag : Wavy Shag hairFauxHawk : Faux Hawk hairSpiky : Spiky hairCombOver : Comb-over hairHighTightFade : High and Tight Fade hairManBun : Man Bun hairAfro : Afro hairLowFade : Low Fade hairUndercutLongHair : Undercut With Long HairTwoBlockHaircut : Two Block HaircutTexturedFringe : Textured Fringe HairBluntBowlCut : Blunt Bowl CutLongWavyCurtainBangs : Long Wavy Curtain Bangs HairMessyTousled : Messy Tousled hairMediumLengthWavy : Medium Length Wavy hairCornrowBraids : Cornrow Braids hairLongHairTiedUp : Long Hair Tied Up HairMiddle-parted : Middle-parted HairShortPixieWithShavedSides : Short Pixie With Shaved SidesShortNeatBob : short neat bob hairDoubleBun : double bun hairUpdo : Updo hairSpiked : spiked hairbowlCut : bowl cut hairChignon : Chignon hairPixieCut : Pixie Cut hairSlickedBack : slicked back hairLongCurly : Long curly hairCurlyBob : Curly bob hairStackedCurlsInShortBob : Stacked Curls in Short Bob hairSidePartCombOverHairstyleWithHighFade : Side Part Comb-Over Hairstyle With High Fade hairWavyFrenchBobVibesfrom1920 : Wavy French Bob Vibes from 1920BobCut : bob Haircut hairShortTwintails : Short Twintails hairShortCurlyPixie : Short Curly PixieLongStraight : Long straight hairLongWavy : Long wavy hairFishtailBraid : Fishtail braid hairTwinBraids : Twin Braids hairPonytail : Ponytail hairDreadlocks : dreadlocks hairCornrows : Cornrows hairShoulderLengthHair : Shoulder Length Straight HairLooseCurlyAfro : Loose Curly Afro hairLongTwintails : Long Twintails hairLongHimeCut : Long Hime Cut hairBoxBraids : Box Braids hair |
|
color |
NO | string |
blonde platinumBlonde brown lightBrown blue lightBlue purple lightPurple pink black white grey silver red orange green gradient multicolored darkBlue burgundy darkGreen |
blonde : blonde hairplatinumBlonde : platinum blonde hairbrown : brown hairlightBrown : light brown hairblue : blue hairlightBlue : light blue hairpurple : purple hairlightPurple : light purple hairpink : pink hairblack : black hairwhite : white hairgrey : grey hairsilver : silver hairred : red hairorange : orange hairgreen : green hairgradient : gradient hairmulticolored : multicolored hairdarkBlue : blue hairburgundy : burgundy hairdarkGreen : dark green |
|
image_size |
NO | integer |
1 2 3 4 |
1 |
Returns the number of images. |
Field | Type | Description |
---|---|---|
error_code |
integer |
Error Code. |
error_msg |
string |
Error Message. |
request_id |
string |
Request ID. |
task_id |
string |
Task ID. |
Retrieve Task Results by task_id
Retrieve asynchronous task results by task_id
.
Field | Required | Type | Description |
---|---|---|---|
task_id |
YES | string |
Task id:task_id |
Field | Type | Description |
---|---|---|
error_code |
integer |
Error Code. |
error_msg |
string |
Error Message. |
request_id |
string |
Request ID. |
task_status |
integer |
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 |
Result URL address. Note: The URL address is a temporary address, valid for 24 hours, and will not be accessible after the expiration date. |