Hairstyle changer Pro
开发环境
开发环境
POST
/api/portrait/effects/hairstyle-editor-pro
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/portrait/effects/hairstyle-editor-pro' \
--header 'ailabapi-api-key;' \
--form 'task_type="async"' \
--form 'image=@""' \
--form 'hair_style=""'
响应示例响应示例
{
"error_code": 0,
"error_code_str": "",
"error_msg": "",
"request_id": "",
"log_id": "",
"task_type": "",
"task_id": ""
}
请求参数
Header 参数
ailabapi-api-key
string
必需
Body 参数multipart/form-data
task_type
string
必需
示例值:
async
image
file
必需
hair_style
string
必需
color
string
Color.
image_size
string
可选
mask
file
可选
bangs
string
可选
mode
string
可选
Generation mode. Please enable this parameter based on the original hairstyle.
1
: Head-only mode. More suitable for short hair. 2
: Full-image generation mode. More suitable for long hair; use this mode when the original image features shoulder-length or longer hair. 2
.reference
string
可选