← Back to index

Identity Agent

POST /api/v1/agents/identity/match-from-photo

Auth: Required Scope: file-level

Upload a face photo to match against known identities. Detects face via InsightFace, extracts 512D embedding via CoreML FaceNet, then searches pgvector for the closest identity.

Request

multipart/form-data with field image (JPEG/PNG) and optional file_uuid.

Example

curl -s -X POST "$API/api/v1/agents/identity/match-from-photo" \
  -H "Authorization: Bearer $JWT" \
  -F "image=@/path/to/face.jpg" \
  -F "file_uuid=$FILE_UUID"

Response (200)

{
  "success": true,
  "matches": [
    {
      "identity_uuid": "a9a90105...",
      "name": "Cary Grant",
      "similarity": 0.87
    }
  ]
}

POST /api/v1/agents/identity/match-from-trace

Auth: Required Scope: file-level

Match a face trace (tracked face across frames) against known identities. Samples 3 angles from the trace, generates embeddings, and searches pgvector.

Request Parameters

Field Type Required Description
file_uuid string Yes File containing the trace
trace_id integer Yes Face trace ID to match

Example

curl -s -X POST "$API/api/v1/agents/identity/match-from-trace" \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{"file_uuid": "'"$FILE_UUID"'", "trace_id": 10}'