m2pfintech
API LibraryMl falcon fly

Age Detection

Analyze an image to estimate the age of detected persons, supporting both face images and identity documents. Returns estimated age and cropped face for each detected face.

The Age Detection API analyzes a submitted image and estimates the age of the person detected in it. It supports both face images and identity document images, returning a detected age value along with a cropped face image for each face found.

How It Works

Submit a Base64-encoded image along with the document type. The API detects faces in the image, estimates the age of each detected face, and returns the results as an array — each entry containing the estimated age and a cropped face image.

Request Parameters

ParameterTypeLocationRequiredDescription
apikeystringHeaderYesAPI key provided by Syntizen. Pass 0 to skip encryption.
authkeystringHeaderYesAuthentication token obtained from the /userauthentication endpoint.
rrnstringBodyYesRequest Reference Number — any unique identifier for the transaction (e.g., "TXN001").
adimagestringBodyYesBase64-encoded image to analyze. Supported formats: JPG, PNG.
doctypestringBodyYesType of image being submitted. Use face for a selfie/portrait or document for an identity document containing a photo.

doctype Values

ValueDescription
faceA selfie or portrait image directly showing a person's face.
documentAn identity document image (e.g., Aadhaar, PAN) containing a face photo.

Image Guidelines

  • Supported formats: JPG, PNG.
  • The face must be clearly visible, well-lit, and forward-facing.
  • Avoid heavy occlusions such as sunglasses, hats, or masks.
  • For document images, ensure the photo on the document is sharp and unobstructed.

Response

On success, the API returns a data array where each item contains:

  • age — estimated age of the detected person.
  • image — Base64-encoded cropped face extracted from the input image.
POST
/AgeDetection

Authorization

AuthKeyAuth
authkey<token>

Authentication token obtained from /userauthentication endpoint

In: header

Header Parameters

apikey*string

API key provided by Syntizen

authkey*string

Authentication token obtained from /userauthentication endpoint

Request Body

application/json

adimage*string

Base64 image(jpg, png)

doctype*string

Type of the image (document, face image)

rrn*string

Request Reference Number, any unique number for the identification of transaction

Response Body

application/json

application/json

application/json

curl -X POST "https://api.syntizen.com/AgeDetection" \  -H "apikey: 0" \  -H "authkey: string" \  -H "Content-Type: application/json" \  -d '{    "adimage": "/9j/ZswBL72vylZ+XhCdoexp1Dv/AOVvmT+uXXVvxqGXHyHa4HNbtwuXnmMkhkBid5h2tctYz5P/2Q==",    "doctype": "face",    "rrn": "456447"  }'

{
  "respcode": "200",
  "respdesc": "Success.",
  "rrn": "456447",
  "data": [
    {
      "age": "5",
      "image": "/9j/4AAQSkZJRgABAQAAAQABAAD..."
    }
  ]
}

{
  "respcode": "400",
  "respdesc": "Bad Request - Missing or invalid request parameters"
}
{
  "respcode": "401",
  "respdesc": "Unauthorized - Invalid or expired auth key"
}

On this page