{
  "openapi": "3.0.4",
  "info": {
    "title": "VerifEye - FaceRecognition API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/v1/collection/get": {
      "get": {
        "tags": [
          "Collection"
        ],
        "summary": "Retrieves a single collection by its identifier.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "description": "The collection identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Collection found.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GetRecognitionCollectionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRecognitionCollectionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRecognitionCollectionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          },
          "404": {
            "description": "Collection not found."
          }
        }
      }
    },
    "/v1/collection/get-all": {
      "get": {
        "tags": [
          "Collection"
        ],
        "summary": "Lists all collections belonging to the authenticated account.",
        "responses": {
          "200": {
            "description": "Collections returned.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllRecognitionCollectionsResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllRecognitionCollectionsResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllRecognitionCollectionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          }
        }
      }
    },
    "/v1/collection/create": {
      "post": {
        "tags": [
          "Collection"
        ],
        "summary": "Creates a new recognition collection.",
        "requestBody": {
          "description": "Payload containing collection id and optional description.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecognitionCollectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecognitionCollectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecognitionCollectionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Collection created successfully.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateRecognitionCollectionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateRecognitionCollectionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateRecognitionCollectionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          },
          "409": {
            "description": "Collection already exists."
          }
        }
      }
    },
    "/v1/collection/update": {
      "put": {
        "tags": [
          "Collection"
        ],
        "summary": "Updates an existing collection (only description is mutable).",
        "requestBody": {
          "description": "Payload containing collection id and new description.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRecognitionCollectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRecognitionCollectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRecognitionCollectionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Collection updated.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateRecognitionCollectionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateRecognitionCollectionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateRecognitionCollectionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          }
        }
      }
    },
    "/v1/collection/reset": {
      "delete": {
        "tags": [
          "Collection"
        ],
        "summary": "Removes all indexed faces from a collection without deleting the collection itself.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "description": "The collection identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Collection reset (all faces removed).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResetRecognitionCollectionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetRecognitionCollectionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetRecognitionCollectionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          },
          "404": {
            "description": "Collection not found."
          }
        }
      }
    },
    "/v1/collection/delete": {
      "delete": {
        "tags": [
          "Collection"
        ],
        "summary": "Deletes a collection by its identifier.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "description": "The collection identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Collection deleted (idempotent).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteRecognitionCollectionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteRecognitionCollectionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteRecognitionCollectionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          }
        }
      }
    },
    "/v1/external-key/get-face-ids": {
      "get": {
        "tags": [
          "ExternalKey"
        ],
        "summary": "Returns all face ids associated with the specified external key in a collection.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "description": "The collection identifier.",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 0,
              "type": "string"
            }
          },
          {
            "name": "externalKey",
            "in": "query",
            "description": "The external key to look up.",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 0,
              "pattern": "^[\\x21-\\x7E]{1,512}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup succeeded.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GetFaceIdsByExternalKeyResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetFaceIdsByExternalKeyResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetFaceIdsByExternalKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          },
          "404": {
            "description": "Collection not found."
          }
        }
      }
    },
    "/v1/external-key/set": {
      "put": {
        "tags": [
          "ExternalKey"
        ],
        "summary": "Associates an external key with a face. Creates a new association or updates the existing one.",
        "requestBody": {
          "description": "The collection, face, external key and duplicate policy.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetExternalKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetExternalKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetExternalKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Association created or updated.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SetExternalKeyResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetExternalKeyResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetExternalKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure, or the external key is a duplicate and duplicates are not allowed."
          },
          "404": {
            "description": "Collection not found."
          }
        }
      }
    },
    "/v1/external-key/delete": {
      "delete": {
        "tags": [
          "ExternalKey"
        ],
        "summary": "Removes external key associations. When the face id is omitted, every face associated with\nthe external key is unlinked; otherwise only the single pair is removed.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "description": "The collection identifier.",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 0,
              "type": "string"
            }
          },
          {
            "name": "externalKey",
            "in": "query",
            "description": "The external key whose associations are removed.",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 0,
              "pattern": "^[\\x21-\\x7E]{1,512}$",
              "type": "string"
            }
          },
          {
            "name": "faceId",
            "in": "query",
            "description": "Optional. When omitted, all pairs for the external key are removed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Associations removed (idempotent).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteExternalKeyResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteExternalKeyResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteExternalKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failure."
          },
          "400": {
            "description": "Validation failure."
          },
          "404": {
            "description": "Collection not found."
          }
        }
      }
    },
    "/v1/face/search": {
      "post": {
        "tags": [
          "FaceRecognition"
        ],
        "summary": "You can send base64 encoded image to search in the specified collection for the most dominant detected faces on it.\nThe faces on the images should be in an upright position. Sideways or upside-down faces are not supported.",
        "requestBody": {
          "description": "Request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionSearchRequestModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionSearchRequestModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionSearchRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionSearchResultModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionSearchResultModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionSearchResultModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/face/index": {
      "post": {
        "tags": [
          "FaceRecognition"
        ],
        "summary": "You can send base64 encoded image to index into the specified collection based on the most dominant detected faces on it.\nThe faces on the images should be in an upright position. Sideways or upside-down faces are not supported.",
        "requestBody": {
          "description": "Request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionIndexRequestModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionIndexRequestModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionIndexRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionIndexResultModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionIndexResultModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionIndexResultModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/face/search-or-index": {
      "post": {
        "tags": [
          "FaceRecognition"
        ],
        "summary": "You can send base64 encoded image to search for or index in case it is not found into the specified collection based on the most dominant detected faces on it.\nThe faces on the images should be in an upright position. Sideways or upside-down faces are not supported.",
        "requestBody": {
          "description": "Request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionSearchOrIndexRequestModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionSearchOrIndexRequestModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FaceRecognitionSearchOrIndexRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionSearchOrIndexResultModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionSearchOrIndexResultModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionSearchOrIndexResultModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/face/delete": {
      "delete": {
        "tags": [
          "FaceRecognition"
        ],
        "summary": "Deletes faces from the specified collection. Provide either a faceId to delete a single face,\nor an externalKey to delete all faces associated with that key. Exactly one of the two must be provided.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "description": "The id of the collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "faceId",
            "in": "query",
            "description": "The id of the face to be deleted. Either faceId or externalKey must be provided.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "externalKey",
            "in": "query",
            "description": "The external key whose associated face(s) should be deleted. Either faceId or externalKey must be provided.",
            "schema": {
              "maxLength": 512,
              "minLength": 0,
              "pattern": "^[\\x21-\\x7E]{1,512}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionDeleteResultModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionDeleteResultModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceRecognitionDeleteResultModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/healthz": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Returns the server UTC time.",
        "responses": {
          "200": {
            "description": "Returns the server UTC time.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BoundingBoxModel": {
        "type": "object",
        "properties": {
          "x": {
            "type": "integer",
            "description": "Horizontal position of the detected face bounding box",
            "format": "int32"
          },
          "y": {
            "type": "integer",
            "description": "Vertical position of the detected face bounding box",
            "format": "int32"
          },
          "width": {
            "type": "integer",
            "description": "Width of the detected face bounding box",
            "format": "int32"
          },
          "height": {
            "type": "integer",
            "description": "Height of the detected face bounding box",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Model for the bounding box of a detected face"
      },
      "CreateRecognitionCollectionRequest": {
        "required": [
          "collectionId"
        ],
        "type": "object",
        "properties": {
          "collectionId": {
            "maxLength": 512,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_\\-\\.]+$",
            "type": "string",
            "description": "Unique identifier for the collection (max length 512).",
            "example": "MyCollectionId"
          },
          "description": {
            "maxLength": 1024,
            "type": "string",
            "description": "Optional description (max length 1024).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request payload for creating a new recognition collection."
      },
      "CreateRecognitionCollectionResponse": {
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string",
            "description": "Identifier of the created collection.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response after creating a new recognition collection."
      },
      "DeleteExternalKeyResponse": {
        "type": "object",
        "additionalProperties": false,
        "description": "Result marker for deleting external key associations."
      },
      "DeleteRecognitionCollectionResponse": {
        "type": "object",
        "additionalProperties": false,
        "description": "Response for a successful collection deletion."
      },
      "ExternalKeySetResultType": {
        "enum": [
          "Created",
          "Updated"
        ],
        "type": "string",
        "description": "Indicates whether a set operation created a new association or updated an existing one."
      },
      "FaceDetectionModel": {
        "type": "object",
        "properties": {
          "confidence": {
            "type": "number",
            "description": "Face detection score with value range [0.0, 1.0] (higher is better)",
            "format": "float"
          },
          "boundingBox": {
            "$ref": "#/components/schemas/BoundingBoxModel"
          }
        },
        "additionalProperties": false,
        "description": "Model for face detection"
      },
      "FaceRecognitionDeleteResultModel": {
        "type": "object",
        "additionalProperties": false,
        "description": "Model for the result of face deletion from a collection"
      },
      "FaceRecognitionIndexRequestModel": {
        "type": "object",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/ImageModel"
          },
          "collectionId": {
            "type": "string",
            "description": "The id of the collection to index the face into",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FaceRecognitionIndexResultModel": {
        "type": "object",
        "properties": {
          "face": {
            "$ref": "#/components/schemas/FaceDetectionModel"
          },
          "faceId": {
            "type": "string",
            "description": "The id of the face",
            "nullable": true
          },
          "externalKey": {
            "type": "string",
            "description": "The external key associated with the face, when one has been set via the external key API. Null otherwise.",
            "nullable": true
          },
          "hasFace": {
            "type": "boolean",
            "description": "Indicates whether a face was found in the image",
            "readOnly": true
          },
          "unprocessedFaceCount": {
            "type": "integer",
            "description": "In case more than one face was detected, only the dominant face will be used for the recognition. This count indicates how many faces were not processed.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Model for the result of face indexing"
      },
      "FaceRecognitionSearchOrIndexRequestModel": {
        "type": "object",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/ImageModel"
          },
          "collectionId": {
            "type": "string",
            "description": "The id of the collection to search against",
            "nullable": true
          },
          "faceMatchThreshold": {
            "type": "integer",
            "description": "(Optional) Specifies the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70. The default value is 80.\n95 corresponds to FPR 1e-06 / 90 corresponds to FPR 1e-05 / 80 corresponds to FPR 1e-4 / 70 corresponds to FPR 1e-3\nAll thresholds were computed using our extensive in-the-wild datasets\nValid Range: Minimum value of 0. Maximum value of 100.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Request model for searching a face within a collection or indexing a face into a collection if not found."
      },
      "FaceRecognitionSearchOrIndexResultModel": {
        "type": "object",
        "properties": {
          "face": {
            "$ref": "#/components/schemas/FaceDetectionModel"
          },
          "faceId": {
            "type": "string",
            "description": "The id of the face",
            "nullable": true
          },
          "externalKey": {
            "type": "string",
            "description": "The external key associated with the face, when one has been set via the external key API. Null otherwise.",
            "nullable": true
          },
          "hasFace": {
            "type": "boolean",
            "description": "Indicates whether a face was found in the image",
            "readOnly": true
          },
          "unprocessedFaceCount": {
            "type": "integer",
            "description": "In case more than one face was detected, only the dominant face will be used for the recognition. This count indicates how many faces were not processed.",
            "format": "int32"
          },
          "resultSource": {
            "$ref": "#/components/schemas/ResultSourceType"
          }
        },
        "additionalProperties": false,
        "description": "Model for the result of face search or index"
      },
      "FaceRecognitionSearchRequestModel": {
        "type": "object",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/ImageModel"
          },
          "collectionId": {
            "type": "string",
            "description": "The id of the collection to search against",
            "nullable": true
          },
          "faceMatchThreshold": {
            "type": "integer",
            "description": "(Optional) Specifies the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70. The default value is 80.\n95 corresponds to FPR 1e-06 / 90 corresponds to FPR 1e-05 / 80 corresponds to FPR 1e-4 / 70 corresponds to FPR 1e-3\nAll thresholds were computed using our extensive in-the-wild datasets\nValid Range: Minimum value of 0. Maximum value of 100.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Request model for searching a face within a collection."
      },
      "FaceRecognitionSearchResultModel": {
        "type": "object",
        "properties": {
          "face": {
            "$ref": "#/components/schemas/FaceDetectionModel"
          },
          "faceId": {
            "type": "string",
            "description": "The id of the face",
            "nullable": true
          },
          "externalKey": {
            "type": "string",
            "description": "The external key associated with the face, when one has been set via the external key API. Null otherwise.",
            "nullable": true
          },
          "hasFace": {
            "type": "boolean",
            "description": "Indicates whether a face was found in the image",
            "readOnly": true
          },
          "unprocessedFaceCount": {
            "type": "integer",
            "description": "In case more than one face was detected, only the dominant face will be used for the recognition. This count indicates how many faces were not processed.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Model for the result of face search"
      },
      "GetAllRecognitionCollectionsResponse": {
        "type": "object",
        "properties": {
          "collections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecognitionCollectionOverviewModel"
            },
            "description": "Collections returned for the account (may be empty).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response containing the list of recognition collections for an account."
      },
      "GetFaceIdsByExternalKeyResponse": {
        "type": "object",
        "properties": {
          "faceIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The ids of the faces associated with the external key. Empty when none are associated.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result of looking up the faces associated with an external key."
      },
      "GetRecognitionCollectionResponse": {
        "type": "object",
        "properties": {
          "recognitionCollection": {
            "$ref": "#/components/schemas/RecognitionCollectionModel"
          }
        },
        "additionalProperties": false,
        "description": "Response containing a single recognition collection's details."
      },
      "ImageModel": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "URL of a jpeg or png image",
            "nullable": true
          },
          "bytes": {
            "type": "string",
            "description": "Base 64 string encoded binary jpeg or png image",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents an image using either a URL or a Base64 string encoded string."
      },
      "RecognitionCollectionModel": {
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string",
            "description": "Identifier of the collection.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Optional textual description.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "UTC timestamp when the collection was created.",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "UTC timestamp when the collection was last updated.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Detailed recognition collection model."
      },
      "RecognitionCollectionOverviewModel": {
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string",
            "description": "Identifier of the collection.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Optional textual description.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "UTC timestamp when the collection was created.",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "UTC timestamp when the collection was last updated.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Lightweight overview of a recognition collection."
      },
      "ResetRecognitionCollectionResponse": {
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for a successful collection reset (all faces removed, collection preserved)."
      },
      "ResultSourceType": {
        "enum": [
          "None",
          "Search",
          "Index"
        ],
        "type": "string",
        "description": "Specifies the source of a result in an operation."
      },
      "SetExternalKeyRequest": {
        "required": [
          "collectionId",
          "externalKey",
          "faceId"
        ],
        "type": "object",
        "properties": {
          "collectionId": {
            "maxLength": 512,
            "minLength": 0,
            "type": "string",
            "description": "The id of the collection the face belongs to."
          },
          "faceId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string",
            "description": "The id of the face to associate the external key with."
          },
          "externalKey": {
            "maxLength": 512,
            "minLength": 0,
            "pattern": "^[\\x21-\\x7E]{1,512}$",
            "type": "string",
            "description": "The external key to associate with the face. Maximum 512 printable ASCII characters."
          },
          "allowDuplicates": {
            "type": "boolean",
            "description": "When false (default), the request is rejected with 400 if the external key is already\nassociated with a different face. When true, the external key may map to multiple faces."
          }
        },
        "additionalProperties": false,
        "description": "Request model for associating an external key with a face."
      },
      "SetExternalKeyResponse": {
        "type": "object",
        "properties": {
          "faceId": {
            "type": "string",
            "description": "The id of the face the external key was associated with.",
            "nullable": true
          },
          "externalKey": {
            "type": "string",
            "description": "The external key that was associated.",
            "nullable": true
          },
          "result": {
            "$ref": "#/components/schemas/ExternalKeySetResultType"
          }
        },
        "additionalProperties": false,
        "description": "Result of associating an external key with a face."
      },
      "UpdateRecognitionCollectionRequest": {
        "required": [
          "collectionId"
        ],
        "type": "object",
        "properties": {
          "collectionId": {
            "minLength": 1,
            "type": "string",
            "description": "Identifier of the collection to update."
          },
          "description": {
            "maxLength": 1024,
            "type": "string",
            "description": "New description (max length 1024).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request payload for updating an existing recognition collection.\nOnly description is editable."
      },
      "UpdateRecognitionCollectionResponse": {
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string",
            "description": "Identifier of the updated collection.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response after updating a recognition collection."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT Authorization header using the Bearer scheme. \r\n\r\n Enter your token in the text input below.\r\n\r\nExample: \"1safsfsdfd...\"",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKey": {
        "type": "apiKey",
        "description": "API key Authorization header using the ApiKey scheme. \r\n\r\n Enter 'ApiKey' [space] and then your APIKey in the text input below.\r\n\r\nExample: \"ApiKey 5j3245lj...\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ],
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "Collection"
    },
    {
      "name": "ExternalKey"
    },
    {
      "name": "FaceRecognition"
    },
    {
      "name": "Health"
    }
  ]
}