How to Identify NSFW Content in an Image in Go

Ensuring all images portrayed on your website or application meet your content standards can be a constant and lengthy chore. In this brief article, we will show you how to turn the task of detecting undesirable image content into a quick and efficient process by using an API in Go. The API supports most common input image formats, such as PNG and JPG.

To call the image function, we will input the image file and our API key into the following code:

package main

This will promptly return an NSFW score and classification! If you need to retrieve your API key for the operation, head over to the Cloudmersive website to register for a free account; this provides 800 monthly calls across any of our APIs.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.