POST
/
compare
Compare two facial images
curl --request POST \
  --url https://idverify-api.argosidentity.com/modules/compare \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "originFace": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==",
  "targetFace": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==",
  "callbackUrl": "https://your-domain.com/callback"
}'
{
"apiType": "compare_face",
"transactionId": "txn_123456789",
"result": {
"face": {
"isAvailable": true,
"boundingBox": {
"Width": 0.42534321546554565,
"Height": 0.567890123456789,
"Left": 0.12345678901234566,
"Top": 0.23456789012345677
},
"confidence": 0.9876543210987654
},
"targetFace": {
"isAvailable": true,
"boundingBox": {
"Width": 0.4567890123456789,
"Height": 0.543210987654321,
"Left": 0.13456789012345677,
"Top": 0.2456789012345679
},
"confidence": 0.9765432109876543
},
"similarity": {
"score": 0.854321098765432,
"threshold": 0.8,
"isMatch": true
}
}
}

Face Compare API

The Face Compare API allows users to compare two faces to determine their similarity. With this functionality, users can easily measure the resemblance between two facial images, enabling them to identify and analyze similarities or differences.

API Overview

The Face Compare API provides a powerful tool for facial similarity analysis with the following capabilities:
  • Dual Image Comparison: Compare two facial images side by side
  • Similarity Scoring: Get precise similarity scores between faces
  • High Accuracy: Advanced AI algorithms for reliable comparisons
  • Fast Processing: Quick analysis and response times
  • Multiple Formats: Support for various image formats
  • Privacy Focused: No storage of facial data, only comparison results

Request Parameters

Required Parameters

  • originFace: Base64 encoded image of the face to be compared with the targetFace image
  • targetFace: Base64 encoded image of the face to be compared with the originFace image

Optional Parameters

  • callbackUrl: The URL where the face compare results will be sent upon completion

Authentication

  • x-api-key: API key essential for authentication and access control purposes

Response Format

The API returns detailed comparison results including:
  • apiType: API type identifier
  • transactionId: Unique identifier for each request
  • result: Object containing the processing result
    • face: Recognition result of the originFace
    • targetFace: Recognition result of the targetFace
    • similarity: Similarity score between the two faces

Use Cases

  • Identity Verification: Verify if two photos belong to the same person
  • Fraud Detection: Detect identity theft and fake documents
  • Access Control: Verify identity for secure entry systems
  • Customer Onboarding: Ensure consistent identity across registrations
  • Document Verification: Compare ID photos with live captures

Processing Modes

Synchronous Processing

  • Immediate response with comparison results
  • Best for real-time applications
  • Direct API response

Asynchronous Processing

  • Use callback URL for delayed results
  • Better for batch processing
  • Detailed callback response format

Similarity Scoring

The API provides similarity scores that indicate how closely two faces match:
  • High Score (80-100%): Very likely the same person
  • Medium Score (60-79%): Possibly the same person
  • Low Score (0-59%): Likely different people

Authorizations

x-api-key
string
header
required

Body

application/json

Response

200
application/json

Successful face comparison

The response is of type object.