NSFW Image Classification

FREEMIUM
By inferdo
Updated a month ago
Visual Recognition
6.7/10
Popularity Score
677ms
Latency
100%
Success Rate

NSFW Image Classification API Documentation

Use our Content Moderation API to flag possible inappropriate/ nude / adult content in your images.

View API Details
POSTNSFW Image Classification
POSTNSFW Image Classification

Use our Content Moderation API to flag possible inappropriate content in your images.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
NSFW Image Classification RequestJSON_STRING
REQUIREDURL for image to be passed through the model.
Code Snippet
unirest.post("https://nsfw-image-classification1.p.rapidapi.com/img/nsfw")
.header("X-RapidAPI-Host", "nsfw-image-classification1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"url":"https://www.inferdo.com/img/nsfw-1-raw.jpg"})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://nsfw-image-classification1.p.rapidapi.com/img/nsfw
Request Method: POST
Response Headers
"content-type": "application/json"
"date": "Mon, 15 Jul 2019 22:15:13 GMT"
"server": "RapidAPI-1.0.20"
"via": "1.1 9742923607374c982a5b7e9258144eab.cloudfront.net (CloudFront)"
"x-amz-apigw-id": "c4wlsEtHIAMFxKg="
"x-amz-cf-id": "G87movh6xxz2qW1tiaXc7ABmFgWTI7BY1bb2O_uJd8-NbBED3Sv8FQ=="
"x-amz-cf-pop": "IAD89-C2"
"x-amzn-requestid": "0441a765-a74e-11e9-bde4-797c3040c9ad"
"x-amzn-trace-id": "Root=1-5d2cfaf1-1be8673a86d878c1869809bc;Sampled=0"
"x-cache": "Miss from cloudfront"
"x-rapidapi-region": "AWS - us-east-1"
"x-rapidapi-version": "1.0.20"
"content-length": "33"
"connection": "Close"
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://nsfw-image-classification1.p.rapidapi.com/img/nsfw")
.header("X-RapidAPI-Host", "nsfw-image-classification1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"url":"https://www.inferdo.com/img/nsfw-1-raw.jpg"})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication