AILabTools
  1. Portrait effects
AILabTools
  • 简介
  • AI IMAGE
    • Image Enhancement
      • Image Dehaze
      • Image Upscaler
      • Stretched Image Restoration
      • Image sharpness enhancement
      • Image contrast enhancement
      • Image color enhancement
    • Image Effects
      • AI Cartoon Generator
      • AI Photo Colorize
      • Photo to Painting
      • Style transfer
      • Color Migration
      • HD color migration
      • Image Micro Motion
    • Image Editing
      • AI Image cropping
      • Intelligent Composition
      • Photo retouch
      • Image Invisible Picture Watermark
      • Image Invisible Text Watermark
      • Image Erasure
    • Image scoring
      • Image composition aesthetics score
      • Image exposure score
    • Querying asynchronous task results
      GET
  • AI BACKGROUND REMOVAL
    • Portrait
      • Human background removal
      • Head Extraction
      • Hairstyle Extraction
    • General
      • Universal Background Removal
      • Food Background Removal
      • Product background removal
      • Costume background removal
  • AI PORTRAIT
    • Portrait effects
      • Cartoon yourself
        POST
      • Merge Portraits
        POST
      • Smart Beauty
        POST
      • AI Skin Beauty
        POST
      • AI Face Slimming
        POST
      • Face Beauty
        POST
      • AI Makeup
        POST
      • Face Filters
        POST
      • Facial aesthetics
        POST
      • Change facial expressions
        POST
      • Hairstyle changer
        POST
      • Hairstyle changer Pro
        POST
      • Bring photos to life
        POST
      • Photo to 3d slow-motion
        POST
      • Face Blur
        POST
      • Age & Gender swap
        POST
      • AI Face Enhancer
        POST
      • Lips Color Changer
        POST
    • Portrait Analysis
      • Face Key Points
      • Detect Skin Disease
      • Skin analyze
      • Skin analyze Advanced
      • Skin analyze Pro
      • Face Analyzer
  • AI COMMON
    • Querying asynchronous task results
    • Querying credits
  1. Portrait effects

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 
必需
Application API KEY.
Body 参数multipart/form-data
task_type
string 
必需
Task Type.
示例值:
async
image
file 
必需
hair_style
string 
必需
Hairstyle.
color
string 
Color.
可选
image_size
string 
可选
Returns the number of images.
mask
file 
可选
Masked Image. If left blank, a masked image will be generated automatically. The white portion of the masked image is the editable area, while the black portion remains unchanged. For example, by using the white area of the mask to cover a person's face, the face will remain unaltered, and other parts will be generated automatically.
bangs
string 
可选
Add bangs to the resulting image. This parameter only applies to hairstyles with bangs. If the hairstyle does not have bangs, please do not enable this parameter, as it may result in a less satisfactory generation for the forehead area.
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.
  • If the original image depicts shoulder-length or longer hair, it is necessary to use mode 2.

  • reference
    string 
    可选
    Reference Original Hairstyle. Enabling this parameter will make changes to the hairstyle based on the original hairstyle, resulting in minor alterations. Please do not enable this parameter if changing from short hair to long hair or from long hair to short hair.

    返回响应

    ⚪0Hairstyle changer Pro
    application/json
    Body
    error_code
    integer 
    必需
    error_code_str
    string 
    必需
    error_msg
    string 
    必需
    request_id
    string 
    必需
    log_id
    string 
    必需
    task_type
    string 
    必需
    task_id
    string 
    必需
    上一页
    Hairstyle changer
    下一页
    Bring photos to life
    Built with