Face Swap Video
Simple HTTP endpoint to generate a face-swapped video.
The Face Swap API lets you generate AI face swap videos with a single HTTP request. Send a source face image, a target video URL, and the desired duration, and our service returns a deepfake-style video face swap URL.
No code face swap video generations
import requests
url = "https://www.face-swap.co/api/generate"
payload = {
"key": "YOUR_API_KEY",
"input_image_url": "https://tinyurl.com/elonmusk-faceswap",
"input_video_url": "https://tinyurl.com/ironman-faceswap",
"duration": 120, # required: 4 | 60 | 120 | 180 (use 4 for trial credits)
"gender": "all", # optional: all | female | male (default: all)
}
r = requests.post(url, json=payload, timeout=60)
r.raise_for_status()
print(r.json())
POST /api/generate
Create a face-swapped video job.
| Parameter | Type | Required | Description |
|---|---|---|---|
key |
string | β | Your API key |
input_image_url |
string | β | Public URL to a face image |
input_video_url |
string | β | Public URL to a target video |
duration |
int | β | Allowed: 4, 60, 120, 180 seconds (use 4 for trial credits) |
gender |
string | β | all | female | male (default: all) |
import requests
url = "https://www.face-swap.co/api/generate"
payload = {
"key": "YOUR_API_KEY",
"input_image_url": "https://tinyurl.com/elonmusk-faceswap",
"input_video_url": "https://tinyurl.com/ironman-faceswap",
"duration": 120, # required: 4|60|120|180 (use 4 for trial credits)
"gender": "all", # optional: all|female|male (default: all)
}
r = requests.post(url, json=payload, timeout=60)
r.raise_for_status()
print(r.json())
GET /api/status/{job_id}
Check the status of a job.
import requests
job_id = "0c1449fc0e764b5ebdfe24a52bd8f8fa"
r = requests.get(f"https://www.face-swap.co/api/status/{job_id}", timeout=30)
r.raise_for_status()
print(r.json())
GET /api/credits/{API_KEY}
View remaining credits for your API key.
import requests
api_key = "YOUR_API_KEY"
r = requests.get(f"https://www.face-swap.co/api/credits/{api_key}", timeout=30)
r.raise_for_status()
print(r.json())
GET /api/jobs/{API_KEY}
List recent jobs for your API key.
import requests
api_key = "YOUR_API_KEY"
r = requests.get(f"https://www.face-swap.co/api/jobs/{api_key}", timeout=30)
r.raise_for_status()
print(r.json())
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support