Skip to main content
POST
Analyze faces in one or more images, returning a persons format optimized for face swap. Automatically deduplicates faces across multiple frames.

Request Parameters

Single Image: Each face becomes a separate person (no deduplication). Multiple Images: Same person across frames is merged into one entry.

Response Format

Response Fields

Person Object

Examples

Example 1: Single Image Analysis

Request:
Response:

Example 2: Multi-Frame Analysis (Video Frames)

Request:
Response:
The same person appearing in all 3 frames is merged into a single person entry with multiple appearances.

Example 3: Custom Expand Ratio

Request:

Error Responses

Integration with Face Swap

Best Practices

  • URL Requirements: Use HTTPS, ensure publicly accessible
  • Multi-Frame: Use 3-10 frames for typical video clips
  • Expand Ratio: Use 0.5 for more facial context in face swap

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
frame_urls
string<uri>[]
required

List of image URLs to analyze. Must be publicly accessible.

  • Single URL: Returns each face as a separate person
  • Multiple URLs: Automatically deduplicates faces across frames
Example:
timestamps
number<float>[]

Optional timestamps for each frame (in seconds). If not provided, sequential indices (0.0, 1.0, 2.0, ...) will be used. Length should match frame_urls length.

Example:
expand_ratio
number<float>
default:0.3

Expansion ratio for face cropping. The face bounding box is expanded by this ratio on all sides before cropping. Higher values include more context around the face.

Required range: 0 <= x <= 1
Example:

0.3

Response

Face analysis completed successfully

success
boolean
required

Whether the analysis was successful

Example:

true

frame_count
integer
required

Number of frames that were analyzed

Example:

3

persons
object[]
required

List of detected persons. Each person contains:

  • Unique ID and index
  • Cropped face image URL
  • Bounding box and confidence
  • All appearances across frames
  • First and last seen timestamps