AGE & FACE ANALYSIS API

Use our age prediction for your projects

Add fast, accurate age estimation and detailed face geometry to your product through a clear JSON API, with competitive pricing tailored to your usage.

Versioned JSON responses Base64 or image URL input 478 face landmarks

Choose the analysis your product needs

Use age estimation or face mesh analysis, each from a simple, versioned JSON API.

Age estimation API example: a detected face with an estimated age of 25 years and a face boundary box
POST /age

Age estimation

Estimate the apparent age of the primary face and optionally return its boundary box or a base64-encoded face crop.

Default response: age and boundary_box
Try with your photo
Face mesh API example: a face overlaid with 478 facial landmark points
POST /facemesh

Face mesh

Return 478 three-dimensional facial keypoints, with optional frontalized landmarks and head-pose measurements.

Optional outputs: frontalized_keypoints and pose
Try with your photo

Built for useful, predictable integration

The public API wraps the same age-prediction capability used by our web experience and adds a consistent contract for product teams.

Simple image input

Send raw base64, a data URI, or a public HTTP(S) image URL in a JSON request.

Efficient preprocessing

Large images are resized once to a 1000 px maximum side, then shared across combined analysis.

Flexible response data

Request only the boundary box, crop, landmarks, frontalized points, or pose data your workflow uses.

Consistent error model

Versioned responses and stable error codes make validation and failure handling easier to implement.

From image to structured data

A compact request flow keeps integration straightforward.

1

Provide one image source

Send either face_image or face_image_url—never both in the same request.

2

Select the outputs

Use boolean parameters to keep the response focused on the age or face data your application needs.

3

Handle one JSON contract

Read api_version with the requested result, or a structured error code and message.

Image safeguards are built in

Images can be up to 15 MB, with no side over 4500 px. Images above 1000 px on their longest side are downscaled with their aspect ratio preserved.

Tell us what you are building

Contact us to discuss current pricing, expected request volume, and the response data your product needs.

Live Demo

Try age detection on your photo

Upload a face photo to get a live age estimate from our API in seconds. Your photo is sent securely to the API only to run this analysis.

Example API output: a detected face estimated at 25 years old with a face boundary box
Example API output
POST /age Get API access
Click or drag an image here to upload
Single image · PNG, JPG, JPEG or BMP · up to 4500 × 4500 · max 15 MB
Selected image preview
image.jpg
Age estimate
years
estimated apparent age
See the API request behind this result
POST https://api.rate-my-photo.com/age Authorization: Bearer <your token> { "face_image": "<base64>", "return_boundary_box": true, "return_face_base64": true } // 200 OK { "age": 27.4, "boundary_box": { "x":113, "y":89, "width":142, "height":180 } }

Tips for the best results

  • Keep the face roughly upright — within 45° up and 30° down.
  • Limit head turn (yaw) to under 45° in either direction.
  • Both eyes should be open and clearly visible.
  • Leave a little room around the face — avoid tight crops.
  • Remove anything covering the face, like masks or headbands.
  • Use even, flat lighting with no harsh shadows.

API questions

Short answers to the most common integration questions.

The API estimates the age of the primary face detected in the supplied image. If no face can be detected, it returns a structured NO_FACE_DETECTED error.

Yes. Send a request to POST /age with return_facemesh set to true. The age and face mesh models then use the same preprocessed image.

Send an image as base64—optionally with a data-URI prefix—or provide a public HTTP(S) URL that the service can fetch.

Pricing is discussed based on your expected usage and integration needs. Get Access with a short description of your project.

Find Out How Old You Look

Try our AI-powered age detection tool - it's quick, accurate, and completely free!

Try Age Detection Now