Comment Moderation Pipeline
Payload
| Field | Type | Required | Description |
|---|---|---|---|
pipeline | string | Yes | "comment_moderation" |
text | string, max 5000 chars | One of text / comment_id | Text to evaluate. |
comment_id | UUID | One of text / comment_id | A comment in this application. Its text is evaluated. |
async | boolean | No (default true) | true returns a url to poll. false waits up to about 25 seconds for the result. |
override_config | object | No | {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.
Updated about 6 hours ago

