🔗 DEVELOPERS
API Reference
Integrate professional face swap into your applications
🚀 Quick Start
1️⃣
Get API Key
Sign up and get your free API key
2️⃣
Make Request
Send images to our REST API
3️⃣
Get Results
Receive swapped image URL
import requests
API_KEY = "your_api_key"
url = "https://api.deepswapai.com/v1/swap/image"
files = {
"source_image": open("source.jpg", "rb"),
"target_image": open("target.jpg", "rb")
}
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.post(url, files=files, headers=headers)
print(response.json())📡 Endpoints
POST
/api/v1/swap/imageImage Face Swap
Swap faces in a single image
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| source_image | file | ✅ | Source face image (JPG, PNG, WebP) |
| target_image | file | ✅ | Target image to swap face into |
| quality | string | ❌ | Output quality: "standard", "hd", "4k" |
Response:
{ "success": true, "result_url": "https://...", "processing_time": 2.3 }POST
/api/v1/swap/videoVideo Face Swap
Swap faces in video content
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| source_image | file | ✅ | Source face image |
| target_video | file | ✅ | Target video (MP4, MOV, max 100MB) |
| webhook_url | string | ❌ | URL for completion callback |
Response:
{ "success": true, "job_id": "abc123", "status": "processing" }GET
/api/v1/job/{job_id}Check Job Status
Get status of async processing job
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| job_id | string | ✅ | Job ID from video swap request |
Response:
{ "job_id": "abc123", "status": "completed", "result_url": "https://..." }POST
/api/v1/swap/batchBatch Processing
Process multiple images in one request
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| source_image | file | ✅ | Source face image |
| target_images | file[] | ✅ | Array of target images (max 50) |
Response:
{ "success": true, "results": [...], "total_processed": 50 }💰 API Pricing
Free
100
calls/month
Pro
10,000
calls/month - $49
Enterprise
Unlimited
Custom pricing