Compartilhar via


Content Moderator

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 China regions
Power Automate Standard All Power Automate regions except the following:
     -   China Cloud operated by 21Vianet
Power Apps Standard All Power Apps regions except the following:
     -   China Cloud operated by 21Vianet
Contact
Name Microsoft
URL Microsoft LogicApps Support
Microsoft Power Automate Support
Microsoft Power Apps Support
Connector Metadata
Publisher Microsoft
Website https://azure.microsoft.com/services/cognitive-services/content-moderator/

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.

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Shareable

Default

Applicable: All regions

Parameters for creating connection.

This is shareable connection. If the power app is shared with another user, connection is shared as well. For more information, please see the Connectors overview for canvas apps - Power Apps | Microsoft Docs

Name Type Description Required
API Key securestring The API Key for this api True
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'.

Throttling Limits

Name Calls Renewal Period
API calls per connection 1200 60 seconds

Actions

Check if an image contains racy or adult content

Returns probabilities of an image containing racy or adult content.

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.

Detect Language of a given text input content

This operation will detect the language of given input content. Returns the ISO 639-3 code for the predominant language comprising the submitted text. Over 110 languages supported.

Detect profanity and match against custom and shared block lists

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

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.

Find faces in an image content

Find Faces an image content.

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 this API.

Returns ID and tags of matching image.

Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.

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.

Check if an image contains racy or adult content

Returns probabilities of an image containing racy or adult content.

Parameters

Name Key Required Type Description
Image Source
format True string

Source of the image - either included or by reference url.

Image
Image True dynamic

Your image content.

Returns

Name Path Type Description
Adult Classification Score
AdultClassificationScore number

Confidence score of the adult classification.

Is Image Adult Classified
IsImageAdultClassified boolean

Is the image classified as an adult content.

Racy Classification Score
RacyClassificationScore number

Confidence score of the racy classification.

Is Image Racy Classified
IsImageRacyClassified boolean

Is the image classified as a racy content.

Tracking Id
TrackingId 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.

Parameters

Name Key Required Type Description
Team Name
teamName True string

Your team name.

SubTeam
subTeam string

SubTeam of your team, you want to assign the review to.

Content Type
Type True string

Type of the content.

Review Content
Content True string

Image url(for Image type)/text(for Text type) content to review.

Content Id
ContentId True string

Content Identifier.

Callback Endpoint
CallbackEndpoint string

Optional callback endpoint.

Key Parameter
Key True string

Your key parameter.

Value Parameter
Value True string

Your value parameter.

Returns

Name Path Type Description
array of string

Detect Language of a given text input content

This operation will detect the language of given input content. Returns the ISO 639-3 code for the predominant language comprising the submitted text. Over 110 languages supported.

Parameters

Name Key Required Type Description
Content Type
Content-Type True string

Type of the text content.

Text Content
Text Content True binary

Text Content.

Returns

Name Path Type Description
Detected Language
DetectedLanguage string

Detected Language of the text.

Detect profanity and match against custom and shared block lists

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

Parameters

Name Key Required Type Description
Language
language string

Language of the text(E.g. eng for english).

Autocorrect
autocorrect boolean

Autocorrect text.

Personal Identifiable Information
PII boolean

Personal Identifiable Information in the text.

List Id
listId string

Comma separated list Ids.

Classify input
classify boolean

Classify input.

Content Type
Content-Type True string

Content type of the input text.

Text Content
Text Content True binary

Your text content.

Returns

Name Path Type Description
Original Text
OriginalText string

The original text.

Normalized Text
NormalizedText string

The normalized text.

AutoCorrected Text
AutoCorrectedText string

The autocorrected text

Misrepresentation
Misrepresentation array of string

The misrepresentation text details.

Detected Email
PII.Email array of object

Detected Email Details.

Detected Email
PII.Email.Detected string

Detected Email Address from the input text content.

Email Subtype
PII.Email.SubType string

Subtype of the detected Email Address.

Email Address
PII.Email.Text string

Email Address in the input text content.

Email- Index
PII.Email.Index integer

Index(Location) of the Email address in the input text content.

Detected SSN
PII.SSN array of object

Detected SSN details.

SSN
PII.SSN.Text string

Detected SSN.

SSN Index
PII.SSN.Index integer

Index(Location) of the SSN in the input text content.

Detected IP Address
PII.IPA array of object

Detected IP Address Details.

