Install
openclaw skills install faceswapAI Face Swap - Swap face in video using verging.ai API. Supports local video files, YouTube/Bilibili URLs, local and remote face images. Auto-download, trimming, real-time progress.
openclaw skills install faceswapYou are a CLI assistant for AI face swap via verging.ai.
/faceswap --video <video file or URL> --face <face image or URL> [options]
| Option | Short | Description | Default |
|---|---|---|---|
| --video | -v | Video file path or URL (YouTube/Bilibili) | Required |
| --face | -f | Face image file path or URL | Required |
| --start | -s | Start time in seconds | 0 |
| --end | -e | End time in seconds | Video end (max 30s total) |
| --hd | HD mode (3 credits/sec) | false (1 credit/sec) | |
| --api-key | -k | API Key | $VERGING_API_KEY |
| --output | -o | Save path for result | Current directory |
| --download | -d | Auto download result | false |
Recommended: Authorization: ApiKey <your_key>
# ✅ Recommended (canonical form)
curl -H "Authorization: ApiKey vrg_sk_your_key_here" https://verging.ai/api/v1/auth/me
# ✅ Also works (Bearer with API key is supported)
curl -H "Authorization: Bearer vrg_sk_your_key_here" https://verging.ai/api/v1/auth/me
Get your API key: https://verging.ai → Login → Avatar → API Keys
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
https://verging.ai/api/v1/auth/me
Response: {"email":"...","name":"...","credits":100}
# ⚠️ MUST use -F (multipart form-data), NOT -d (JSON)
curl -X POST https://verging.ai/api/v1/upload-video \
-H "Authorization: ApiKey $VERGING_API_KEY" \
-F "video_file_name=trimmed.mp4" \
-F "job_type=face-swap"
Response:
{
"code": 100000,
"result": {
"url": "https://...r2.cloudflarestorage.com/...?X-Amz-...",
"public_url": "https://img.panpan8.com/face-swap/2026-05-31/xxx.mp4"
}
}
curl -X PUT -T /tmp/verging-faceswap/trimmed.mp4 \
-H "Content-Type: video/mp4" \
"<presigned_url_from_step_2>"
# ⚠️ swap_image is a FILE upload (@path) — the server uploads it to R2 internally
# ⚠️ You do NOT need to separately upload the face image via /upload-video
curl -X POST https://verging.ai/api/v1/faceswap/create-job \
-H "Authorization: ApiKey $VERGING_API_KEY" \
-F "swap_image=@/tmp/verging-faceswap/face.jpg" \
-F "file_name=video.mp4" \
-F "target_video_url=<video_public_url_from_step_2>" \
-F "user_video_duration=30" \
-F "is_hd=false"
Response: {"code":10000,"result":{"job_id":295,...}}
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
"https://verging.ai/api/v1/faceswap/jobs?job_ids=295"
Response: [{"id":295,"status":"COMPLETED","progress":100,"result_url":"https://..."}]
yt-dlp "URL" -o /tmp/verging-faceswap/input.mp4curl -L -o /tmp/verging-faceswap/face.jpg "URL"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video.mp4ffmpeg -i input.mp4 -ss <start> -to <end> -c:v libx264 -c:a aac /tmp/verging-faceswap/trimmed.mp4
swap_image=@path, no separate upload needed)Authorization: ApiKey <key> (recommended) — Bearer <key> also worksswap_image=@path — no separate upload step/upload-video uses Form Data (-F) — NOT JSON (-d)/tmp/verging-faceswap/ — create with mkdir -p| Mode | Cost |
|---|---|
| Normal | 1 credit/second |
| HD | 3 credits/second |
export VERGING_API_KEY="your_key"/tmp/verging-faceswap/ — clean up after use