Skip to main content
POST
Video Faceswap
The resources (image, video, voice) generated by our API are valid for 7 days. Please save the relevant resources as soon as possible to prevent expiration.

Important Notes

  • sourceImage: You need to change it to the link collection of the face you need. Pass your image through the Face Detect API to obtain the link and key point data
  • targetImage: Represents the collection of faces after face detection using modifyVideo. When the original video has multiple faces, here is the image link and key point data of each face
  • When using Face Detect API, set single_face: true to return only the largest face data, or false to return all detected faces
  • Ensure that each picture in the sourceImage is a single face, otherwise the face change may fail
  • You need to ensure that sourceImage and targetImage correspond to each other in order

Authorizations

x-api-key
string
header
required

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

application/json
sourceImage
object[]
required

Replacement target image information. You need to change it to the link collection of the face you need.

targetImage
object[]
required

A collection of faces in the original video. Represents the collection of faces after face detection using modifyVideo.

modifyVideo
string
required

The original video you need to change the face

face_enhance
enum<integer>
default:0

Whether facial enhancement (1 means open, 0 means close)

Available options:
0,
1
webhookUrl
string

Callback url address based on HTTP request

Response

200 - application/json

Video faceswap request submitted successfully

code
integer
required

Interface returns business status code (1000: success)

Example:

1000

msg
string
required

Interface returns status information

Example:

"OK"

data
object