Face Detect API
The Face Detect API uses state of the art computer vision algorithms to accurately and efficiently detect faces in images.
From 9,332 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 412ms | 457ms | 459ms | 725ms | 1228ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v1/facedetect POST
https://api.api-ninjas.com/v1/facedetect
Given an input image, returns a list containing all detected faces in the form of bounding boxes.
Files
imagerequiredImage file containing faces. Must be either JPEG or PNG format.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.
xThe x-coordinate of the top-left corner of the bounding box.
yThe y-coordinate of the top-left corner of the bounding box.
widthWidth of the bounding box in pixels.
heightHeight of the bounding box in pixels.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v1/facedetectHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
3
curl -X POST "https://api.api-ninjas.com/v1/facedetect" \
-H "X-Api-Key: YOUR_API_KEY" \
-F "image=@YOUR_IMAGE.jpeg"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
Frequently Asked Questions
Can I use the Face Detect API for commercial purposes?
How do I get an API key and start using the Face Detect API?
What happens if I exceed my quota for the month?
What happens if a request to the Face Detect API fails?
What are some use cases for the Face Detect API?
How do I submit an image to the Face Detect API?
What does the Face Detect API response include?
Does the Face Detect API extract text or read content from images?