Dzine - Face Swapper
Advanced AI-powered face swapping that digitally transfers facial features from a source image onto a target image while preserving original facial expressions, lighting, and details.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be FACE_SWAPPER |
model | string | Yes | AI model identifier. Must be dzine |
promptObject | object | Yes | Configuration object containing face swap parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
swapImageUrl | string | Yes | Asset path to the destination image where the face will be swapped to. Example: development/images/2025_11_05_22_13_08_115_547133.webp | - |
targetImageUrl | string | Yes | Asset path to the source image containing the face to be transferred. Example: development/images/2025_11_05_22_13_08_115_547135.webp | - |
n | number | Yes | Number of face swap variations to generate (1-4) | 1 |
output_format | string | No | Output format: "webp" or "jpeg" | "webp" |
Image Requirements
- Maximum Size: 50 MB
- Formats: JPG, PNG, WebP supported as input
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "FACE_SWAPPER",
"model": "dzine",
"promptObject": {
"swapImageUrl": "development/images/target_person.jpg",
"targetImageUrl": "development/images/source_face.jpg",
"n": 2,
"output_format": "webp"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'FACE_SWAPPER',
model: 'dzine',
promptObject: {
swapImageUrl: 'development/images/target_person.jpg',
targetImageUrl: 'development/images/source_face.jpg',
n: 2,
output_format: 'webp'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "FACE_SWAPPER",
"model": "dzine",
"promptObject": {
"swapImageUrl": "development/images/target_person.jpg",
"targetImageUrl": "development/images/source_face.jpg",
"n": 2,
"output_format": "webp"
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresAsset path to target image (face will be replaced)
Asset path to source image (face to transfer)
Number of face swap variations to generate (1-4)
Output image format
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "FACE_SWAPPER",
"model": "dzine",
"promptObject": {
"swapImageUrl": "development/images/target_person.jpg",
"targetImageUrl": "development/images/source_face.jpg",
"n": 2,
"output_format": "webp"
}
}'
Response Format
{
"aiRecord": {
"uuid": "e40dd9ef-0944-4ce5-bc90-1edd2548619a",
"userId": "f944dd01-da40-405c-b698-708269eb9664",
"teamId": "7d530bad-357c-4f6e-b627-16f043c9a16b",
"teamUser": {
"teamId": "7d530bad-357c-4f6e-b627-16f043c9a16b",
"userId": "f944dd01-da40-405c-b698-708269eb9664",
"userName": "test",
"userAvatar": null,
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 8370000,
"createdAt": "2025-10-31T06:24:14.102Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-11-05T15:54:56.422Z",
"updatedBy": "SYSTEM"
},
"model": "dzine",
"type": "FACE_SWAPPER",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-11-05T15:59:57.291Z",
"aiRecordDetail": {
"promptObject": {
"n": 1,
"swapImageUrl": "development/images/target_person.jpg",
"output_format": "webp",
"targetImageUrl": "development/images/source_face.jpg"
},
"resultObject": [
"development/images/2025_11_05_22_59_58_236_378180.webp"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": ""
}
}
Use Cases
- Entertainment & Social Media: Create fun face swaps for social content
- Visual Effects: Professional face replacement for film and video
- Avatar Creation: Generate personalized avatars and profile images
- Try-Before-You-Buy: Virtual makeup or hairstyle previews
- Historical Recreation: Place modern faces in historical contexts
- Marketing: Create personalized promotional materials
Tips for Best Results
-
Image Selection:
- Use clear, front-facing or slightly angled faces
- Ensure good lighting in both images
- Avoid extreme angles or partially obscured faces
- Face proportion should be less than 80% of total image
-
Image Quality:
- Higher resolution images produce better results
- Clear facial features improve detection accuracy
- Avoid heavily compressed or low-quality images
- Ensure proper image orientation before upload
-
Multiple Variations:
- Generate 2-4 variations to get the best result
- Different slots may work better depending on image type
- For realistic photos, slots 2 and 4 often perform best
- For artistic images, slots 1 and 3 are optimized
Face Detection Behavior
The system automatically handles face detection with the following logic:
- Both faces detected: Normal face swap proceeds
- Source face not detected: Returns original target image (no swap)
- Target face not detected: Returns original target image (no swap)
- No faces detected: Returns original target image (no swap)
Charges Apply
Face detection API calls are charged even when no faces are detected. This ensures fair billing for API usage regardless of detection results.