{ "swagger": "2.0", "info": { "title": "Content Moderator - Moderate", "version": "1.0", "description": "You use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.\n\nWhen using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. \nText can be at most 1024 characters long. \nIf the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.\n\nThis API is currently available in:\n\n* Australia East - australiaeast.api.cognitive.microsoft.com\n* Brazil South - brazilsouth.api.cognitive.microsoft.com\n* Canada Central - canadacentral.api.cognitive.microsoft.com\n* Central India - centralindia.api.cognitive.microsoft.com\n* Central US - centralus.api.cognitive.microsoft.com\n* East Asia - eastasia.api.cognitive.microsoft.com\n* East US - eastus.api.cognitive.microsoft.com\n* East US 2 - eastus2.api.cognitive.microsoft.com\n* France Central - francecentral.api.cognitive.microsoft.com\n* Japan East - japaneast.api.cognitive.microsoft.com\n* Japan West - japanwest.api.cognitive.microsoft.com\n* Korea Central - koreacentral.api.cognitive.microsoft.com\n* North Central US - northcentralus.api.cognitive.microsoft.com\n* North Europe - northeurope.api.cognitive.microsoft.com\n* South Africa North - southafricanorth.api.cognitive.microsoft.com\n* South Central US - southcentralus.api.cognitive.microsoft.com\n* Southeast Asia - southeastasia.api.cognitive.microsoft.com\n* UK South - uksouth.api.cognitive.microsoft.com\n* West Central US - westcentralus.api.cognitive.microsoft.com\n* West Europe - westeurope.api.cognitive.microsoft.com\n* West US - westus.api.cognitive.microsoft.com\n* West US 2 - westus2.api.cognitive.microsoft.com" }, "host": "cognitive-wu.cognitiveservices.azure.com", "basePath": "/contentmoderator/moderate/v1.0", "schemes": [ "https" ], "securityDefinitions": { "apiKeyHeader": { "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" }, "apiKeyQuery": { "type": "apiKey", "name": "subscription-key", "in": "query" } }, "security": [ { "apiKeyHeader": [] }, { "apiKeyQuery": [] } ], "x-servers": [ { "url": "https://cognitive-wu.cognitiveservices.azure.com" }, { "url": "https://westus.api.cognitive.microsoft.com" }, { "url": "https://cognitive-wu.openai.azure.com" }, { "url": "https://api.ProjectOxford.ai" } ], "paths": { "/ProcessImage/Evaluate": { "post": { "description": "Returns probabilities of the image containing racy or adult content.", "operationId": "57cf753a3f9b070868a1f66c", "summary": "Image - Evaluate", "parameters": [ { "name": "CacheImage", "in": "query", "description": "Whether to retain the submitted image for future use; defaults to false if omitted", "type": "boolean" }, { "name": "body", "in": "body", "description": "
The request body can be an image; the following MIME types are supported
\nAlternatively, a publicly accessible URL of an image (gif, jpeg, png, bmp) could be provided as in the example below (Content-Type: application/json).
\nN.B., response time from the service may be adversely affected by external sources' download speeds.
" } ], "consumes": [ "application/json", "image/gif", "image/jpeg", "image/png", "image/bmp", "image/tiff" ], "produces": [ "application/json" ], "responses": { "200": { "description": "", "examples": { "application/json": "{\n \"AdultClassificationScore\": x.xxx,\n \"IsImageAdultClassified\":The request body can be an image; the following MIME types are supported
\nAlternatively, a publicly accessible URL of an image (gif, jpeg, png, bmp) could be provided as in the example below (Content-Type: application/json).
\nN.B., response time from the service may be adversely affected by external sources' download speeds.
" } ], "consumes": [ "application/json", "image/gif", "image/jpeg", "image/png", "image/bmp", "image/tiff" ], "produces": [ "application/json" ], "responses": { "200": { "description": "", "examples": { "application/json": "{\n \"TrackingId\": \"xxxx_xxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n \"CacheId\": \"xxxxxxxxxxxx\",\n \"Result\": true,\n \"Count\": 1,\n \"Faces\": [\n {\n \"Bottom\": xxx,\n \"Left\": xxx,\n \"Right\": xxx,\n \"Top\": xxx\n }\n ]\n}" } }, "400": { "description": "" }, "500": { "description": "" } } } }, "/ProcessImage/Match": { "post": { "description": "Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. \n\nReturns ID and tags of matching image.The request body can be an image; the following MIME types are supported
\nAlternatively, a publicly accessible URL of an image (gif, jpeg, png, bmp) could be provided as in the example below (Content-Type: application/json).
\nN.B., response time from the service may be adversely affected by external sources' download speeds.
" } ], "consumes": [ "application/json", "image/bmp", "image/gif", "image/jpeg", "image/png", "image/tiff" ], "produces": [ "application/json" ], "responses": { "200": { "description": "Supported values for tags are:\nThe request body can be an image; the following MIME types are supported
\nAlternatively, a publicly accessible URL of an image (gif, jpeg, png, bmp) could be provided as in the example below (Content-Type: application/json).
\nN.B., response time from the service may be adversely affected by external sources' download speeds.
" } ], "consumes": [ "application/json", "image/gif", "image/jpeg", "image/png", "image/bmp", "image/tiff" ], "produces": [ "application/json" ], "responses": { "200": { "description": "", "examples": { "application/json": "{\n \"TrackingId\":\"xxxx_xxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n \"CacheId\": \"xxxxxxxxxxxx\",\n \"Language\": \"eng\",\n \"Text\": \"The quick brown fox jumped over the lazy dog\",\n \"Candidates\": [\n {\"Text\": \"The quick brown fox jumped over the lazy dog\", \"Confidence\": 1234},\n {\"Text\": \"The qu1ck brawn fox iumped over the 1azy d0g\", \"Confidence\": 0.001},\n ]\n}" } } } } }, "/ProcessText/DetectLanguage": { "post": { "description": "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.", "operationId": "57cf753a3f9b070868a1f66e", "summary": "Text - Detect Language", "parameters": [ { "name": "body", "in": "body", "description": "Text to be used to determine the language." } ], "consumes": [ "text/plain", "text/html", "text/xml", "text/markdown" ], "produces": [ "application/json" ], "responses": { "200": { "description": "ISO 639-3 code of the primary language identified in the submitted passage.\n\nApplication Status Codes & Descriptions: \n3000 OK\n \n3002 Invalid or missing request parameter(s)\n3004 Error occurred while processing request\n", "examples": { "application/json": "{\"DetectedLanguage\": \"eng\"}" } }, "400": { "description": "" }, "401": { "description": "" }, "415": { "description": "" }, "417": { "description": "" } } } }, "/ProcessText/Screen": { "post": { "description": "The operation detects profanity in more than 100 languages and match against custom and shared blacklists.", "operationId": "57cf753a3f9b070868a1f66f", "summary": "Text - Screen", "parameters": [ { "name": "autocorrect", "in": "query", "description": "Runs auto correction on the input, before running other operations.", "type": "boolean", "enum": [ false, true ] }, { "name": "PII", "in": "query", "description": "Detects Personal Identifiable Information (PII) in the input.", "type": "boolean", "enum": [ false, true ] }, { "name": "listId", "in": "query", "description": "The Term list to be used for matching.", "type": "string" }, { "name": "classify", "in": "query", "description": "Enables Text Classification. \n\nLearn more about Text Moderation Classification.", "type": "boolean", "default": true, "enum": [ false, true ] }, { "name": "language", "in": "query", "description": "Supported Languages\n\nOptional parameter. If no language is specified, it would default to English.", "type": "string" }, { "name": "body", "in": "body", "schema": { "example": "Is this a crap email abcdef@abcd.com, phone: 6657789887, IP: 255.255.255.255, 1 Microsoft Way, Redmond, WA 98052" }, "description": "This method supports raw requests with MIME types listed below:\n• text/html \n• text/xml \n• text/markdown \n• text/plain" } ], "consumes": [ "text/plain" ], "produces": [ "application/json" ], "responses": { "200": { "description": "", "examples": { "application/json": "{\n \"OriginalText\": \"Is this a crap email abcdef@abcd.com, phone: 6657789887, IP: 255.255.255.255,\\n1 Microsoft Way, Redmond, WA 98052\\n\",\n \"NormalizedText\": \"Is this a crap email abide@ abed. com, phone: 6657789887, IP: 255. 255. 255. 255, \\n1 Microsoft Way, Redmond, WA 98052\",\n \"AutoCorrectedText\": \"Is this a crap email abide@ abed. com, phone: 6657789887, IP: 255. 255. 255. 255, \\n1 Microsoft Way, Redmond, WA 98052\",\n \"Misrepresentation\": null,\n \"PII\": {\n \"Email\": [\n {\n \"Detected\": \"abcdef@abcd.com\",\n \"SubType\": \"Regular\",\n \"Text\": \"abcdef@abcd.com\",\n \"Index\": 21\n }\n ],\n \"IPA\": [\n {\n \"SubType\": \"IPV4\",\n \"Text\": \"255.255.255.255\",\n \"Index\": 61\n }\n ],\n \"Phone\": [\n {\n \"CountryCode\": \"US\",\n \"Text\": \"6657789887\",\n \"Index\": 45\n }\n ],\n \"Address\": [\n {\n \"Text\": \"1 Microsoft Way, Redmond, WA 98052\",\n \"Index\": 78\n }\n ]\n },\n \"Classification\": {\n \"Category1\": \n {\n \"Score\": 0.5\n },\n \"Category2\": \n {\n \"Score\": 0.6\n },\n \"Category3\": \n {\n \"Score\": 0.5\n },\n \"ReviewRecommended\": true\n },\n \"Language\": \"eng\",\n \"Terms\": [\n {\n \"Index\": 10,\n \"OriginalIndex\": 10,\n \"ListId\": 0,\n \"Term\": \"crap\"\n }\n ],\n \"Status\": {\n \"Code\": 3000,\n \"Description\": \"OK\",\n \"Exception\": null\n },\n \"TrackingId\": \"1717c837-cfb5-4fc0-9adc-24859bfd7fac\"\n}" } } } } } }, "tags": [] }