Face Detection

FREEMIUM
By ModerateContent
Updated 4 months ago
Visual Recognition
5.3/10
Popularity Score
4338ms
Latency
100%
Success Rate

Face Detection API Documentation

Detect faces in images

View API Details
POSTFace Detection - Post
GETFace Detection
POSTFace Detection - Post

Analyze an image and return the coordinates of any detected faces.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
faceSTRING
REQUIREDEnable Face Option
urlSTRING
REQUIREDImage for detection
Code Snippet
unirest.post("https://face-detection4.p.rapidapi.com/api/v2")
.header("X-RapidAPI-Host", "face-detection4.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("face=true")
.send("url=https://www.moderatecontent.com/img/sample_face_5.jpg")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://face-detection4.p.rapidapi.com/api/v2
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://face-detection4.p.rapidapi.com/api/v2")
.header("X-RapidAPI-Host", "face-detection4.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("face=true")
.send("url=https://www.moderatecontent.com/img/sample_face_5.jpg")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication