Video Faceswap

Face Swap (Video) Job Creation

Face Swap allows you to replace a face inside a target video 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/video/faceswap

Pricing

0.10 / second

Create Video Face Swap Job

Use this endpoint to start a new face swap generation job.

Input
Description

input.videoUrl

The target video 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/video/faceswap',
      input: {
        videoUrl: 'https://s3.media.deepixels.co/gprod/models/6b8a58c1-54d4-4c2a-8b28-4803898afb33/office.mp4',
        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.

Input
Description

output.videoUrl

String. URL of the generated video output.

Last updated