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
| Operation | Price (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
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| image | string | Yes | - | The image that contains the face to be replaced. | |
| face_image | string | Yes | - | - | The face image as reference. |
| output_format | string | No | jpeg | jpeg, png, webp | The format of the output image. |
| enable_base64_output | boolean | No | false | - | 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_mode | boolean | No | false | - | 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
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |