Text Moderation
POST {{contentSafetyEndpoint}}/contentsafety/text:analyze?api-version=2023-04-30-preview
This covers flagging of inappropriate and/or offensive content within text (specified in the Body).
To interpret the response, each category is given a severity of 0, 2, 4 or 6, with 0 being the least and 6 being the most severe.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
api-version | string |
Request Body
{"text"=>"<your_text_here>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"blocklistsMatchResults":[],"hateResult":{"category":"Hate","severity":2},"selfHarmResult":{"category":"SelfHarm","severity":0},"sexualResult":{"category":"Sexual","severity":0},"violenceResult":{"category":"Violence","severity":0}}