Definition¶
Postman Collection: Download
GET /dasface/v2/alive¶
The service receives a GET request with no params, and returns a 204 status code indicating that the server is up.
Aliases for this path:
- /alive
Response: 204
Empty response.
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/authenticity/photo¶
Computes the authenticity confidence of a selfie photo. The service receives a POST request con- taining a selfie image and it the confidence of the system about the authenticity of the photo. This means, the closer the value to 0, the most likely it is a spoofing attempt. This endpoint is optional and may require a specific agreement.
Aliases for this path:
- /authenticity/photo
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for photo authenticity.
Name | Req. | Type | Description |
---|---|---|---|
targetImage | yes | file | An image containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
Response: 200
Returns the confidence of the given image to be authentic, that is, the closer to 0, the most likely it is a spoofing attempt.
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
confidence | yes | number | A probability number in range [0,1]. |
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FaceNotFoundError | Unable to locate face in given image |
FaceAlignmentError | Unable to align face in given image |
MoreThanOneFaceError | More than one face located at given image |
FaceTooSmallForIAS | Image size is too small for analyzing its au- thenticity |
FormValidationError | Unable to validate form fields |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error Response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/authenticity/photo/unequal-pair¶
Computes confidence that two images are not a capture of same photo (duplicate attack). The service receives a POST request with two face images and returns the confidence number which represents how likely both images are not a capture of the same photo (duplicate attack). A duplicate attack consists of sending two images containing the same photo, for instance, one image could be a photograph for visa and the other a photo of a passport issued using previous photo, therefore, both images contain the same photo.
Aliases for this path:
- /authenticity/photo/unequal-pair
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for unequal pair of photos.
Name | Req. | Type | Description |
---|---|---|---|
anchorImage | yes | file | An image containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
targetImage | yes | file | An image containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
Response: 200
Returns the confidence of both images being different, that is, the closer to 0, the more likely it is a duplicate attack; the closer to 1, the most likely it is not.
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
confidence | yes | number | A probability number in range [0,1]. |
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FaceNotFoundError | Unable to locate face in given image |
FaceAlignmentError | Unable to align face in given image |
MoreThanOneFaceError | More than one face located at given image |
FaceTooSmallForIAS | Image size is too small for analyzing its au- thenticity |
FormValidationError | Unable to validate form fields |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/challenges/analysis/video-photo¶
Performs face verification of a selfie and a video recording, and authenticates both, the video recording and selfie. The video recording is returned by SDK and sent to dasFace as a file. This endpoint is optional and may require a specific agreement.
Aliases for this path:
- /challenges/analysis/video-photo
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for authenticity operation based on video and selfie.
Name | Req. | Type | Description |
---|---|---|---|
anchorImage | yes | file | A face photo to be compared with the face shown in the video. It must be given as a file. When body is application/json, the field must contain the file content encoded in base64. |
annotations | yes | file | File with annotations of video in WebVTT format. It should contain the result given by the SDK. It must be given as a file. When body is applica- tion/json, the field must contain the file content encoded in base64. |
targetVideo | yes | file | Video recording of the challenge Response. It must be given as a file. When body is application/json, the field must contain the file content encoded in base64. |
token | yes | file | JWS token as returned by a challenge request to /api/v2/challenges/sequential. It can be given as a file or as a string variable. |
Response: 200
The response containing authenticity and similarity confidences for all the given media resources. The returned confidence can be a number in [0.0, 1.0] or a None. The None value indicates a sort of problem during the operation, and in these cases, the errors response field will contain details about the failure.
Name | Req. | Type | Description |
---|---|---|---|
confidence | yes | number | A probability number in range [0,1]. |
errors | yes | array | List of errors produced while computing the returned confidence. Each error is reported as a 2-tuple with elements (code, message), where the code is an error code name, and the message is a text explaining the problem. The error code names are: FaceNotFoundEr- ror, FaceAlignmentError, MoreThanOneFaceEr- ror, NotEnoughVideoDataError, TooShortVideo- Error, and FaceTooSmallForIAS. |
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FormValidationError | Unable to validate form fields |
ExpiredOrInvalidChallengeError | Given challenge is expired or invalid |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/challenges/generation/sequential¶
Generates a random sequential challenge, returning a JWS token (RFC7515) containing a signed JSON with a challenge description. This endpoint is optional and may require a specific agreement.
Aliases for this path:
- /challenges/generation/sequential
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request a random challenge.
Name | Req. | Type | Description |
---|---|---|---|
expiration | no | integer | Expiration time in seconds, by default it is 1800 seconds. |
length | no | integer | Desired length of the challenge, by default it is 3. The minimum is 1 and the maximum is 10. The recommended values are 3 for standard security, and 6 for high security. |
Response: 200
Returns a JWS token containing the challenge description. The challenge is a JSON object.
Content-Type: application/jose
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FormValidationError | Unable to validate form fields |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/credential/photo¶
This endpoint is used to generate a biometric credential from a given image, using the latest available model. This endpoint is optional and may require a specific agreement.
Aliases for this path:
- /credential/photo
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for biometric credential generation.
Name | Req. | Type | Description |
---|---|---|---|
mode | no | string | Configures the operation mode of the biometric model. It can be: - selfie-mode: To configure the system for comparison of two selfie photos. - document-mode: To configure the system for comparison of a selfie photo versus a crop of the face printed in an ID card. By default it is selfie-mode. |
targetImage | yes | file | As multipart/form-data, it should be a file, as ap- plication/json, the file content encoded in base64. |
Response: 200
Returns one biometric credential for the given image file.
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
credential | yes | string | A biometric credential string encoded in base64. |
model | yes | object | An object with two items: hash of the model used to generate the biometric credential, and the op- eration mode used to configure the model. |
Example:
1 2 3 4 5 6 7 |
|
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FaceNotFoundError | Unable to locate face in given image |
FaceAlignmentError | Unable to align face in given image |
MoreThanOneFaceError | More than one face located at given image |
FormValidationError | Unable to validate form fields |
MetadataValidationError | Incorrect metadata in given credential. |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
GET /dasface/v2/models¶
Get the available embedding models and their operation modes. The service receives a GET request and returns a listof all available models and operation modes. Models are identified by a hash number, and they are given a numeric tag. The numeric tag is always a date string in the form YYYYMMDD. The hash is an hexadecimal number represented in a string value. Operation modes are given as a string with words separated by dashes, e.g., selfie-mode. This request also returns a "methods" field, reserved for future uses. This endpoint is optional and may require a specific agreement.
Aliases for this path:
- /models
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Response: 200
Returns list of models sorted by their numeric tag (descending order)
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
models | yes | array | An array with all available models and modes, for each combination, it is indicated: tag, hash, mode, and methods. See the example for more details. |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/models/metadata/from-credential¶
This endpoint retrieves the operational model used to generate an existing biometric credential. This endpoint is optional and may require a specific agreement.
Aliases for this path:
- /models/metadata/from-credential
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for biometric credential metadata.
Name | Req. | Type | Description |
---|---|---|---|
credential | yes | string | A biometric credential as previously generated from an image. It is an string containing the bio- metric credential as returned by the service, that is, in base64 encoding. |
Response: 200
Returns JSON array containing data about operational model used to generate each of the given input biometric credentials
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
metadata | yes | object | An object with three items: hash of the model used to generate the biometric credential, the operation mode used to configure the model, and the latest release tag containing such a model. |
Example |
1 2 3 4 5 6 7 |
|
Response: 400
Request format error.
Content-Type: applciation/json
code | message |
---|---|
ObsoleteCredentialModelError. | The model used to generate the given creden- tial is obsolete. |
FormValidationError | Unable to validate form fields |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/models/{hash}/{mode}/credential/photo¶
This endpoint is used to indicate the system which operational model must be used to generate a biometric credential. This endpoint is optional and may require a specific agreement.
Aliases for this path:
/models/{hash}/{mode}/credential/photo
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. | ||
hash | path | A hash given as hex digest, same as returned by {/v2/models}. | ||
mode | path | A mode given as selfie-mode, document-mode. | document-mode |
Request Body
Returns one biometric credential for the given image file.
Name | Req. | Type | Description |
---|---|---|---|
targetImage | yes | file | As multipart/form-data, it should be a file, as application/json, the file content encoded in base64 |
Response: 200
Returns one biometric credential for the given image file.
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
credential | yes | string | A biometric credential string encoded in base64. |
model | yes | object | An object with two items: hash of the model used to generate the biometric credential, and the operation mode used to configure the model. |
Example |
1 2 3 4 5 6 7 |
|
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FaceNotFoundError | Unable to locate face in given image |
FaceAlignmentError | Unable to align face in given image |
MoreThanOneFaceError | More than one face located at given image |
FormValidationError | Unable to validate form fields |
MetadataValidationError | Incorrect metadata in given credential. |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/verification/credential¶
Computes the face similarity between a face image and a previously generated biometric creden- tial, and returns how similar are both faces. This endpoint is optional and may require a specific agreement.
Aliases for this path:
- /verification/credential
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for face verification with a biometric credential.
Name | Req. | Type | Description |
---|---|---|---|
anchorImage | yes | file | An image containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
targetCredential | yes | string | A biometric credential as previously generated from an image. It is an string containing the bio- metric credential as returned by the service, that is, in base64 encoding. |
Response: 200
Returns the confidence (or similarity) between both faces, being more similar as much close this number is to one. The number is in range [0,1].
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
confidence | yes | number | A probability number in range [0,1]. |
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FaceNotFoundError | Unable to locate face in given image |
FaceAlignmentError | Unable to align face in given image |
MoreThanOneFaceError | More than one face located at given image |
FormValidationError | Unable to validate form fields |
FormatNumberError | Incorrect format number in credential. |
CorruptedSecretError | Unable to decode the credential with known secret pass. |
MetadataEqError | Incompatible metadata in given credentials. |
MetadataValidationError | Incorrect metadata in given credential. |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/verification/photo¶
Computes the face similarity between two face images. The service receives a POST request with two image files containing one face per image, and returns how similar are both faces.
Aliases for this path:
- /verification/photo
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for face verification.
Name | Req. | Type | Description |
---|---|---|---|
anchorImage | yes | file | An image containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
mode | no | string | Configures the operation mode of the biometric model. It can be: - selfie-mode: To configure the system for comparison of two selfie photos. - document-mode: To configure the system for comparison of a selfie photo versus a crop of the face printed in an ID card. By default it is selfie-mode. |
targetImage | yes | file | An image containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
Response: 200
Returns the confidence (or similarity) between both faces, being more similar as much close this number is to one. The number is in range [0,1].
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
confidence | yes | number | A probability number in range [0,1]. |
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FaceNotFoundError | Unable to locate face in given image |
FaceAlignmentError | Unable to align face in given image |
MoreThanOneFaceError | More than one face located at given image |
FormValidationError | Unable to validate form fields |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |
POST /dasface/v2/verification/video¶
Computes similarity between a face photo and a face video. The service receives a POST request with a video and a face photo, and returns the similarity between the face on the video and the face on the image.
Aliases for this path:
- /verification/video
Parameters
Name | In | Description | Default | Example |
---|---|---|---|---|
X-Veridas-RTag | header | This header allows to tag this query with a personal string. This tag needs to be a ASCII string with a maximum size of 64 characters. |
Request Body
Request for video face verification.
Name | Req. | Type | Description |
---|---|---|---|
anchorImage | yes | file | An image containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
targetVideo | yes | file | A video containing the face of a person. When body is multipart/form-data, this field should be a file. When body is application/json, the field must contain the file content encoded in base64. |
Response: 200
Returns the confidence of both faces being different, that is, the closer to 1, the most likely the face in the video is the same in the image.
Content-Type: application/json
Name | Req. | Type | Description |
---|---|---|---|
confidence | yes | number | A probability number in range [0,1]. |
Response: 400
Request format error.
Content-Type: application/json
code | message |
---|---|
FaceNotFoundError | Unable to locate face in given image |
FaceAlignmentError | Unable to align face in given image |
MoreThanOneFaceError | More than one face located at given image |
ZeroLengthVideoError | An empty video was received |
VideoExtractionError | Unable to decode/extract video data |
InvalidFPSVideoError | Retrieved FPS number is invalid |
InvalidNumFramesVideoError | Retrieved number of frames is invalid |
FormValidationError | Unable to validate form fields |
Response: 415
Incorrect request media type.
Content-Type: application/json
code | message |
---|---|
UnsupportedMediaTypeError | Request media type is not supported by the server. |
Response: 500
Server error response.
Content-Type: application/json
code | message |
---|---|
ServerError | Internal Server Error |