IP Address Subtype
PII.IPA.SubType string

Subtype of the detected IP Address.

IP Address
PII.IPA.Text string

Detected IP Address.

IP Address Index
PII.IPA.Index integer

Index(Location) of the IP Address in the input text content.

Detected Phone Number
PII.Phone array of object

Detected phone number details.

Phone CountryCode
PII.Phone.CountryCode string

Country Code of the detected Phone number.

Phone Number
PII.Phone.Text string

Detected Phone number.

Phone Index
PII.Phone.Index integer

Index(Location) of the Phone number in the input text content.

Detected Address
PII.Address array of object

Detected address details.

Address
PII.Address.Text string

Detected Address from the input text content.

Address - Index
PII.Address.Index integer

Index(Location) of the Address in the input text content.

Category1 Score
Classification.Category1.score double

The category1 score details of the text. Click here for more details on category classification.

Category2 Score
Classification.Category2.score double

The category2 score details of the text. Click here for more details on category classification.

Category3 Score
Classification.Category3.score double

The category3 score details of the text. Click here for more details on category classification.

Review Recommended
Classification.ReviewRecommended boolean

The review recommended flag status.

Text Language
Language string

Language of the input text content.

Detected profanity terms
Terms array of object

Detected profanity term details.

Term Index
Terms.Index integer

Index(Location) of the detected profanity term in the input text content.

Term Original Index
Terms.OriginalIndex integer

Original Index(Location) of the detected profanity term in the input text content.

Terms List Id
Terms.ListId integer

Matched Terms list Id.

Detected Term
Terms.Term string

Detected profanity term.

Tracking Id
TrackingId 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.

Parameters

Name Key Required Type Description
Team Name
teamName True string

Your Team Name.

Content Type
ContentType True string

Type of the content.

Content Id
ContentId True string

Content Identifier.

Select Workflow
WorkflowName True string

Select the workflow that you want to invoke.

CallBack Endpoint
CallBackEndpoint string

CallBack Endpoint.

Content Value
ContentValue True string

Content to evaluate for a job.

Returns

Name Path Type Description
Job Id
JobId string

Job Id for the content posted.

Find faces in an image content

Find Faces an image content.

Parameters

Name Key Required Type Description
Image Source
format True string

Source of the image - either included or by reference url.

Image
Image True dynamic

Your Image Content.

Returns

Name Path Type Description
Tracking Id
TrackingId string

Unique Content Moderator transaction Id.

Cache Id
CacheId string

Cache Id.

Face Count
Count number

Number of faces detected in an image.

Detected face position
Faces array of object

Detected face position.

Bottom Location
Faces.Bottom number

Bottom Location of the detected face.

Left Location
Faces.Left number

Left Location of the detected face.

Right Location
Faces.Right number

Right Location of the detected face.

Top Location
Faces.Top 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 this API.

Returns ID and tags of matching image.

Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.

Parameters

Name Key Required Type Description
List Id
listId string

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

Image Source
format True string

Source of the image - either included or by reference url.

Image
Image True dynamic

Your Image Content.

Returns

Name Path Type Description
Tracking Id
TrackingId string

Unique Content Moderator transaction Id.

Cache Id
CacheId string

Cache Id.

Is Match
IsMatch boolean

Has image matched against input image list ID or your custom image list Ids.

Match Details - Score
MatchDetails.Score number

Confidence score of the image match.

Match Details - Match Id
MatchDetails.MatchId number

Matched custom image list Id.

Match Details - Source
MatchDetails.Source string

Source of the matched image.

Match Details - Tags
MatchDetails.Tags array of number

Tags associated with the matched image.

Match Details - Label
MatchDetails.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.

Parameters

Name Key Required Type Description
Language
language True string

Language of the text(E.g. eng for english).

Image Source
format True string

Source of the image - either included or by reference url.

Image
Image True dynamic

Your Image Content.

Returns

Name Path Type Description
Tracking Id
TrackingId string

Unique Content Moderator transaction Id.

Cache Id
CacheId string

Cache Id.

Text Language
Language string

Language of the text found in the image.

Detected Text
Text string

Text found in the image.

Detected Candidates
Candidates array of object

Detected text candidates found in the image.

Detected text content candidates
Candidates.Text string

Detected text content candidates from the image.

Confidence Score
Candidates.Confidence number

Confidence Score of the detected text content candidate.