> ## Documentation Index
> Fetch the complete documentation index at: https://developers.argosidentity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Verifier API

> Compare two images and analyze their similarity

<Callout>
  Image Verifier allows users to input two images and analyze their similarity, providing a result that indicates the level of similarity. This functionality can be applied to various use cases, making it easy for users to adapt it to their specific needs.
</Callout>

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  API key essential for authentication and access control purposes, required for authorization.
</ParamField>

### Body Parameters

<ParamField header="imageSet" type="object" required>
  Object containing the two images to compare.
</ParamField>

<ParamField header="originalImage" type="string" required>
  First image to compare in base 64 format.
</ParamField>

<ParamField header="compareImage" type="string" required>
  Image to be compared with the original image in base 64 format.
</ParamField>

## Response

### Success Response (200)

<ResponseField name="originalHash" type="string">
  P Hash value of the original image (hexadecimal)
</ResponseField>

<ResponseField name="compareHash" type="string">
  P Hash value of the Compare image (hexadecimal)
</ResponseField>

<ResponseField name="hammingDistance" type="number">
  Hamming Distance between the two hash values, indicating the similarity of the images. A smaller value means the images are more similar.
</ResponseField>

### Error Response (400)

<ResponseField name="message" type="string">
  Briefly describes the error.
</ResponseField>

## Example Request

```json theme={null}
{
  "imageSet": {
    "originalImage": "base64_encoded_image_1",
    "compareImage": "base64_encoded_image_2"
  }
}
```

## Example Response

```json theme={null}
{
  "originalHash": "70",
  "compareHash": "71",
  "hammingDistance": 2
}
```


## OpenAPI

````yaml POST /v3/modules/match/image
openapi: 3.1.0
info:
  title: Image Verifier API
  description: Compare two images and analyze their similarity
  version: 1.0.0
servers:
  - url: https://api.argosidentity.com
    description: Production server
security: []
paths:
  /v3/modules/match/image:
    post:
      tags:
        - Image Verifier
      summary: Compare two images
      description: >-
        Compare two images and analyze their similarity, providing a result that
        indicates the level of similarity.
      operationId: compareImages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - imageSet
              properties:
                imageSet:
                  type: object
                  required:
                    - originalImage
                    - compareImage
                  properties:
                    originalImage:
                      type: string
                      description: First image to compare in base 64 format.
                      format: base64
                    compareImage:
                      type: string
                      description: >-
                        Image to be compared with the original image in base 64
                        format.
                      format: base64
            examples:
              example1:
                summary: Example request
                value:
                  imageSet:
                    originalImage: base64_encoded_image_1
                    compareImage: base64_encoded_image_2
      responses:
        '200':
          description: Everything worked as expected.
          content:
            application/json:
              schema:
                type: object
                properties:
                  originalHash:
                    type: string
                    description: P Hash value of the original image (hexadecimal)
                    example: '70'
                  compareHash:
                    type: string
                    description: P Hash value of the Compare image (hexadecimal)
                    example: '71'
                  hammingDistance:
                    type: number
                    description: >-
                      Hamming Distance between the two hash values, indicating
                      the similarity of the images. A smaller value means the
                      images are more similar.
                    example: 2
              examples:
                example1:
                  summary: Example response
                  value:
                    originalHash: '70'
                    compareHash: '71'
                    hammingDistance: 2
        '400':
          description: >-
            The request was unacceptable, often due to missing a required
            parameter.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Briefly describes the error.
        '401':
          description: Unauthorized - API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: API key is required or invalid.
        '403':
          description: Forbidden - Access denied.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: 'Access denied: API key is unavailable.'
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````