curl --request POST \
--url https://{controlPlaneURL}/api/llm/moderations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "<string>"
}
'{
"id": "<string>",
"model": "<string>",
"results": [
{
"flagged": true,
"categories": {
"hate": true,
"hate/threatening": true,
"harassment": true,
"harassment/threatening": true,
"self-harm": true,
"self-harm/intent": true,
"self-harm/instructions": true,
"sexual": true,
"sexual/minors": true,
"violence": true,
"violence/graphic": true
},
"category_scores": {
"hate": 123,
"hate/threatening": 123,
"harassment": 123,
"harassment/threatening": 123,
"self-harm": 123,
"self-harm/intent": 123,
"self-harm/instructions": 123,
"sexual": 123,
"sexual/minors": 123,
"violence": 123,
"violence/graphic": 123
}
}
]
}curl --request POST \
--url https://{controlPlaneURL}/api/llm/moderations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "<string>"
}
'{
"id": "<string>",
"model": "<string>",
"results": [
{
"flagged": true,
"categories": {
"hate": true,
"hate/threatening": true,
"harassment": true,
"harassment/threatening": true,
"self-harm": true,
"self-harm/intent": true,
"self-harm/instructions": true,
"sexual": true,
"sexual/minors": true,
"violence": true,
"violence/graphic": true
},
"category_scores": {
"hate": 123,
"hate/threatening": 123,
"harassment": 123,
"harassment/threatening": 123,
"self-harm": 123,
"self-harm/intent": 123,
"self-harm/instructions": 123,
"sexual": 123,
"sexual/minors": 123,
"violence": 123,
"violence/graphic": 123
}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Optional metadata for the request
Successful moderation response
Unique moderation ID
Model used for moderation
Moderation results per input
Show child attributes
True if content violates policies
Binary flags for content violations
Show child attributes
Contains hate speech
Contains threatening hate speech
Contains harassment
Contains threatening harassment
Contains self-harm content
Expresses intent of self-harm
Contains self-harm instructions
Contains sexual content
Contains sexual content with minors
Contains violent content
Contains graphic violence
Confidence scores for each category
Show child attributes
Hate score
Threatening hate score
Harassment score
Threatening harassment score
Self-harm score
Self-harm intent score
Self-harm instructions score
Sexual content score
Sexual content with minors score
Violence score
Graphic violence score
Was this page helpful?