#
Demographic Estimation API
#
Overview
The Demographic Estimation API provides AI-powered age estimation and gender detection services for faces in images. This API enables applications to analyze demographic characteristics of individuals for age verification, audience analytics, and personalized user experiences.
Key Features:
- Age Estimation: Predict the age of detected faces with uncertainty scores
- Gender Detection: Identify the gender of detected faces
- Multi-Face Support: Process multiple faces in a single image
- High Accuracy: State-of-the-art AI models for demographic analysis
- Regional Deployment: Available in multiple regions for low latency
#
Base URLs
#
API Endpoints
#
1. Get Age Estimation
Estimates the age of faces detected in an image.
Endpoint: POST /v1/demographic-estimation/get-age
Request Body:
{
"image": {
"bytes": "base64-encoded-image-string",
"url": null
},
"maxFaceCount": 1
}
Request Parameters:
image.bytes(string): Base64-encoded JPEG or PNG imageimage.url(string, optional): URL of the image (alternative to bytes)maxFaceCount(integer, default: 1): Maximum number of faces to process
Response:
{
"faces": [
{
"face": {
"confidence": 0.9987,
"boundingBox": {
"x": 120,
"y": 80,
"width": 200,
"height": 250
}
},
"age": {
"prediction": 28.5,
"uncertainty": 0.45
}
}
],
"unprocessedFaceCount": 0
}
Response Fields:
faces: Array of detected faces with age estimationsface.confidence: Face detection confidence score [0.0, 1.0]face.boundingBox: Face location (X, Y, Width, Height in pixels)age.prediction: Estimated age in yearsage.uncertainty: Uncertainty score [0.0, infinity] (recommend rejecting values > 1.0)
unprocessedFaceCount: Number of faces not processed due tomaxFaceCountlimit
cURL Example:
curl -X POST "https://demographic-estimation-api-eu.realeyes.ai/v1/demographic-estimation/get-age" \
-H "Authorization: ApiKey YWJjMTIzOnh5ejc4OQ==" \
-H "Content-Type: application/json" \
-d '{
"image": {
"bytes": "/9j/4AAQSkZJRgABAQEAYABgAAD..."
},
"maxFaceCount": 5
}'
#
2. Get Gender Detection
Detects the gender of faces in an image.
Endpoint: POST /v1/demographic-estimation/get-gender
Request Body:
{
"image": {
"bytes": "base64-encoded-image-string",
"url": null
},
"maxFaceCount": 1
}
Request Parameters:
image.bytes(string): Base64-encoded JPEG or PNG imageimage.url(string, optional): URL of the image (alternative to bytes)maxFaceCount(integer, default: 1): Maximum number of faces to process
Response:
{
"faces": [
{
"face": {
"confidence": 0.9987,
"boundingBox": {
"x": 120,
"y": 80,
"width": 200,
"height": 250
}
},
"gender": "Male"
}
],
"unprocessedFaceCount": 0
}
Response Fields:
faces: Array of detected faces with gender detection resultsface.confidence: Face detection confidence score [0.0, 1.0]face.boundingBox: Face location (X, Y, Width, Height in pixels)gender: Detected gender ("Male"or"Female")
unprocessedFaceCount: Number of faces not processed due tomaxFaceCountlimit
cURL Example:
curl -X POST "https://demographic-estimation-api-eu.realeyes.ai/v1/demographic-estimation/get-gender" \
-H "Authorization: ApiKey YWJjMTIzOnh5ejc4OQ==" \
-H "Content-Type: application/json" \
-d '{
"image": {
"bytes": "/9j/4AAQSkZJRgABAQEAYABgAAD..."
},
"maxFaceCount": 5
}'
#
Common Response Codes
#
Swagger Documentation
Interactive API documentation is available via Swagger UI:
- EU: https://demographic-estimation-api-eu.realeyes.ai/swagger
- US: https://demographic-estimation-api-us.realeyes.ai/swagger
Last updated: 2026-01-27