Facial Recognition API — Detect, Analyze & Compare Faces
Advanced facial analysis API for face detection, age/gender/emotion estimation, celebrity recognition, face comparison, and custom face re-identification repositories. Scalable, low-latency, cloud-based.
Features
Face Detection
Detect multiple faces in a single image with precise bounding boxes and 7 facial landmarks.
Age, Gender & Emotion
Estimate age range, gender, smile, eyeglasses, sunglasses, and dominant emotion for each face.
Celebrity Recognition
Identify celebrities in images with name and reference URLs. Separates recognized and unrecognized faces.
Face Comparison
Compare faces from two images to find matches — perfect for verification and identity confirmation.
Face Repositories
Create custom face databases to store, manage, and search facial features for re-identification.
Cloud-Based & Scalable
Low latency, high availability. Analyze large volumes of images without managing any infrastructure.
API Reference
10 endpoints, simple integration. Here's everything you need.
Supported Content Types
https://faceanalyzer-ai.p.rapidapi.com/faceanalysisDetect faces in an image with landmarks, gender, age range, smile, eyeglasses, sunglasses, and emotion estimation.
imagefilerequiredImage file to analyze — use with multipart/form-data
urlstringrequiredPublic URL of the image — use with application/x-www-form-urlencoded
Send either image (file upload) or url, not both.
{
"statusCode": 200,
"body": {
"faces": [
{
"boundingBox": { "topLeft": { "x": 0.28, "y": 0.12 }, "bottomRight": { "x": 0.72, "y": 0.85 } },
"facialFeatures": {
"Gender": "Male",
"Smile": true,
"Eyeglasses": false,
"Sunglasses": false,
"AgeRange": { "Low": 25, "High": 35 },
"Emotions": ["HAPPY"]
},
"landmarks": {
"eyeLeft": { "center": { "x": 0.38, "y": 0.40 } },
"eyeRight": { "center": { "x": 0.62, "y": 0.40 } },
"mouth": { "left": { "x": 0.40, "y": 0.70 }, "right": { "x": 0.60, "y": 0.70 } },
"nose": { "center": { "x": 0.50, "y": 0.55 } }
}
}
]
}
}https://faceanalyzer-ai.p.rapidapi.com/celebrity-recognitionRecognize celebrities in an image. Returns celebrity names, info URLs, and facial features for each recognized face.
imagefilerequiredImage file to analyze — use with multipart/form-data
urlstringrequiredPublic URL of the image — use with application/x-www-form-urlencoded
Send either image or url, not both.
{
"statusCode": 200,
"body": {
"celebritiesFaces": [
{
"boundingBox": { ... },
"facialFeatures": { ... },
"landmarks": { ... },
"celebrityName": "John Doe",
"celebrityUrlsInfo": ["https://..."]
}
],
"unrecognizedFaces": [
{
"boundingBox": { ... },
"facialFeatures": { ... },
"landmarks": { ... }
}
]
}
}https://faceanalyzer-ai.p.rapidapi.com/compare-facesCompare faces from two different images. Returns matched and unmatched faces from the target image.
source_imagefilerequiredSource face image file — use with multipart/form-data
source_image_urlstringrequiredSource face image URL — use with form-urlencoded
target_imagefilerequiredTarget image to search for matching faces — file upload
target_image_urlstringrequiredTarget image URL to search for matching faces
Send either source_image or source_image_url, and either target_image or target_image_url.
{
"statusCode": 200,
"body": {
"matchedFaces": [
{ "boundingBox": { ... }, "landmarks": { ... } }
],
"unmatchedFaces": [
{ "boundingBox": { ... }, "landmarks": { ... } }
]
}
}https://faceanalyzer-ai.p.rapidapi.com/create-facial-repositoryCreate a custom facial repository to store facial features for re-identification.
repository_idstringrequiredUnique identifier for the new repository
{
"statusCode": 200,
"body": {
"message": "OK"
}
}https://faceanalyzer-ai.p.rapidapi.com/delete-facial-repositoryDelete an existing facial repository and all its stored faces.
repository_idstringrequiredID of the repository to delete
{
"statusCode": 200,
"body": {
"message": "OK"
}
}https://faceanalyzer-ai.p.rapidapi.com/list-facial-repositoriesList all created facial repositories.
{
"statusCode": 200,
"body": {
"FacialRepositoriesId": ["repo-1", "repo-2"]
}
}https://faceanalyzer-ai.p.rapidapi.com/save-face-in-repositorySave a face's features from an image into a repository for later re-identification.
imagefilerequiredImage containing the face — use with multipart/form-data
urlstringrequiredPublic URL of the image — use with form-urlencoded
repository_idstringrequiredID of the target repository
external_idstringrequiredExternal identifier for the face (e.g. person name)
max_facesnumberMaximum number of faces to save from the image
Send either image or url, not both.
{
"statusCode": 200,
"body": {
"FacesId": ["face-id-1", "face-id-2"]
}
}https://faceanalyzer-ai.p.rapidapi.com/list-repository-facesList all faces stored in a specific repository.
repository_idstringrequiredID of the repository (query string parameter)
{
"statusCode": 200,
"body": {
"Faces": [
{ "FaceId": "...", "ExternalImageId": "..." }
]
}
}https://faceanalyzer-ai.p.rapidapi.com/delete-face-from-repositoryDelete one or more faces from a repository.
repository_idstringrequiredID of the repository
face_idsarrayrequiredArray of face IDs to delete
{
"statusCode": 200,
"body": {
"message": "OK"
}
}https://faceanalyzer-ai.p.rapidapi.com/search-face-in-repositorySearch for a face in a repository by providing an image. Returns matching faces with similarity scores.
imagefilerequiredImage containing the face to search — use with multipart/form-data
urlstringrequiredPublic URL of the image — use with form-urlencoded
repository_idstringrequiredID of the repository to search in
Send either image or url, not both.
{
"statusCode": 200,
"body": {
"SearchedFaceBoundingBox": { ... },
"FaceMatches": [
{
"Similarity": 98,
"Face": {
"FaceId": "...",
"BoundingBox": { ... },
"ExternalImageId": "..."
}
}
]
}
}Response
Returns JSON with detected faces, facial features, landmarks, and endpoint-specific data (celebrity info, matches, repository entries).
Quick Start
Copy-paste code to get started in seconds. Replace YOUR_API_KEY with your RapidAPI key.
# Face Analysis
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/faceanalysis" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-F "image=@photo.jpg"
# Celebrity Recognition
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/celebrity-recognition" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-d "url=https://example.com/celeb.jpg"
# Compare Faces
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/compare-faces" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-F "source_image=@person1.jpg" \
-F "target_image=@group.jpg"
# Search Face in Repository
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/search-face-in-repository" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-F "image=@person.jpg" \
-F "repository_id=my-repo"Pricing
Start free, scale as you grow. All plans include full API access with no credit card required for the free tier.
Basic
30 requests/mo
- Full API access
- All endpoints
- Standard support
Pro
5,000 requests/mo
- Full API access
- All endpoints
- Standard support
Ultra
10,000 requests/mo
- Full API access
- All endpoints
- Standard support
Mega
50,000 requests/mo
- Full API access
- All endpoints
- Standard support
Frequently Asked Questions
- What can the Face Analyzer API detect in an image?
- The Face Analyzer API detects faces and returns detailed facial attributes including age range, gender, smile, eyeglasses, sunglasses, dominant emotion, and 7 facial landmarks. It also supports celebrity recognition, face comparison between two images, and custom face re-identification repositories.
- How does the face comparison feature work?
- The face comparison endpoint accepts a source image and a target image, then identifies whether the same person appears in both. It returns matched and unmatched faces with bounding boxes, making it ideal for identity verification, access control, and attendance systems.
- Can I build a facial recognition system with this API?
- Yes. The Face Analyzer API provides facial repository endpoints that let you create custom face databases, store facial features with external IDs, and search for matching faces by similarity score. This enables scalable face re-identification workflows without managing your own ML infrastructure.
Tutorials & Guides
Learn how to integrate this API with step-by-step tutorials and real-world use cases.

Face Matching in 5 Lines of Python: Detect, Encode, Compare
How face matching works under the hood and how to implement it in 5 lines of Python. Covers face detection, embedding vectors, and similarity comparison with real test results.

Verify User Identity with a Face Comparison API
Verify user identity by comparing a selfie against an ID photo with a face comparison API. Covers KYC, profile verification, and fraud prevention.

Build Face-Based Access Control with a Comparison API
Build a facial recognition access control system with a face comparison API. Covers enrollment, verification, and repository management.

Building a Face Detection App with a REST API
Step-by-step tutorial for building a face detection application using a REST API. Includes cURL, Python, and JavaScript code examples with the Face Analyzer API.
Start Using Face Analyzer Today
Sign up on RapidAPI to get your API key. The free tier includes generous monthly requests — no credit card required.