faceswap
Qué hace
Esta skill reemplaza una cara en un video por una cara de una imagen de origen. Es para creadores de video que necesitan videos personalizados con otro rostro.
Cuándo usarla
- ✓Cuando quieres reemplazar una cara en un video existente con la de una foto.
- ✓Cuando quieres hacer videos personalizados con el rostro de una persona específica.
- ✓Cuando ya tienes una imagen de origen y un video de destino listos para usar.
Link de la skill
https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/faceswap/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Cambia la cara del presentador de este video por la cara de esta foto.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Tu agente envía la foto y el enlace del video al flujo de intercambio de rostros de HeyGen, revisa el progreso cada pocos segundos y devuelve el enlace del nuevo video cuando termina.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Qué necesito para empezar?
Necesitas una HEYGEN_API_KEY, una foto del rostro y un video al que se pueda acceder con un enlace web.
¿Cuánto tarda?
Tu agente revisa el estado cada 10 segundos aproximadamente hasta que el trabajo termina.
¿El origen necesita un enlace público?
Sí. La solicitud usa direcciones web tanto para la imagen como para el video.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 75 mil
- Posición en el ranking
- #2653
- Licencia
- AGPL-3.0
- Actualizada
- 28/10/2026
Comentarios
- …
Más skills de este repositorio
3d-asset-generation
75 milAyuda a tu agente a elegir cómo crear objetos 3D para una escena, usando catálogos, herramientas de texto o imagen a 3D, y Blender para el ensamblado final.
acestep
75 milAyuda a tu agente a crear música de fondo, canciones, jingles y stems para un video usando el generador de música abierto ACE-Step.
agents
75 milAyuda a tu agente a construir asistentes de voz con IA usando ElevenLabs, como bots de atención al cliente y personajes de voz interactivos.
ai-video-gen
75 milAyuda a tu agente a generar clips de video con IA a partir de una descripción de texto o una imagen de referencia, eligiendo entre varios servicios.
Skills parecidas
taste-application
280 milAyuda a tu agente a crear vídeos con un estilo concreto: copia el ritmo de edición de una referencia, genera escenas, ajusta colores y une todo con otro material.
taste-distillation
280 milPermite a tu agente analizar vídeos y crear un paquete de estilo con colores, ritmo de corte y elementos visuales reutilizables en nuevos vídeos.
ui-demo
280 milPermite a tu agente grabar vídeos de demostración de interfaces muy pulidos. Es útil para crear tutoriales o mostrar cómo funciona una app web.