Image Moderation - Match File Input

Fuzzily match an image against one of your custom image lists. You can create and manage your custom image lists by using this API.

Returns the ID and tags of a matching image.

Note: You must refresh the index on the corresponding image list to ensure that additions and removals are reflected in the response.

POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/Match
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/Match?overload=stream&listId={listId}&CacheImage={CacheImage}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Azure Cognitive Services endpoints (protocol and host name, such as https://westus.api.cognitive.microsoft.com).

CacheImage
query

boolean

Whether to retain the submitted image for future use. If it's omitted, the default is false.

listId
query

string

List ID.

Request Header

Media Types: "image/gif", "image/jpeg", "image/png", "image/bmp", "image/tiff"

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Request Body

Media Types: "image/gif", "image/jpeg", "image/png", "image/bmp", "image/tiff"

Name Type Description
ImageStream

object

Image file.

Responses

Name Type Description
200 OK

MatchResponse

Supported values for tags are:

  • 101: Nudity
  • 102: Sexual Content
  • 201: Alcohol
  • 202: Tobacco
  • 203: Drugs
  • 301: Child Exploitation
  • 401: Violence
  • 402: Weapons
  • 403: Gore
  • 501: Profanity
  • 502: Vulgarity
.
Other Status Codes

APIError

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Definitions

Name Description
APIError

Error information that the API returns.

Error

Error body.

Match

Match details.

MatchResponse

Response for a match request.

Status

Status properties.

APIError

Error information that the API returns.

Name Type Description
Error

Error

Error body.

Error

Error body.

Name Type Description
Code

string

Message

string

Match

Match details.

Name Type Description
Label

string

Label.

MatchId

integer

Match ID.

Score

number

Confidence score of the image match.

Source

string

Source.

Tags

integer[]

Tags for match details.

MatchResponse

Response for a match request.

Name Type Description
CacheID

string

Cache ID.

IsMatch

boolean

Indicates if there is a match.

Matches

Match[]

Match details.

Status

Status

Evaluation status.

TrackingId

string

Tracking ID.

Status

Status properties.

Name Type Description
Code

integer

Status code.

Description

string

Status description.

Exception

string

Exception status.