v5

latestSwagger 2.02026-07-13122840.3 KB

Analyze Text

A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

post/text:analyze

Query parameters

api-versionstring required

The API version to use for this operation.

Request body

textstring required

The text to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request.

categoriesTextCategory[]

The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.

blocklistNamesstring[]

The names of blocklists.

haltOnBlocklistHitboolean

When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit.

outputType'FourSeverityLevels' | 'EightSeverityLevels'

This refers to the type of text analysis output. If no value is assigned, the default value will be "FourSeverityLevels".

Response

The request has succeeded.