Moderations
Post moderations
Get Started
Developer Guide
- Providers
- Code Integration
Configure Gateway
- Access Control
- Rate Limiting
- Load Balancing
- Fallback
- Guardrails
Observability
Deployment
Embeddings
Rerank
Responses
Moderations
Moderations
Post moderations
POST
/
moderations
curl --request POST \
--url https://{controlPlaneURL}/api/llm/api/inference/openai/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
}
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Successful moderation response
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://{controlPlaneURL}/api/llm/api/inference/openai/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
}
}
]
}