Getting Started With Microsoft Cognitive Services - Content Moderator API


In this article, we will learn how to get started with Microsoft Azure Cognitive Services – Content Moderator API.


This article is in continuation of my other articles elaborating Cognitive Services. I came across some complicated articles with respect to Cognitive Services, but as I've been working on this service for the last eight months, I thought of writing a simple, step by step article on Cognitive Services.

If you have landed directly on this article, I would recommend you to read the articles mentioned below.

As defined, Cognitive Services provides the best suite for having interactive, automated models of application. It helps to build powerful intelligence into applications to enable natural and contextual interactions.

"Content Moderator"
, as described by Microsoft, "protects your brand and users with automated image, text, and video moderation services and human review tools".

Powered by intelligent machine learning, Microsoft Content Moderator automatically filters out offensive content in images, text, and videos across platforms and includes human review tools for more nuanced cases.

It offers,

  • Image moderation API

    • Assess images for offensive and unwanted content.
    • Supports differing file types, including altered images.
    • Includes optical character recognition (OCR).
    • Also includes face detection.
    • Implements fuzzy matching against custom available lists.

  • Text moderation API

    • Detects obscenity in provided Text.
    • Supports more than 100 languages.
    • Automatically match text against custom lists.
    • Checks for malware and phishing URLS.
    • Also, support checks for personally identifiable information (PII).

  • Video moderation API

    • Proactivly detects adult content in videos.
    • Azure Media Services handles moderation in the cloud.

  • Human Review Tool beta

    • Review tools let us review automated results and approve or change tags to override the automated results.
    • As it uses machine learning and custom lists for moderation, the process gets smarter with using it.

To start with, let's create cognitive account to Content Moderator, using Azure Portal.

Here, let's assume that you have Azure portal account. If not, create your free Azure account.

Once done with the account creation, click '+’ => Category, Intelligence + analytics => Services, Cognitive Services APIs.

Fill in the below details

Account Name
Unique name for Cognitive Content Moderator (preview) account.

Free or in case any subscription you have must be selected here.

API Type
Cognitive Services provides a set of awesome APIs. For this article, we will go with Content Moderator.

Pricing Tier
As per API type selected, pricing option will be listed. Select anyone among the listed options.

Resource Group
Can select existing Resource Group or create new.

Account Name

Have selected my subscription.

Resource Group
Selected existing Resource, name AzureDemo.

API Type
Cognitive Services provides a set of awesome APIs. For this article, will go with Content Moderator.

Currently, the service is in Preview and hence only available at Western US locations. Once we select Computer Moderator from the list of API types, the location would get set to ' West US'


Pricing Tier

For Computer Moderator API type selected, the following pricing options are listed. Let's select "Free" as pricing tier. You can go with other options, which are available in free trial account.

Click on "Legal Terms" option. A blade with detailed terms will be displayed. Read it carefully and then, Click "I Agree" => Create.

After successful creation, the following box could be seen in Dashboard (If would have opted to pin it while creating).

Click on Resource groups => AzureDemo (Resource Group selected) => Overview.

Computer Moderator API type cognitive account created will be listed. Click on account name.

Overview => Will list all the details associated with Computer Moderator API type Cognitive account.

Endpoint is the base URL of Restful Computer Moderator API offerings provided by Microsoft. Will look deep into it in upcoming articles.

Click on Keys under Resource Management. This will list the key details (Key 1, Key 2), which we will be using in our application to leverage Computer Moderator APIs services.

We can also regenerate this Key by clicking the Regenerate Key option available, as shown below.

Click on Quick Start for getting a quick introduction to Cognitive Services, along with API documentation to use Cognitive Computer Moderator API type.


How easy it is to get started with Cognitive Services. By now, we saw how effortlessly we can create Cognitive Services Computer Moderator account, using Microsoft Azure Portal. We can use the Keys being generated, to communicate our app with super intelligent Computer Moderator API offerings.

In later articles, we will use Keys and look at how this could be used in our application. I would recommend trying this and being ready with Keys.

Happy Azure coding !!!

Up Next
    Ebook Download
    View all
    View all