Build

Real-time Image Moderation for Chat with Sightengine

2 min readPubNub Staff on Nov 17, 2016
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

Sightengine provides a simple API to analyze, moderate, and filter an image for nudity, profile image validation, or type check. Sightengine could be integrated to monitor a discussion group or forum,...

Sightengine provides a simple API to analyze, moderate, and filter an image for nudity, profile image validation, or type check. Sightengine could be integrated to monitor a discussion group or forum, and filter out user-generated photos that break code of conduct instantly. And now with the Sightengine PubNub Block for image moderation, you can scan and filter images in a real-time chat application or casual game, any app where users are sending and receiving images in real time.

Getting Started with Image Moderation

Getting started with Sightengine and BLOCKS couldn’t be easier. Head over to the BLOCKS catalog and click ‘Try it Now’. Create your free PubNub account first if you don’t already have one. Follow the prompts to create a copy of the Sightengine Block. Next you’ll need to get and write down your API user and API secret values.

Scroll down to where it says API key in the block code, and put in your API secret value. Now start the block. You can use the existing test payload or change it to your own. Just set the ‘image’ value to the url of an image you want to test. For example:

{
   "image": "http://38.media.tumblr.com/87cae843de33f3177c96fc2f7be17818/tumblr_inline_nfglzlv7971s6lw3t.jpg"
}

Now press the publish button to see the result. You will get something back like this:

{
   "nudity": { 
       "raw": 0.034964, 
       "partial": 0.043041, 
       "safe": 0.921994 
   },
   "media": {
       "uri":
         "http://38.media.tumblr.com/87cae843de33f3177c96fc2f7be17818/tumblr_inline_nfglzlv7971s6lw3t.jpg" 
   }
}

And that’s it!

With Sightengine you can scan for unsafe images in any message with their simple API. Beyond nudity detection, you can detect faces and people or determine if an image is a natural scene or an illustration, great functionality for any real-time application that involves user generation and submission of images.

More from PubNub

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff

Another Step Towards Data Security: ISO-27001 Implementation
BuildMay 2, 20221 min read

Another Step Towards Data Security: ISO-27001 Implementation

Today, we are glad to announce that we are currently in the process of implementing ISO-27001 security standards.

PubNub Staff

PubNub Staff

Improving Virtual Care in a Post-Pandemic World
News Apr 14, 20221 min read

Improving Virtual Care in a Post-Pandemic World

Meg Barron, VP of Digital Health Strategy at the AMA, talks with PubNub’s COO, Casey Clegg, about what’s next for the healthcare...

PubNub Staff

PubNub Staff