Hairstyle changer
开发环境
开发环境
POST
/api/portrait/effects/hairstyle-editor
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/portrait/effects/hairstyle-editor' \
--header 'ailabapi-api-key;' \
--form 'image_target=@""' \
--form 'hair_type=""'
响应示例响应示例
{
"error_code": 0,
"error_code_str": "",
"error_msg": "",
"request_id": "",
"log_id": "",
"data": {
"image": ""
}
}
请求参数
Header 参数
ailabapi-api-key
string
必需
Body 参数multipart/form-data
image_target
file
必需
hair_type
string
必需
101
: Bangs (default)201
: Long hair301
: Bangs with long hair401
: Medium hair increase402
: Light hair increase403
: Heavy hair increase502
: Light curling503
: Heavy curling603
: Short hair (requires input size <
2048x2048; if the input is larger than 2048x2048, the output image will be resized to a maximum of 2048 on the longest side.)801
: Blonde901
: Straight hair1001
: Oil-free hair (slight effect, recommended for images with noticeable issues)1101
: Hairline fill (slight effect, recommended for images with noticeable issues of a high hairline)1201
: Smooth hair (slight effect, recommended for images with a large hairstyle area)1301
: Fill hair gap (slight effect, fills the scalp part in the hair area, recommended for images with noticeable issues)