nudity-filter

0.1.2 • Public • Published

Sightengine nudity detection - Nudity filter for images

Use the Sightengine nudity API to instantly moderate adult content in user-submitted photos.

Installation

npm install nudity-filter

Instructions

  1. Create an account on http://sightengine.com, you will get your own API_USER and API_SECRET values

  2. Import the Sightengine package

    var SightengineClient = require ('./sightengine');

  3. Initialize the Client with your API_USER and API_SECRET values

    var Sightengine = new SightengineClient(API_USER, API_SECRET);

  4. Moderate your images using either Sightengine.checkNudityForURL or Sightengine.checkNudityForFile. See the example below.

Example

Initialize

// Set your API_USER and API_SECRET values here. See http://sightengine.com to create your account
var API_USER = "";
var API_SECRET = "";

var SightengineClient = require ('./sightengine');
var Sightengine = new SightengineClient(API_USER, API_SECRET);

Moderate an image available over HTTP

var imageurl = "http://url.to/image.jpg";
Sightengine.checkNudityForURL(imageurl, function(error, result) {
  if(error) console.dir(error);
  else console.log(result);
});

Moderate an image available on the local filesystem

var imagepath = "/path/to/image.jpg";
Sightengine.checkNudityForFile(imagepath, function(error, result) {
  if(error) console.dir(error);
  else console.log(result);
});

More information

See Sightengine's website

Package Sidebar

Install

npm i nudity-filter

Weekly Downloads

1

Version

0.1.2

License

none

Last publish

Collaborators

  • davidlis