Highest quality face swap for images
opts parameter is optional, no face detection step requiredopts from the Face Detection API for improved accuracy| Parameter | Type | Required | Description |
|---|---|---|---|
sourceImage | array | Yes | Source (new) face image URLs. Each item: { "path": "url", "opts": "landmarks" }. Min 1, Max 50 items. |
sourceImage[].path | string | Yes | Valid URL of the source face image. Must be a valid HTTP/HTTPS URL. |
sourceImage[].opts | string | Conditional | Face landmark string from crop_landmarks of Face Detection API. Required when sourceImage or targetImage array length > 1. Optional when both arrays have exactly 1 element. |
targetImage | array | Yes | Target face image URLs. Each item: { "path": "url", "opts": "landmarks" }. Min 1, Max 50 items. |
targetImage[].path | string | Yes | Valid URL of the target face image. Must be a valid HTTP/HTTPS URL. |
targetImage[].opts | string | Conditional | Face landmark string from crop_landmarks of Face Detection API. Required when sourceImage or targetImage array length > 1. Optional when both arrays have exactly 1 element. |
model_name | string | No | Default: akool_faceswap_image_hq |
webhookUrl | string | No | Callback URL for result notification |
face_enhance | boolean | No | Enable face enhancement (default: false) |
single_face_mode | boolean | No | When true, enables single face mode (default: false) |
opts parameter provides face landmark coordinates for improved face alignment accuracy. To get the opts value:
crop_landmarks value from the response as the opts parameter"262,175:363,175:313,215:272,279"path validation: Each path must be a valid HTTP/HTTPS URL. Invalid URLs will be rejected.opts conditional requirement:
sourceImage and targetImage arrays have exactly 1 element each: opts is optional for all elementssourceImage or targetImage array has more than 1 element: opts is required for every element in both arraysopts when required, the request will be rejected with a validation erroropts is optional but recommended for better accuracyopts is required for all elements to ensure proper face mappingopts is optional:
opts is required for all elements:
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.
Source (new) face image URL array. Each item contains path (required, must be valid URL) and opts (conditional).
opts requirement:
sourceImage or targetImage array length > 1 (all elements must have opts)sourceImage and targetImage arrays have exactly 1 element eachThe 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:
sourceImage or targetImage array length > 1 (all elements must have opts)sourceImage and targetImage arrays have exactly 1 element eachThe 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.