faceswap

Swap faces in videos using the HeyGen workflows API with polling-based status tracking.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill faceswap-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faceswap
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/faceswap
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill faceswap-zamansepeti43

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually editing a face into a video requires specialized VFX skills and hours of frame-by-frame work. This Skill automates face swapping by calling the HeyGen API, so you can replace a face in any video with a face from a source image using a single API workflow. ## Core Features & Use Cases - AI Face Swap Execution: Submit a face swap job via HeyGen's /v1/workflows/executions endpoint with a source face image URL and a target video URL. - Status Polling: Poll the execution endpoint every 10 seconds until the job completes, then retrieve the output video URL. - Workflow Chaining: Generate an avatar video first, then swap in a custom face for personalized video content. - Use Case: A marketing team wants to personalize a product demo video for different spokespeople. They generate one base avatar video, then swap in each person's face from a headshot photo to produce customized versions. ## Quick Start Swap the face from my headshot photo into the product demo video using the HeyGen API and give me the final video URL.

Frequently Asked Questions about faceswap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I swap a face in a video with the HeyGen API?

Send a POST request to https://api.heygen.com/v1/workflows/executions with workflow_type set to FaceswapNode, plus input.source_image_url and input.target_video_url. Then poll GET /v1/workflows/executions/{id} until the status is completed and read the output video_url.

How to swap a face into an AI avatar video?

First generate the avatar video with the AvatarInferenceNode workflow and wait for it to complete. Then pass the resulting video URL as target_video_url to a FaceswapNode execution along with your custom face image URL.

What image works best as the source face for face swapping?

Use a clear, front-facing photo containing exactly one face with good lighting and high resolution. The source image must be accessible via a public URL, and higher resolution face photos produce better swap results.

How long does HeyGen face swap processing take?

Face swapping is GPU-intensive and typically takes 1-3 minutes. Poll the execution status endpoint every 10 seconds, and set a generous timeout such as 600 seconds to avoid premature failures.

Why did my face swap execution fail or time out?

Failures commonly occur when the source image contains multiple faces, the URLs are not publicly accessible, or the API key is missing or invalid. Check the status response for failed or not_found states and verify the HEYGEN_API_KEY header.