Estimate Age
Server-to-Server
Estimate Age
Estimate the age range and gender from a single face image
POST
Estimate Age
Request
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
Content-Type | Yes | multipart/form-data or application/json |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
image | binary | string | Yes | The image. For multipart, the file part. For JSON, a base64, base64url, or S3-key string. |
Example request
Response
200 — Success
| Field | Type | Description |
|---|---|---|
faceDetected | boolean | True when a face was detected |
estimatedAge | integer | Single age estimate (midpoint of the range). Omitted if no face |
ageRange | object | { low, high } integer age band. Omitted if no face |
gender | string | male or female. Omitted if no face |
genderConfidence | number (0–1) | Confidence of the gender classification. Omitted if no face |
Error responses
| Status | Description |
|---|---|
400 | Invalid body, unsupported image format, or image larger than 15 MB |
401 | Missing or invalid x-api-key |
402 | Insufficient token balance |
403 | The supplied image S3 key is not readable by this organization |
429 | Rate limit exceeded |
500 | Unexpected server error — safe to retry with backoff |
Interpreting the range
The returned range is broad by design — Rekognition estimates an age band, not a single value. A common pattern is:- If
ageRange.low >= your_minimum_age, accept immediately. - If
ageRange.high < your_minimum_age, reject immediately. - Otherwise the user falls in the ambiguous band — fall back to a full ID-based verification via
/v1/document/scanor/v1/identity/verify.
Age estimation is probabilistic and should not be used as a sole signal for
regulated age checks (alcohol, tobacco, gambling). Combine it with an ID
scan when compliance matters.