Face Swap Pro
Highest quality face swap for images
Face Swap Pro (akool_faceswap_image_hq)
Face Swap Pro delivers the highest quality face swap results for images:- More Realistic: Advanced algorithm produces natural and lifelike face swaps
- More Similar: Enhanced matching ensures high similarity to the source face
- Simplified Integration:
optsparameter is optional, no face detection step required - Batch Support: Supports up to 50 sourceImage / targetImage pairs per request
- Optional Face Landmarks: Provide
optsfrom the Face Detection API for improved accuracy
Parameters
Getting opts Value
Theopts parameter provides face landmark coordinates for improved face alignment accuracy. To get the opts value:
- Call the Face Detection API with your image URL
- Use the
crop_landmarksvalue from the response as theoptsparameter - Format: colon-separated coordinate pairs, e.g.
"262,175:363,175:313,215:272,279"
Important Notes
Parameter Validation Rules
pathvalidation: Eachpathmust be a valid HTTP/HTTPS URL. Invalid URLs will be rejected.optsconditional requirement:- When both
sourceImageandtargetImagearrays have exactly 1 element each:optsis optional for all elements - When either
sourceImageortargetImagearray has more than 1 element:optsis required for every element in both arrays - If any element is missing
optswhen required, the request will be rejected with a validation error
- When both
Usage Guidelines
- For single face swap (1 source + 1 target):
optsis optional but recommended for better accuracy - For batch face swap (multiple faces):
optsis required for all elements to ensure proper face mapping - For multi-face swap, image + video support, or video segment swap, use Face Swap Plus
Example: Single Face Swap (opts Optional)
When both arrays have exactly 1 element,opts is optional:
Example: Single Face Swap with opts (Recommended)
Example: Batch Face Swap (opts Required)
When either array has more than 1 element,opts is required for all elements:
Authorizations
Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.
Body
Source (new) face image URL array. Each item contains path (required, must be valid URL) and opts (conditional).
opts requirement:
- Required when
sourceImageortargetImagearray length > 1 (all elements must haveopts) - Optional when both
sourceImageandtargetImagearrays have exactly 1 element each
The opts value comes from the crop_landmarks field returned by the Face Detection API.
1 - 50 elementsTarget face image URL array. Each item contains path (required, must be valid URL) and opts (conditional).
opts requirement:
- Required when
sourceImageortargetImagearray length > 1 (all elements must haveopts) - Optional when both
sourceImageandtargetImagearrays have exactly 1 element each
The opts value comes from the crop_landmarks field returned by the Face Detection API.
1 - 50 elementsModel name (default: akool_faceswap_image_hq)
akool_faceswap_image_hq Callback URL for result notification
Whether to enable face enhancement (default false)
When true, enables single face mode for simplified single-face swap.
When false (default), standard mode.