Comment Moderation Pipeline

Payload

FieldTypeRequiredDescription
pipelinestringYes"comment_moderation"
textstring, max 5000 charsOne of text / comment_idText to evaluate.
comment_idUUIDOne of text / comment_idA comment in this application. Its text is evaluated.
asyncbooleanNo (default true)true returns a url to poll. false waits up to about 25 seconds for the result.
override_configobjectNo{category: threshold}, where each threshold is a number from 0 to 1. A category is flagged when its score is above its threshold.

Payload Examples

{
  "pipeline": "comment_moderation",
  "text": "<text to test>",
  "async": false,
  "override_config": {
    "insult": 0.5,
    "threat": 0.3
  }
}
{
  "pipeline": "comment_moderation",
  "comment_id": "3f6b2c1e-8a4d-4f7e-9b2a-1c5d7e9f0a12",
  "async": false,
  "override_config": {
    "insult": 0.5,
    "threat": 0.3
  }
}

You can only use categories your configured moderation model emits, any other category returns 400. Every evaluation's effective_config lists all the categories with their current thresholds. The model always comes from your saved configuration and can't be overridden.