Image Faceswap
Face Swap (Image) Job Creation
Face Swap allows you to replace a face inside a target image using a source face image. The system automatically handles facial alignment, lighting matching, and blending to produce a natural looking result.
The process is asynchronous. After submitting a request, the API returns a jobId. You can then retrieve the final result using either a webhook callback or a job status request.
Model
nudifyme/img/faceswapPricing
0.02 / imageCreate Face Swap Job
Use this endpoint to start a new face swap generation job.
input.imageUrl
The target image where the new face will be applied.
input.faceUrl
The source face image that will be extracted and blended into the target image.
input.advanced
Optional boolean that enables occlusion aware face swap processing. Helps when the face is partially covered by hands, hair, or objects.
Example Request
const response = await fetch(
'https://api.deepixels.co/v1/generate',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
model: 'nudifyme/img/faceswap',
input: {
imageUrl: 'https://images.pexels.com/photos/3756941/pexels-photo-3756941.jpeg',
faceUrl: 'https://images.pexels.com/photos/2661256/pexels-photo-2661256.jpeg',
advanced: true
},
webhook: 'YOUR_WEBHOOK_URL'
})
}
);
const data = await response.json();
console.log(data);Job Creation Response
Getting Final Results
When processing is complete, the final job result can be received in either of the following ways:
By sending a GET request to the job status endpoint
Automatically via webhook if a webhook URL was provided during job creation
Both methods return the same response payload.
output.imageUrl
Array of generated image URLs. Even if only one image is generated, it is returned as an array to support multi-output models in the future.
Last updated