agentleFS
awesome-genmediaawesome-genmedia/skills/face-swap/SKILL.md

face-swap

Skill36 starsChanged 7 months agoMITView on GitHub

Swap faces between photos using each::sense AI. Replace faces in target images with faces from source photos while preserving lighting, angle, skin tone, and expression. Powered by kling-face-swap for natural, seamless results. Use for: creative projects, entertainment, memes, virtual try-on, character casting, visual prototyping. Triggers: face swap, swap face, replace face, face replacement, face change, put face on, face transfer, deepfake, face morph

  • Reads credentials
  • Sends data out

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always clarify which image is the source face and which is the target:

    line 109
  2. Distinctive:

    When the target has multiple people, specify the target:

    line 118
  3. Distinctive:

    Do not create deceptive or misleading content

    line 239
  4. Distinctive:

    Do not use for harassment, impersonation, or fraud

    line 240
  5. Distinctive:

    Follow applicable laws and platform policies

    line 242

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Face Swap

Swap faces between photos with natural, seamless results using each::sense — the intelligent AI agent that automatically selects the best model for your request.

Quick Start

Requires an each::labs API key. Get one at eachlabs.ai.

Using curl

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Swap the face from the first image onto the person in the second image. Maintain natural lighting, skin tone matching, and realistic blending."},
              {"type": "image_url", "image_url": {"url": "https://example.com/source-face.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/target-photo.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

Using Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_EACHLABS_API_KEY",
    base_url="https://eachsense-agent.core.eachlabs.run/v1"
)

response = client.chat.completions.create(
    model="eachsense/beta",
    messages=[{"role": "user", "content": "Swap the face from the first image onto the person in the second image. Maintain natural lighting, skin tone matching, and realistic blending."}],
    # Images are included in the message content array above
)

print(response.choices[0].message.content)

With Reference Image

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Use the face from the first image. Place it onto the person in the second image. The third image shows the desired lighting style to match."},
              {"type": "image_url", "image_url": {"url": "https://example.com/face-source.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/body-target.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/lighting-ref.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

Images are sent inside messages using the OpenAI multimodal content format. Maximum 4 images per request. For face swap, you typically need at least 2 images: a source face and a target photo.

Streaming

Set "stream": true for real-time SSE responses, or "stream": false for complete result in a single response. Streaming is useful for showing progress in UIs; non-streaming is simpler for scripts and automation.

Available Models

ModelStrengthsBest For
kling-face-swapHigh-fidelity face replacement, natural blending, lighting adaptationAll face swap use cases

each::sense automatically selects kling-face-swap when face swap is detected in your request.

How It Works

  1. Source image (first URL): Contains the face you want to use
  2. Target image (second URL): Contains the body/scene where the face will be placed
  3. The model extracts facial features from the source and seamlessly blends them onto the target, matching:
    • Lighting direction and intensity
    • Skin tone and texture
    • Head angle and pose
    • Expression adaptation

Image Requirements

RequirementSource FaceTarget Photo
Face visibilityClear, front-facing preferredFace clearly visible
Resolution512px minimum on face512px minimum on face
LightingEven lighting on face helpsAny lighting (model adapts)
ObstructionsNo sunglasses or heavy occlusionPartial occlusion OK
Multiple facesOne clear primary faceSpecify which person if multiple

Prompt Tips

Specify Source and Target Clearly

Always clarify which image is the source face and which is the target:

"Take the face from the first image (the woman with dark hair)
and swap it onto the person in the second image (the man in the suit)."

Handle Multiple People in Target

When the target has multiple people, specify the target:

"Swap the face from image 1 onto the person on the LEFT in image 2.
Do not modify the other person."

Request Quality Adjustments

"Swap faces and ensure skin tone matches perfectly.
Blend the jawline and hairline edges seamlessly.
Match the lighting direction from the target photo."

Examples

Basic Face Swap

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Swap the face from the first image onto the person in the second image. Keep the result natural and photorealistic with smooth edge blending."},
              {"type": "image_url", "image_url": {"url": "https://example.com/my-face.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/magazine-cover.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

Character Casting Visualization

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Place the face from the first image onto the medieval knight character in the second image. Adapt skin tone to match the costume lighting. Keep the helmet and armor unchanged. Result should look like a movie still."},
              {"type": "image_url", "image_url": {"url": "https://example.com/actor-headshot.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/knight-scene.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

Professional Headshot Context

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Take the face from my casual photo (first image) and place it onto the professional business portrait (second image). Match the studio lighting, make the skin tones consistent, and ensure the collar and suit remain untouched."},
              {"type": "image_url", "image_url": {"url": "https://example.com/casual-selfie.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/business-portrait-template.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

Group Photo Edit

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "In the group photo (second image), swap only the face of the person standing in the center wearing the blue shirt. Use the face from the first image. Keep all other people completely unchanged."},
              {"type": "image_url", "image_url": {"url": "https://example.com/replacement-face.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/group-photo.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

Creative / Artistic Swap

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Take the face from the first image and place it onto the Renaissance painting portrait in the second image. Blend the face to match the painting style — oil paint texture, period-appropriate lighting, and slightly warm old-master color palette. The face should look like it was part of the original painting."},
              {"type": "image_url", "image_url": {"url": "https://example.com/modern-face.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/renaissance-portrait.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

Common Pitfalls

  • Images in wrong order: The first URL should be the source face, the second should be the target. Swapping them produces inverted results.
  • Low resolution source faces: Blurry or tiny faces produce blurry swaps. Use the clearest face photo available.
  • Extreme angle mismatches: A front-facing source onto a full-profile target stretches features. Match angles when possible.
  • Heavy occlusion: Sunglasses, masks, or hands covering the source face leave the model guessing about hidden features.
  • Not specifying the target person in multi-person photos causes ambiguity about which face to replace.
  • Expecting video face swap: This skill handles still images. For video, combine with video generation workflows.

Ethical Use

Face swap technology should be used responsibly:

  • Obtain consent before using someone's likeness
  • Do not create deceptive or misleading content
  • Do not use for harassment, impersonation, or fraud
  • Label AI-generated content appropriately
  • Follow applicable laws and platform policies

Related Skills

  • Image Editing — General image editing for touch-ups after swapping
  • Background Removal — Clean up backgrounds after face swap
  • Image Generation — Generate target scenes for face swap
  • Image Upscaling — Enhance resolution after face swap

Documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.