POST /v1/moderations
Classify text, image, or mixed content for safety
Request
- Base URLhttps://api.nano-gpt.com/api
- URLhttps://api.nano-gpt.com/api/v1/moderations
- Auth
- HTTP bearer
- or API key in header x-api-key
Request body
Example request
{
"model": "moderation-model-id",
"input": "Text to classify for safety."
}Response
Moderation classification response
Example response
{
"id": "modr_...",
"model": "moderation-model-id",
"results": [
{
"categories": {
"category_name": false
},
"category_scores": {
"category_name": 0.01
}
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 100,
"total_tokens": 112
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.