Handle the image

AI Tools

After capturing the image with the face capture module, you can make a request to our Age estimation endpoint to verify an individuals age. A base64 image will need to be sent in the request body to the following endpoint:

HTTP
Copy

Headers explained

HeaderDescription
Yoti-Sdk-IdYour unique Sdk id
Content-Typemultipart/form-data; boundary

Request Body

The request body must be sent as multipart form-data along with the relevant boundary.

form-data
Copy
ParameterContent-TypeTypeDescription
imageapplication/octet-streamBase64 encoded imageImage of the user that the age estimation is performed on.
biometric_consenttext/plainBiometric timestamp stringTimestamp in UTC when the image of the user is captured.
secure_tokentext/plainSecure TokenPayload from FCM capture returned in the secure field.

Response Body

The response body is returned with the content type of application/json.

Successful (Complete) Response

JSON
Copy

Successful (Fail) Response

JSON
Copy

Error Response

JSON
Copy
Error CodeMessage
E600408Spoofing attempt detected
PAYLOAD_TOO_LARGEPayload too large.
IMAGE_NOT_PROVIDEDImage has not been provided.
INVALID_B64_IMAGE
  • Base64 image is incorrectly padded.
  • Cannot create image from base64 decoded bytes
UNSUPPORTED_IMAGE_FORMATImage format not supported. Please use JPEGs (95 to 100 quality) and PNGs.
IMAGE_SIZE_TOO_BIGImage size too big, the maximum size is 1.5MB.
IMAGE_SIZE_TOO_SMALLImage size too small, the minimum size is 50KB.
MIN_HEIGHTThe image height is incorrect. Image minimum height required is 300 pixels.
MAX_HEIGHTThe image height is incorrect. Image maximum height required is 2000 pixels.
MIN_WIDTHThe image width is incorrect. Image minimum width required is 300 pixels.
MAX_WIDTHThe image width is incorrect. Image maximum width required is 2000 pixels.
MIN_PIXELSTo process the image the minimum number of pixels required is 90,000 pixels.
MAX_PIXELSTo process the image the maximum number of pixels required is 2,100,000 pixels.
IMAGE_WRONG_CHANNELSMissing colour channel, the input image must be RGB or RGBA.
IMAGE_GRAYSCALE_NOT_SUPPORTEDGrayscale images not supported.
FACE_NOT_FOUNDFace not found.
MULTIPLE_FACESMultiple faces in the image provided.
FACE_BOX_TOO_SMALLThe face in the image provided is too small.
FACE_TO_IMAGE_RATIO_TOO_LOWFace ratio is lower than the minimum ratio.
FACE_TO_IMAGE_RATIO_TOO_HIGHFace ratio is bigger than the maximum ratio.
INSUFFICIENT_AREA_AROUND_THE_FACEInsufficient area around the face in the image provided.
IMAGE_TOO_BRIGHTImage too bright.
IMAGE_TOO_DARKImage too dark.
INVALID_REQUEST_BODYRequest body is invalid, '-' field is invalid.
UNSPECIFIED_ERRORAn internal server error occurred.

Retries

It's possible to trigger a check again when a success (fail) or an error response is returned with the same session The pre-requisite is that the value of attempts_remaining is greater than zero and retries_depleted is not true.

To trigger the retry check, you have to make the API call again with the same request body as mentioned at the top.

VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches