Content Moderator (Preview)

Content Moderator (Preview)

Content Moderator is a Microsoft Cognitive Services product which provides machine-assisted moderation of text and images for potentially offensive or unwanted content, augmented with built-in human review tools

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
Flow Standard All Flow regions except the following:
     -   US Government (GCC)
PowerApps Standard All PowerApps regions except the following:
     -   US Government (GCC)

Use the API to scan your content and use the resulting insights to either act or make it available in the review tool for human moderators to take final decisions.

When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. This API is currently available in West US, East US 2, West Central US, West Europe, and Southeast Asia.

Throttling Limits

Name Calls Renewal Period
API calls per connection 1200 60 seconds

Creating a connection

To connect your account, you will need the following information:

API Key
securestring
The API Key for this api
Site URL
string
Root site url (Example: https://westus.api.cognitive.microsoft.com ).If not specified site url will be defaulted to 'https://westus.api.cognitive.microsoft.com'.

Actions

Check if an image contains racy or adult content

Returns probabilities of an image containing racy or adult content.

Required Parameters

Image Source
string
Source of the image - either included or by reference url.
Image
dynamic
Your image content.

Returns

Adult Classification Score
number
Confidence score of the adult classification.
Is Image Adult Classified
boolean
Is the image classified as an adult content.
Racy Classification Score
number
Confidence score of the racy classification.
Is Image Racy Classified
boolean
Is the image classified as a racy content.
Tracking Id
string
Unique Content Moderator transaction Id.

Create Reviews for Reviewers in your moderation team

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

Required Parameters

Team Name
string
Your team name.
Content Type
string
Type of the content.
Review Content
string
Image url(for Image type)/text(for Text type) content to review.
Content Id
string
Content Identifier.
Key Parameter
string
Your key parameter.
Value Parameter
string
Your value parameter.

Optional Parameters

SubTeam
string
SubTeam of your team, you want to assign the review to.
Callback Endpoint
string
Optional callback endpoint.

Returns

array of string
The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

Detect Language of a given text input content

This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported.

Required Parameters

Content Type
string
Type of the text content.
Text Content
binary
Text Content.

Returns

Detected Language
string
Detected Language of the text.

Detect profanity and match against custom and shared blacklists

Detects profanity in more than 100 languages and match against custom and shared blacklists.

Required Parameters

Content Type
string
Content type of the input text.
Text Content
binary
Your text content.

Optional Parameters

Language
string
Language of the text(E.g. eng for english).
Autocorrect
boolean
Autocorrect text.
Personal Identifiable Information
boolean
Personal Identifiable Information in the text.
List Id
string
Comma separated list Ids.
Classify input
boolean
Classify input.

Returns

Original Text
string
The original text.
Normalized Text
string
The normalized text.
AutoCorrected Text
string
The autocorrected text
Misrepresentation
array of string
The misrepresentation text details.
Detected Email
array of object
Detected Email Details.
Detected Email
string
Detected Email Address from the input text content.
Email Subtype
string
Subtype of the detected Email Address.
Email Address
string
Email Address in the input text content.
Email- Index
integer
Index(Location) of the Email address in the input text content.
Detected SSN
array of object
Detected SSN details.
SSN
string
Detected SSN.
SSN Index
integer
Index(Location) of the SSN in the input text content.
Detected IP Address
array of object
Detected IP Address Details.
IP Address Subtype
string
Subtype of the detected IP Address.
IP Address
string
Detected IP Address.
IP Address Index
integer
Index(Location) of the IP Address in the input text content.
Detected Phone Number
array of object
Detected phone number details.
Phone CountryCode
string
Country Code of the detected Phone number.
Phone Number
string
Detected Phone number.
Phone Index
integer
Index(Location) of the Phone number in the input text content.
Detected Address
array of object
Detected address details.
Address
string
Detected Address from the input text content.
Address - Index
integer
Index(Location) of the Address in the input text content.
Category1 Score
double
The category1 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
Category2 Score
double
The category2 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
Category3 Score
double
The category3 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
Review Recommended
boolean
The review recommended flag status.
Text Language
string
Language of the input text content.
Detected profanity terms
array of object
Detected profanity term details.
Term Index
integer
Index(Location) of the detected profanity term in the input text content.
Term Original Index
integer
Original Index(Location) of the detected profanity term in the input text content.
Terms List Id
integer
Matched Terms list Id.
Detected Term
string
Detected profanity term.
Tracking Id
string
Unique Content Moderator transaction Id.

Execute desired workflow in your team to evaluate image or text content

A job Id will be returned for the Image or Text content posted on this endpoint. Once the content is evaluated against the Workflow provided, a review will be created or ignored based on the workflow expression.

Required Parameters

Team Name
string
Your Team Name.
Content Type
string
Type of the content.
Content Id
string
Content Identifier.
Select Workflow
string
Select the workflow that you want to invoke.
Content Value
string
Content to evaluate for a job.

Optional Parameters

CallBack Endpoint
string
CallBack Endpoint.

Returns

Job Id
string
Job Id for the content posted.

Find faces in an image content

Find Faces an image content.

Required Parameters

Image Source
string
Source of the image - either included or by reference url.
Image
dynamic
Your Image Content.

Returns

Tracking Id
string
Unique Content Moderator transaction Id.
Cache Id
string
Cache Id.
Face Count
number
Number of faces detected in an image.
Detected face position
array of object
Detected face position.
Bottom Location
number
Bottom Location of the detected face.
Left Location
number
Left Location of the detected face.
Right Location
number
Right Location of the detected face.
Top Location
number
Top Location of the detected face.

Match an image against one of your custom image lists

Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.

Required Parameters

Image Source
string
Source of the image - either included or by reference url.
Image
dynamic
Your Image Content.

Optional Parameters

List Id
string
Optionally specify a listId to match against. If not specified, the image would matched against all your Image Lists.

Returns

Tracking Id
string
Unique Content Moderator transaction Id.
Cache Id
string
Cache Id.
Is Match
boolean
Has image matched against input image list ID or your custom image list Ids.
Match Details - Score
number
Confidence score of the image match.
Match Details - Match Id
number
Matched custom image list Id.
Match Details - Source
string
Source of the matched image.
Match Details - Tags
array of number
Tags associated with the matched image.
Match Details - Label
string
Matched image label.

Return any text found in an image for the specified language

Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.

Required Parameters

Language
string
Language of the text(E.g. eng for english).
Image Source
string
Source of the image - either included or by reference url.
Image
dynamic
Your Image Content.

Returns

Tracking Id
string
Unique Content Moderator transaction Id.
Cache Id
string
Cache Id.
Text Language
string
Language of the text found in the image.
Detected Text
string
Text found in the image.
Detected Candidates
array of object
Detected text candidates found in the image.
Detected text content candidates
string
Detected text content candidates from the image.
Confidence Score
number
Confidence Score of the detected text content candidate.