latestOpenAPI 3.1.02026-08-10134648.5 KB
5c100d640e2e
policy_classification
Submit a text for instant policy classification
This endpoint predicts the policy categories of a single text
Example CURL:
curl -i -X POST -H "Authorization: Bearer {API_TOKEN}" -H "Content-Type: application/json" -X POST --data '{"text": "Test input text"}' https://api.unitary.ai/v1/classify/policy/text/now
post/classify/policy/text/now
Response
Successful Response
Example response
{
"policy_categories": [
{
"description": "UNITARY ADULT SEXUAL",
"name": "UNITARY_SEXUAL",
"risk_level": "HIGH",
"score": 0.8
}
]
}