faceswap
하는 일
이 스킬은 원본 이미지의 얼굴로 영상 속 얼굴을 바꿉니다. 다른 얼굴을 넣은 개인화된 영상이 필요한 영상 제작자를 위한 스킬입니다.
사용하는 경우
- ✓기존 영상의 얼굴을 사진 속 얼굴로 바꾸고 싶을 때.
- ✓특정 사람의 얼굴로 개인화된 영상을 만들고 싶을 때.
- ✓원본 이미지와 대상 영상이 이미 준비되어 있을 때.
스킬 링크
https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/faceswap/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 영상의 발표자 얼굴을 이 사진 속 얼굴로 바꿔 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 사진과 영상 링크를 HeyGen 얼굴 교체 워크플로에 보내고, 몇 초마다 진행 상황을 확인합니다. 작업이 끝나면 새 영상 링크를 반환합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Face Swap (HeyGen API)
Swap a face from a source image into a target video using GPU-accelerated AI processing. The source image provides the face to swap in, and the target video receives the new face.
Authentication
All requests require the X-Api-Key header. Set the HEYGEN_API_KEY environment variable.
curl -X POST "https://api.heygen.com/v1/workflows/executions" \
-H "X-Api-Key: $HEYGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow_type": "FaceswapNode", "input": {"source_image_url": "https://example.com/face.jpg", "target_video_url": "https://example.com/video.mp4"}}'
Default Workflow
- Call
POST /v1/workflows/executionswithworkflow_type: "FaceswapNode", a source face image, and a target video - Receive a
execution_idin the response - Poll
GET /v1/workflows/executions/{id}every 10 seconds until status iscompleted - Use the returned
video_urlfrom the output
Execute Face Swap
Endpoint
POST https://api.heygen.com/v1/workflows/executions
Request Fields
| Field | Type | Req | Description |
|---|---|---|---|
workflow_type |
string | Y | Must be "FaceswapNode" |
input.source_image_url |
string | Y | URL of the face image to swap in |
input.target_video_url |
string | Y | URL of the video to apply the face swap to |
curl
curl -X POST "https://api.heygen.com/v1/workflows/executions" \
-H "X-Api-Key: $HEYGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_type": "FaceswapNode",
"input": {
"source_image_url": "https://example.com/face-photo.jpg",
"target_video_url": "https://example.com/original-video.mp4"
}
}'
TypeScript
interface FaceswapInput {
source_image_url: string;
target_video_url: string;
}
interface ExecuteResponse {
data: {
execution_id: string;
status: "submitted";
};
}
async function faceswap(input: FaceswapInput): Promise<string> {
const response = await fetch("https://api.heygen.com/v1/workflows/executions", {
method: "POST",
headers: {
"X-Api-Key": process.env.HEYGEN_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
workflow_type: "FaceswapNode",
input,
}),
});
const json: ExecuteResponse = await response.json();
return json.data.execution_id;
}
Python
import requests
import os
def faceswap(source_image_url: str, target_video_url: str) -> str:
payload = {
"workflow_type": "FaceswapNode",
"input": {
"source_image_url": source_image_url,
"target_video_url": target_video_url,
},
}
response = requests.post(
"https://api.heygen.com/v1/workflows/executions",
headers={
"X-Api-Key": os.environ["HEYGEN_API_KEY"],
"Content-Type": "application/json",
},
json=payload,
)
data = response.json()
return data["data"]["execution_id"]
Response Format
{
"data": {
"execution_id": "node-gw-f1s2w3p4",
"status": "submitted"
}
}
Check Status
Endpoint
GET https://api.heygen.com/v1/workflows/executions/{execution_id}
curl
curl -X GET "https://api.heygen.com/v1/workflows/executions/node-gw-f1s2w3p4" \
-H "X-Api-Key: $HEYGEN_API_KEY"
Response Format (Completed)
{
"data": {
"execution_id": "node-gw-f1s2w3p4",
"status": "completed",
"output": {
"video_url": "https://resource.heygen.ai/faceswap/output.mp4"
}
}
}
Polling for Completion
async function faceswapAndWait(
input: FaceswapInput,
maxWaitMs = 600000,
pollIntervalMs = 10000
): Promise<string> {
const executionId = await faceswap(input);
console.log(`Submitted face swap: ${executionId}`);
const startTime = Date.now();
while (Date.now() - startTime < maxWaitMs) {
const response = await fetch(
`https://api.heygen.com/v1/workflows/executions/${executionId}`,
{ headers: { "X-Api-Key": process.env.HEYGEN_API_KEY! } }
);
const { data } = await response.json();
switch (data.status) {
case "completed":
return data.output.video_url;
case "failed":
throw new Error(data.error?.message || "Face swap failed");
case "not_found":
throw new Error("Workflow not found");
default:
await new Promise((r) => setTimeout(r, pollInter
자주 묻는 질문
시작하려면 무엇이 필요한가요?
HEYGEN_API_KEY, 얼굴 사진, 웹 링크로 접근할 수 있는 영상이 필요합니다.
시간이 얼마나 걸리나요?
작업이 끝날 때까지 약 10초마다 상태를 확인합니다.
원본은 공개 링크여야 하나요?
네. 요청에서는 이미지와 영상 모두 웹 주소를 사용합니다.
상세 정보
작성자의 원본 설명
Swap faces in a video using AI via the HeyGen API. Use when: (1) Replacing a face in a video with another face, (2) Face swapping from a source image onto a target video, (3) Creating personalized videos by swapping in a person's face, (4) Working with HeyGen's /v1/workflows/executions endpoint for face swap processing.
repo: calesthio/OpenMontage
인기도
- GitHub 스타
- 75k
- 순위
- #2653
- 라이선스
- AGPL-3.0
- 업데이트
- 2026. 10. 28.
댓글
- …
이 저장소의 다른 스킬
3d-asset-generation
75k카탈로그, 텍스트·이미지 3D 변환 도구, Blender를 활용해 장면에 쓸 3D 오브젝트를 만드는 방법을 고르도록 돕습니다.
acestep
75k오픈소스 ACE-Step 음악 생성기를 사용해 영상에 쓸 배경 음악, 노래, 징글, 스템을 만들도록 돕습니다.
agents
75kElevenLabs로 고객 응대 봇이나 대화형 음성 캐릭터 같은 음성 AI 에이전트를 만들도록 돕습니다.
ai-video-gen
75k텍스트 설명이나 참고 이미지로 AI 영상 클립을 만들며, 여러 영상 생성 서비스 중에서 고르도록 돕습니다.
비슷한 스킬
taste-application
280k특정 스타일의 영상을 에이전트가 만들도록 돕습니다. 참고 영상의 편집 리듬을 살려 새 장면과 색을 더하고 영상을 편집합니다.
taste-distillation
280k영상을 분석해 스타일 팩을 만들도록 에이전트를 돕습니다. 색, 컷 리듬, 시각 요소를 포함하며 같은 느낌의 새 영상을 만드는 데 재사용할 수 있습니다.
ui-demo
280k에이전트가 완성도 높은 UI 데모 영상을 녹화하도록 돕습니다. 튜토리얼을 만들거나 웹 앱의 작동 방식을 보여 줄 때 유용합니다.