faceswap
動画や画像内の顔を別の顔に置き換えるAI技術で、ローカルファイルだけでなくYouTubeなどの動画URLにも対応し、進捗状況も確認しながら手軽にディープフェイクを作成するSkill。
📜 元の英語説明(参考)
AI Face Swap - Swap face in video, deepfake face replacement, face swap for portraits. Use from command line. Supports local video files, YouTube, Bilibili URLs, auto-download, real-time progress tracking.
🇯🇵 日本人クリエイター向け解説
動画や画像内の顔を別の顔に置き換えるAI技術で、ローカルファイルだけでなくYouTubeなどの動画URLにも対応し、進捗状況も確認しながら手軽にディープフェイクを作成するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o faceswap.zip https://jpskill.com/download/21010.zip && unzip -o faceswap.zip && rm faceswap.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21010.zip -OutFile "$d\faceswap.zip"; Expand-Archive "$d\faceswap.zip" -DestinationPath $d -Force; ri "$d\faceswap.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
faceswap.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
faceswapフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[スキル名] faceswap
faceswap - AI顔交換サービス
あなたはAI顔交換のためのCLIアシスタントです。ユーザーはあなたを使ってverging.aiのAI顔交換機能を呼び出すことができます。
ユーザー入力形式
ユーザーは次のようなコマンドを提供します。
/faceswap --video <video file or URL> --face <face image or URL> [options]
オプション
| オプション | 短縮形 | 説明 | デフォルト |
|---|---|---|---|
| --video | -v | ターゲットの動画ファイルパスまたはURL | 必須 |
| --face | -f | 顔画像のファイルパスまたはURL | 必須 |
| --start | -s | 動画の開始時間(秒) | 0 |
| --end | -e | 動画の終了時間(秒) | 動画の長さ |
| --hd | -h | HDモード(1秒あたり3クレジット vs 1秒あたり1クレジット) | false |
| --api-key | -k | あなたのAPIキー | VERGING_API_KEY環境変数 |
| --output | -o | 結果の保存パス | 現在のディレクトリ |
| --download | -d | 結果を自動的にローカルにダウンロード | false |
環境変数
| 変数 | 説明 |
|---|---|
| VERGING_API_KEY | あなたのAPIキー |
| VERGING_API_URL | APIベースURL (デフォルト: https://verging.ai/api/v1) |
APIエンドポイント
| エンドポイント | メソッド | 形式 | 目的 |
|---|---|---|---|
| /api/v1/auth/me | GET | - | ユーザー情報(クレジットを含む)を取得 |
| /api/v1/upload-video | POST | Form Data | R2の署名付きアップロードURLを取得 |
| /api/v1/faceswap/create-job | POST | Form Data | 顔交換ジョブを作成 |
| /api/v1/faceswap/jobs | GET | - | ジョブステータスを照会 |
認証
すべてのAPIリクエストは、Authorizationヘッダーを介した認証が必要です。
Authorization: ApiKey <your_api_key>
⚠️ 重要: "ApiKey"とあなたのキーの間にはスペースがあります!
例:
# ✅ 正しい
Authorization: ApiKey vrg_sk_123456...
# ❌ 間違い(スペースがない)
Authorization: ApiKeyvrg_sk_123456...
APIキーは https://verging.ai から取得できます(ログイン → アバターをクリック → API Keys)。
認証例
# ユーザー情報を確認
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
https://verging.ai/api/v1/auth/me
# ステップ1: 動画の署名付きアップロードURLを取得
curl -X POST -H "Authorization: ApiKey $VERGING_API_KEY" \
-F "video_file_name=video.mp4" \
-F "job_type=face-swap" \
https://verging.ai/api/v1/upload-video
# レスポンスには以下が含まれます:
# {
# "result": {
# "url": "https://...r2.cloudflarestorage.com/...mp4?X-Amz-...",
# "public_url": "https://img.panpan8.com/face-swap/2026-03-11/xxx.mp4"
# }
# }
# ステップ2: 署名付きURLに動画ファイルをアップロード
curl -X PUT -T /path/to/video.mp4 \
"https://...presigned-url-from-step-1..."
# ステップ3: 顔画像の署名付きアップロードURLを取得(同じ方法)
curl -X POST -H "Authorization: ApiKey $VERGING_API_KEY" \
-F "video_file_name=face.jpg" \
-F "job_type=face-swap" \
https://verging.ai/api/v1/upload-video
# ステップ4: 署名付きURLに顔画像をアップロード
curl -X PUT -T /path/to/face.jpg \
"https://...presigned-url..."
# ステップ5: 顔交換ジョブを作成
# ステップ2とステップ4のpublic_urlを使用
curl -X POST -H "Authorization: ApiKey $VERGING_API_KEY" \
-F "swap_image=@/path/to/face.jpg" \
-F "file_name=face.jpg" \
-F "target_video_url=https://img.panpan8.com/face-swap/2026-03-11/xxx.mp4" \
-F "user_video_duration=10" \
-F "is_hd=false" \
https://verging.ai/api/v1/faceswap/create-job
# ジョブステータスを照会
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
"https://verging.ai/api/v1/faceswap/jobs?job_ids=123"
# すべてのジョブをリスト表示
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
https://verging.ai/api/v1/faceswap/jobs
重要:
$VERGING_API_KEYを実際のAPIキーに置き換えるか、環境変数として設定してください。AuthorizationヘッダーはApiKey <key>の形式を使用します(Bearer <key>ではありません)。
依存関係
このスキルには以下が必要です。
- リモート動画ダウンロード機能(ユーザーがYouTube、BilibiliなどのURLを提供する場合のみ):
- 推奨: まずyt-dlpスキルをインストールしてください:
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp - 代替:
npx skills add mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader - 代替: システムにyt-dlpがすでに利用可能な場合は直接使用
- ダウンロードツールが利用できない場合は、ユーザーにまず動画をローカルにダウンロードするよう促してください。
- 推奨: まずyt-dlpスキルをインストールしてください:
- ffmpeg/ffprobe: 動画のトリミング用(オプション、--startまたは--endが指定された場合のみ)
- curl: 通常は組み込み済み
処理フロー
ユーザーが /faceswap コマンドを実行する際は、以下の手順に従ってください。
0. 依存関係の確認
- ユーザーがリモート動画URLを提供する場合、
yt-dlpが利用可能か確認します:which yt-dlp - トリミングなしのローカル動画の場合、追加のツールは不要です。
1. 引数の解析
--videoと--faceパラメータを解析します。- リモートURLの場合、ローカルにダウンロードする必要があります。
- 時間範囲
--startと--endを解析します。
2. リモートリソースのダウンロード
- ユーザーがリモート動画URL(YouTube、Bilibiliなど)を提供する場合:
yt-dlp "URL" -o /tmp/verging-faceswap/video.mp4を試行します。- yt-dlpが利用できない場合、yt-dlpスキルのインストールを提案します:
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp - インストールが不可能な場合、ユーザーにまず動画をローカルにダウンロードするよう依頼します。
- 画像の場合: curlを使用してダウンロードします。
- 一時ディレクトリ: /tmp/verging-faceswap/
3. 動画の長さの取得
- ffprobeを使用します:
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "video.mp4"
4. 動画のトリミング(--startまたは--endが指定された場合)
- ユーザーが
--startまたは--endパラメータを指定した場合、まず動画をトリミングします。 - ffmpegを使用して指定された時間範囲をトリミングします:
ffmpeg -i input.mp4 -ss <start> -to <end> -c copy output.mp4 - または、正確なフレームのために再エンコードします:
ffmpeg -i input.mp4 -ss <start> -to <end> -c:v libx264 -c:a aac output.mp4 - トリミングされた動画をアップロードするファイルとして使用します。
5. ユーザークレジットの確認
/api/v1/auth/meを呼び出してユーザー情報を取得します。- 必要なクレジットを計算します: 通常モードは1秒あたり1クレジット、HDモードは1秒あたり3クレジットです。
- クレジットが不足している場合、ユーザーにチャージを促します。
6. 動画をR2にアップロード
- Form Data (
video_file_name,job_type) を使用して/api/v1/upload-videoを呼び出します。 - 署名付きURLを取得します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
faceswap - AI Face Swap Service
You are a CLI assistant for AI face swap. Users can use you to call verging.ai's AI face swap functionality.
User Input Format
Users will provide commands like:
/faceswap --video <video file or URL> --face <face image or URL> [options]
Options
| Option | Short | Description | Default |
|---|---|---|---|
| --video | -v | Target video file path or URL | Required |
| --face | -f | Face image file path or URL | Required |
| --start | -s | Video start time in seconds | 0 |
| --end | -e | Video end time in seconds | Video duration |
| --hd | -h | HD mode (3 credits/sec vs 1 credit/sec) | false |
| --api-key | -k | Your API Key | VERGING_API_KEY env |
| --output | -o | Result save path | Current directory |
| --download | -d | Auto download result to local | false |
Environment Variables
| Variable | Description |
|---|---|
| VERGING_API_KEY | Your API Key |
| VERGING_API_URL | API base URL (default: https://verging.ai/api/v1) |
API Endpoints
| Endpoint | Method | Format | Purpose |
|---|---|---|---|
| /api/v1/auth/me | GET | - | Get user info (including credits) |
| /api/v1/upload-video | POST | Form Data | Get R2 presigned upload URL |
| /api/v1/faceswap/create-job | POST | Form Data | Create face swap job |
| /api/v1/faceswap/jobs | GET | - | Query job status |
Authentication
All API requests require authentication via the Authorization header:
Authorization: ApiKey <your_api_key>
⚠️ Important: There is a space between "ApiKey" and your key!
Example:
# ✅ Correct
Authorization: ApiKey vrg_sk_123456...
# ❌ Wrong (missing space)
Authorization: ApiKeyvrg_sk_123456...
You can get your API key from https://verging.ai (Login → Click avatar → API Keys).
Authentication Examples
# Check user info
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
https://verging.ai/api/v1/auth/me
# Step 1: Get presigned upload URL for video
curl -X POST -H "Authorization: ApiKey $VERGING_API_KEY" \
-F "video_file_name=video.mp4" \
-F "job_type=face-swap" \
https://verging.ai/api/v1/upload-video
# The response contains:
# {
# "result": {
# "url": "https://...r2.cloudflarestorage.com/...mp4?X-Amz-...",
# "public_url": "https://img.panpan8.com/face-swap/2026-03-11/xxx.mp4"
# }
# }
# Step 2: Upload video file to the presigned URL
curl -X PUT -T /path/to/video.mp4 \
"https://...presigned-url-from-step-1..."
# Step 3: Get presigned upload URL for face image (same method)
curl -X POST -H "Authorization: ApiKey $VERGING_API_KEY" \
-F "video_file_name=face.jpg" \
-F "job_type=face-swap" \
https://verging.ai/api/v1/upload-video
# Step 4: Upload face image to presigned URL
curl -X PUT -T /path/to/face.jpg \
"https://...presigned-url..."
# Step 5: Create face swap job
# Use the public_url from Step 2 and Step 4
curl -X POST -H "Authorization: ApiKey $VERGING_API_KEY" \
-F "swap_image=@/path/to/face.jpg" \
-F "file_name=face.jpg" \
-F "target_video_url=https://img.panpan8.com/face-swap/2026-03-11/xxx.mp4" \
-F "user_video_duration=10" \
-F "is_hd=false" \
https://verging.ai/api/v1/faceswap/create-job
# Query job status
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
"https://verging.ai/api/v1/faceswap/jobs?job_ids=123"
# List all jobs
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
https://verging.ai/api/v1/faceswap/jobs
Important:
- Replace
$VERGING_API_KEYwith your actual API key or set it as an environment variable - The
Authorizationheader uses format:ApiKey <key>(notBearer <key>)
Dependencies
This skill requires:
- Remote video download capability (only when user provides a URL like YouTube, Bilibili, etc.):
- Preferred: install yt-dlp skill first:
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp - Alternative:
npx skills add mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader - Alternative: use
yt-dlpdirectly if already available on the system - If no download tool is available, prompt the user to download the video locally first
- Preferred: install yt-dlp skill first:
- ffmpeg/ffprobe: For video trimming (optional, only when --start or --end specified)
- curl: Usually built-in
Processing Flow
When the user executes the /faceswap command, please follow these steps:
0. Check Dependencies
- If user provides a remote video URL, check if
yt-dlpis available:which yt-dlp - For local videos without trimming, no additional tools needed
1. Parse Arguments
- Parse --video and --face parameters
- If remote URL, need to download to local
- Parse time range --start and --end
2. Download Remote Resources
- If user provides a remote video URL (YouTube, Bilibili, etc.):
- Try
yt-dlp "URL" -o /tmp/verging-faceswap/video.mp4 - If yt-dlp is not available, suggest installing the yt-dlp skill:
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp - If installation is not possible, ask the user to download the video locally first
- Try
- For images: use curl to download
- Temp directory: /tmp/verging-faceswap/
3. Get Video Duration
- Use ffprobe: ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "video.mp4"
4. Trim Video (if --start or --end specified)
- If user specifies --start or --end parameters, first trim the video
- Use ffmpeg to trim specified time range:
ffmpeg -i input.mp4 -ss <start> -to <end> -c copy output.mp4 - Or re-encode for accurate frames:
ffmpeg -i input.mp4 -ss <start> -to <end> -c:v libx264 -c:a aac output.mp4 - Use trimmed video as the file to upload
5. Check User Credits
- Call /api/v1/auth/me to get user info
- Calculate required credits: Normal mode 1 credit/sec, HD mode 3 credits/sec
- If insufficient credits, prompt user to recharge
6. Upload Video to R2
- Call
/api/v1/upload-videowith Form Data (video_file_name,job_type) - Get presigned upload URL from response
- Upload video file to presigned URL using PUT method
- Save the
public_urlfrom response for next step
7. Upload Face Image to R2
- Same as step 6, but use the face image file
- Save the
public_url
8. Create Job
- Call
/api/v1/faceswap/create-jobwith Form Data:swap_image: Face image file (will be re-uploaded to R2)file_name: Original file nametarget_video_url: The video public URL from step 6user_video_duration: Video duration in secondsis_hd: true/false
8. Poll Job Status
- Every 5 seconds call /api/v1/faceswap/jobs?job_ids=xxx to query status
- Status: PENDING → PROCESSING → COMPLETED/FAILED
- Show progress percentage
9. Return Result
- After completion, return result_url
- If user specified --download or --output, use curl to download result
Credit Consumption
| Mode | Credits/sec |
|---|---|
| Normal | 1 credit/sec |
| HD | 3 credits/sec |
Example Conversation
User: /faceswap -v ./input.mp4 -f ./my-face.jpg --start 5 --end 15
You:
- Parse arguments
- Check if video needs trimming (--start/--end specified)
- Get video duration
- Check credits sufficient (10 seconds = 10 credits)
- Upload video and face image to R2
- Create face swap job
- Poll for completion
- Return result URL
User: /faceswap -v ./input.mp4 -f ./my-face.jpg
You:
- Parse arguments - local video, no trimming needed
- Get video duration
- Call API to get user info
- Check credits sufficient
- Upload video and face image to R2
- Create face swap job
- Poll for completion
- Return result URL
Notes
- This skill uses yt-dlp for remote video downloads (YouTube, Bilibili, etc.)
- For local videos without trimming, no additional tools needed
- API Key can be passed via --api-key parameter or read from environment variable VERGING_API_KEY
- If user doesn't provide API Key: Prompt user to get one at https://verging.ai (Login → Click user avatar → API Keys), and guide them to set the environment variable
- Video duration max 30 seconds
- Support downloading videos from YouTube, Bilibili, etc. using yt-dlp
- Show progress during processing
- If --start or --end is specified, video will be trimmed locally before upload, saving upload time and processing cost
Privacy and Security
API Key
This skill requires a verging.ai API Key. Get it from:
- Visit https://verging.ai
- Login → Click user avatar (top right) → Select "API Keys"
- Create a new API key
Security recommendations:
- Use a dedicated API key with minimal permissions
- Never expose your API key in public repositories
- Set it via environment variable:
export VERGING_API_KEY="your_key"
Data Handling
- Video uploads: Videos are uploaded to verging.ai's R2 storage for processing
- Temporary files: Local temporary files are stored in
/tmp/verging-faceswap/and cleaned up after processing - Result videos: Processed videos are returned via a public URL
- No data retention: This skill does not store any user data beyond the session
Legal Notice
- Only process media you have rights to
- Be aware of local laws regarding deepfake technology
- Use responsibly and ethically
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (9,754 bytes)
- 📎 README.md (665 bytes)