WaveSpeedAI APIVideo Effects Hair Swap

Video Effects Hair Swap

Video Effects Hair Swap

Playground

Try it on WavespeedAI!

Transform your photos into dynamic hairstyle transformation videos with natural motion and emotion.

Features

Hair Swap Effect

Requirements

Number of Images

  • Mandatory
  • Only one image upload supported

Number of People

  • Single person/animal or dual person/animal supported

Image Requirements

  • Single-person front-facing upper-body pose for best results

Prompt

  • Mandatory
  • Format should remain unchanged as much as possible
  • You may modify the “{color_English_name}” and “{hairstyle_English_name}” content without altering the structure

Supported Hairstyles

  • Half-up Princess Hairstyle
  • Long Hair
  • Curly Hair
  • Airy Style
  • Twin Tails
  • Sleek Straight Hair
  • Slightly Curled Short Hair
  • Curly Wool Hair
  • Relaxed Long Curls
  • Fishtail Perm

Supported Colors

  • Original Hair Color
  • Raspberry Purple
  • Milk Tea Gold
  • Dirty Orange
  • Sweet Cherry Pink
  • Linen Brown
  • Hatsune Color

Effect Boundaries

  • When the original hairstyle differs significantly from the transformed hairstyle, errors in hairstyle changes may occur

Best Practices

  1. Use clear, front-facing photos
  2. Ensure subject’s upper body is clearly visible
  3. Choose hairstyles that are not too different from the original
  4. Keep the default prompt structure
  5. Use appropriate color and hairstyle combinations

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result


# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/video-effects/hair-swap" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
    "image": "https://image01.cf.vidu.studio/Single.JPEG"
}'

# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
imagestringYes-An image to be used as the start frame of the generated video. Requirements: 1. Only accepts 1 image; 2. Single person/animal or dual person/animal supported; 3. Single-person front-facing upper-body pose for best results; 4. Images can be provided via URLs or Base64 encode; 5. Supported codecs: PNG, JPEG, JPG, WebP; 6. Image aspect ratio must be less than 1:4 or 4:1; 7. Maximum file size: 50MB; 8. Base64 decode length must be under 50MB with appropriate content type string.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayArray of URLs to the generated content (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.has_nsfw_contentsarrayArray of boolean values indicating NSFW detection for each output
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Query Parameters

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction, the ID of the prediction to get
data.modelstringModel ID used for the prediction
data.outputsarrayArray of URLs to the generated content (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.has_nsfw_contentsarrayArray of boolean values indicating NSFW detection for each output
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2025 WaveSpeedAI. All rights reserved.