Skip to main content

Age Estimation

In FACIA, our Age Estimation service offers a nuanced understanding of an individual's age. This sophisticated feature utilizes advanced algorithms, analyzing facial features and patterns to provide precise age estimations. It stands as a dynamic tool within our system, contributing not only to insightful age assessments but also enhancing the overall versatility of FACIA's facial analysis capabilities.

Create Age Estimation Transaction

This endpoint initiates a transaction request and returns a reference_id if the request includes proper authentication and valid fields, as mentioned below in the request parameters, using the POST method:


Endpoint

POSThttps://api.facia.ai/age-estimation

Authorization:

Token Type: Bearer
Description:

This API utilizes Access token or Client-Secret key in header for authentication.

You can use your client_id and client_secret key when using the "/request-access-token" endpoint to obtain a Bearer token for authorization while connecting to this API. For additional details on Authorization, click Here

Run in Postman

Request Body Samples:

//POST /age-estimation HTTP/1.1
//Host: api.facia.ai
//Content-Type: application/json
//Authorization: Bearer <access-token-here>

{
"type": "age_estimation",
"enroll_face": true,
"wait_for_result": 1,
"file": file.jpg
}

Request Parameter

ParametersDescription
type
Required: Yes
Type: string
Example: type=age_estimation
Type must be age_estimation.
enroll_face
Required: No
Type: boolean
Example: enroll_face=true
Default value: true
If you do not want the system to enroll the face then set the value of the key as false.
file
Required: Yes
Type: file
Example: file=file
File must be of type .jpeg, .jpg or .png.
wait_for_result Required: No
Type: boolean
Default value: 0
Accepted values: 0,1
Set the value of this key as 1 if you want the results of the transaction within the same API request.

Response Sample


{
"status": true,
"message": "Transaction Created",
"result": {
"data": {
"reference_id": "W4437KIWN0KDM13"
}
}
}


Response Parameter

ParametersDescription
reference_id Type: string
Example: reference_id=W4437KIWN0KDM13
message Type: string
Example: message=Transaction created

Age Estimation Result

This endpoint accepts a single field in the body request payload: reference_id (String). Once the backend finalizes the response, this endpoint returns a result object containing an 'age' variable, which is an estimated age of type integer. Failure to provide a valid reference_id will result in a 422 status code.

Endpoint

POSThttps://api.facia.ai/result

Authorization:

Token Type: Bearer
Description:

This API utilizes Access token or Client-Secret key in header for authentication.

You can use your client_id and client_secret key when using the "/request-access-token" endpoint to obtain a Bearer token for authorization while connecting to this API. For additional details on Authorization, click Here

Run in Postman

Request Body Samples:

//POST /result HTTP/1.1
//Host: api.facia.ai
//Content-Type: application/json
//Authorization: Bearer <access-token-here>

{
"reference_id": "W4437KIWN0KDM13"
}

Request Parameter

ParametersDescription
reference_idRequired: Yes
Type: string
Example: reference_id=W4437KIWN0KDM13
The unique identifier associated with the created transaction.

Response Sample



{
"status": true,
"message": "Success",
"result": {
"data": {
"reference_id": "W4437KIWN0KDM13",
"age": "30"
}
}
}



Response Parameter

ParametersDescription
reference_id
Required: Yes
Type: string
Example: reference_id=W4437KIWN0KDM13
age Type: string
Example: age=30
Includes the estimated age from the provided image.