Install
openclaw skills install @wavespeed/wavespeed-face-swapperSwap faces in images and videos using WaveSpeed AI. Supports image face swap and video face swap with multi-face targeting, with automatic lighting and skin tone adaptation. Only for media the user has the right to edit and faces whose owners have consented; refuse impersonation, deception, or sexual content. Use when the user wants to replace a face in an image or video with another face.
openclaw skills install @wavespeed/wavespeed-face-swapperSwap faces in images and videos using WaveSpeed AI, with automatic lighting and skin tone adaptation. Supports targeting specific faces when multiple people are present.
Read Responsible use before running anything. Face swapping edits a real person's likeness; this skill is for consented, lawful, non-deceptive edits only.
Install the open-source CLI once and sign in; the CLI stores the key, so never ask the user to paste an API key into the chat:
npm install -g @wavespeed/cli
wavespeed login # opens https://wavespeed.ai/accesskey and stores the key
wavespeed status # confirms you are signed in
For CI or one-off shells, WAVESPEED_API_KEY in the environment also works.
Prefer MCP tools over shell commands? The same platform is exposed by @wavespeed/mcp (npx -y @wavespeed/mcp; tools search_models, get_model_schema, get_price, upload_file, run_model, get_prediction). It shares the CLI's stored login. Every example below maps one-to-one onto run_model with the same model id and input fields.
# Upload local images to get URLs
OUTPUT_URL=$(wavespeed run wavespeed-ai/image-face-swap \
-i image=@./target-photo.png \
-i face_image=@./reference-face.png \
--json | jq -r '.outputs[0]')
# Upload local files to get URLs
OUTPUT_URL=$(wavespeed run wavespeed-ai/video-face-swap \
-i video=@./video.mp4 \
-i face_image=@./reference-face.png \
--json | jq -r '.outputs[0]')
Existing URLs work as-is:
OUTPUT_URL=$(wavespeed run wavespeed-ai/image-face-swap \
-i image="https://example.com/target-photo.jpg" \
-i face_image="https://example.com/reference-face.jpg" \
--json | jq -r '.outputs[0]')
Model ID: wavespeed-ai/image-face-swap
Replace a face in an image with a reference face.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | string | Yes | -- | URL of the image containing the face to replace |
face_image | string | Yes | -- | URL of the reference face image to swap in |
target_index | integer | No | 0 | Which face to replace (0 = largest face, 1-10 for others) |
output_format | string | No | jpeg | Output format. One of: jpeg, png, webp |
OUTPUT_URL=$(wavespeed run wavespeed-ai/image-face-swap \
-i image=@./group-photo.png \
-i face_image=@./reference-face.png \
-i target_index=0 \
-i output_format="png" \
--json | jq -r '.outputs[0]')
When multiple people are in the image, use target_index to select which face to replace:
# Replace the second-largest face in the image
OUTPUT_URL=$(wavespeed run wavespeed-ai/image-face-swap \
-i image=@./group-photo.png \
-i face_image=@./reference-face.png \
-i target_index=1 \
--json | jq -r '.outputs[0]')
Model ID: wavespeed-ai/video-face-swap
Replace a face in a video with a reference face. Supports videos up to 10 minutes.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
video | string | Yes | -- | URL of the video containing the face to replace. Must be publicly accessible. Max 10 minutes. |
face_image | string | Yes | -- | URL of the reference face image to swap in |
target_index | integer | No | 0 | Which face to replace (0 = largest face, 1-10 for others) |
OUTPUT_URL=$(wavespeed run wavespeed-ai/video-face-swap \
-i video=@./video.mp4 \
-i face_image=@./reference-face.png \
-i target_index=0 \
--json | jq -r '.outputs[0]')
| Operation | Cost |
|---|---|
| Image face swap | $0.01 per image |
| Video face swap | $0.01 per second (minimum $0.05 / 5 seconds) |
Video face swap supports videos up to 10 minutes.
target_index to select specific faces when multiple people are present (0 = largest face)Face swapping manipulates a real person's likeness. Before calling either endpoint, confirm all of the following with the user. If any answer is no or unclear, do not run the model and explain why.
WaveSpeed's Terms of Service prohibit non-consensual and deceptive likeness edits; requests that violate them are refused and accounts may be suspended.
# Inspect the live input schema before running (fields, enums, defaults)
wavespeed run wavespeed-ai/image-face-swap -h
# Quote the price first
wavespeed price wavespeed-ai/image-face-swap -p "..." -i key=value
# Save outputs to disk instead of only printing URLs
wavespeed run wavespeed-ai/image-face-swap -p "..." --json --download "./out/{index}.{ext}"
# Local files: prefix the path with @ and the CLI uploads it and passes the hosted URL
wavespeed run wavespeed-ai/image-face-swap -i <field>=@./local-file.png --json
# Recover a result if the run was interrupted (the id is in the --json output)
wavespeed show <id>
run --json prints { id, model, prompt, outputs: [url, ...], saved: [path, ...], elapsed_ms, raw }. Read outputs[0] for the result URL.
wavespeed login handles auth; if wavespeed status says signed out, ask the user to run it.@: bare paths are passed through untouched and the model will reject them. Only @-prefixed values upload.wavespeed run <model> -h when unsure.