Moderations

Classify text against usage policy before you act on it.

POSThttps://your-instance.com/v1/moderations

Returns per-category flags and scores. Useful for screening user input before it reaches an expensive model, or screening output before it reaches a person.

  • modelstring

    Moderation model. Defaults to the instance's configured one.

  • inputstring | string[]required

    Text to classify.

curl
curl https://your-instance.com/v1/moderations \
  -H "Authorization: Bearer $CLAWROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "text to check"}'
200 OK
{
  "results": [
    {
      "flagged": false,
      "categories": { "violence": false, "hate": false },
      "category_scores": { "violence": 0.0002, "hate": 0.0001 }
    }
  ]
}