Image Head Swap

Image Head Swap

Playground

Try it on WavespeedAI!

Instant online AI head & face swap for photos with no watermark, delivering realistic, shareable results in seconds. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

WaveSpeedAI Image Head Swap

WaveSpeedAI Image Head Swap is an advanced AI model for replacing the entire head (face + hair + outline) of a person in a static image using a reference portrait. It keeps body, pose and background intact while rebuilding a new, realistic head that matches the scene’s lighting and perspective.


🎬 What this model does

  • Replaces the full head region of the subject (face, hair, silhouette, accessories)
  • Preserves body pose, clothing, background and general composition
  • Adapts the new head to scene lighting, color tone and camera angle
  • Produces clean, watermark-free outputs ready for editing or publication

⚙️ Why it looks realistic

  • Full-head geometry replacement Swaps the whole head contour instead of only facial features, avoiding mismatched hairlines or skull shape.

  • Pose and expression preservation Uses the base image to keep head angle, gaze direction and expression consistent with the original shot.

  • Lighting and color matching Automatically adjusts skin tone, shadows and highlights so the new head sits naturally in the scene.

  • High-resolution blending Seamless edges around neck, hair and accessories, minimizing visible artifacts.


🧾 Inputs and Parameters

Required fields:

  • image: Base image whose body, background and composition you want to keep.

  • face_image: Reference portrait that defines the new identity/head to be inserted.

Other options:

  • output_format: Choose the final image format:

    • jpeg
    • png
    • webp

💰 Pricing

OperationPrice (USD)
Full head swap (per image run)$0.025

💡 Best Use Cases

  • Casting and concept design Test different actors’ heads on the same body or costume for film, TV or advertising pitches.

  • Privacy and anonymization Replace real heads with synthetic or authorized identities while keeping scenes and actions intact.

  • Photo and key art exploration Quickly iterate on hero posters, thumbnails and cover images with different looks.

  • Social media and creator workflows Create stylized or character-based versions of yourself while preserving your original photos’ composition.


📎 Tips and Notes

  • Use clear, reasonably high-resolution portraits for both image and face_image.
  • Try to keep camera angle and approximate lighting similar between the two inputs for best results.
  • Avoid heavily occluded faces or extreme motion blur in the base image.
  • Always ensure you have the legal right and consent to use all images and likenesses involved in your edits.

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/wavespeed-ai/image-head-swap" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
    "output_format": "jpeg",
    "enable_base64_output": false,
    "enable_sync_mode": false
}'

# 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-The image that contains the face to be replaced.
face_imagestringYes--The face image as reference.
output_formatstringNojpegjpeg, png, webpThe format of the output image.
enable_base64_outputbooleanNofalse-If enabled, the output will be encoded into a BASE64 string instead of a URL. This property is only available through the API.
enable_sync_modebooleanNofalse-If set to true, the function will wait for the result to be generated and uploaded before returning the response. It allows you to get the result directly in the response. This property is only available through the API.

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 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.outputsstringArray 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.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.