Skip to main content
POST
Scan Video Faces
The scan is the first step of a multi-person face swap. It finds the distinct people in a video and returns one thumbnail per person. You then choose which people to swap and pass the scan ID to Video Face Swap.

Pricing

1 token per scan (= $0.02 USD). The length of the video does not change the price. The scan and the swap are billed separately. The swap costs the same as a single-person swap, see Video Face Swap pricing.

Request

  • reference_video follows the same rules as in Video Face Swap: the same formats, a 100 MB limit and 2 to 120 seconds for videos, and the usual GIF limits for GIFs.
  • The whole video is scanned. To swap only part of it, set start_time and end_time in the swap request.
The response contains the scan ID:

Result

Poll Task Detail with the img_uuid. When the scan succeeds, data.json has one entry per person:
  • People are sorted by appearances, most frequent first, so person: 0 is the person on screen the longest.
  • At most 10 people are returned. If the video has more, you get the 10 who appear most.
  • If no face is found anywhere in the video, the task fails with the message No face detected in the video.
  • The scan ID can be used for swaps for 7 days. After that, scan the video again.

Next step

Send the scan ID as scan_id and the people you want to swap as faces to Video Face Swap.

Headers

Authorization
string
required

Body

application/json
reference_video
string
required

Video or GIF URL to scan. Same formats and limits as Video Face Swap: .mp4, .mov, .avi, .wmv, .flv, .webm (max 100 MB, 2-120 seconds) and .gif (max 20 MB, at least 2 frames). The format is taken from the extension in the URL path. The whole video is scanned.

Response

code
integer
required
msg
string
required
data
object
required