Skip to main content
POST
/
face-match
Find matching face in video
curl --request POST \
  --url https://api.cloudglue.dev/v1/face-match \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "source_image": {
    "url": "<string>",
    "base64_image": "<string>"
  },
  "target_video_url": "<string>",
  "max_faces": 50,
  "face_detection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "frame_extraction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "frame_extraction_config": {
    "strategy": "uniform",
    "uniform_config": {
      "frames_per_second": 1,
      "max_width": 1024
    },
    "thumbnails_config": {
      "enable_frame_thumbnails": true
    },
    "start_time_seconds": 1,
    "end_time_seconds": 1
  }
}'
{
  "face_match_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "face_detection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "frame_extraction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "pending",
  "created_at": 123,
  "source_face_bounding_box": {
    "height": 0.5,
    "width": 0.5,
    "top": 0.5,
    "left": 0.5
  },
  "data": {
    "object": "list",
    "total": 123,
    "limit": 50,
    "offset": 1,
    "faces_matches": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "face_bounding_box": {
          "height": 0.5,
          "width": 0.5,
          "top": 0.5,
          "left": 0.5
        },
        "similarity": 50,
        "frame_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "timestamp": 123,
        "thumbnail_url": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Face match request parameters

source_image
object
required

Source image containing the face to search for

target_video_url
string
required

URL of the target video to search in

max_faces
integer
default:50

Maximum number of faces to return

Required range: 1 <= x <= 4000
face_detection_id
string<uuid>

Optional: Use previously analyzed face detections in video

frame_extraction_id
string<uuid>

Optional: Use previously extracted frames

frame_extraction_config
object

Optional: Frame extraction configuration

Response

Face match job created successfully

face_match_id
string<uuid>
required

Unique identifier for the face match job

status
enum<string>
required

Status of the face match job

Available options:
pending,
processing,
completed,
failed
created_at
number
required

Unix timestamp of when the job was created

face_detection_id
string<uuid>

ID of the face detection analysis used

frame_extraction_id
string<uuid>

ID of the frame extraction used

file_id
string<uuid>

ID of the target file

source_face_bounding_box
object | null

Bounding box of the source face in the source image (null when job is pending/processing)

data
object

Face match results (only present when status is completed)

I