API Reference

Generate hairstyle

Change the hairstyle in a face photo using one of the preset IDs listed in the style parameter below.

Model:hairstyle-transfer
Credit:3
post/v1/images/hairstyle

Authorization — This endpoint requires an API key. Pass it in the api-key header on every request. Learn more

Average processing time

Per request.

Processing time
≈ 3.65 s

Input requirements

Images

Formats
JPEG, PNG, WEBP
Maximum resolution
3000 × 3000 px
View all input requirements

Parameters

NameTypeStatusDescription
input_image
fileRequiredImage file or URL to transform.
style
stringRequiredPreset hairstyle ID to apply. Choose one of the supported values listed below.
softwavyk_wavybobcutbobcut_with_bangbangstraightlongbraidedbendy_bobcurly_bobcurlsfrench_bobflippy_bobair_bangair_denser_bangwispy_bangfull_blunt_banglight_blunt_bangchoppy_bangside_swept_bang_leftside_swept_bang_righthair_part_fixing

Responses

Hairstyle generated successfullySingleImageResponse

FieldTypeDescription
createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
curl -X POST "https://api.snapedit.app/v1/images/hairstyle" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "style=soft"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapedit.app/outputs/abc123.png"
    }
  ]
}

Examples (1 example)

Parameters

style: bobcut

Input

Input 1

Output

Output