Self-Service Content Evaluation
Test text against quality and moderation pipelines
Test any text, or an existing comment or chat message, against your application's comment quality and AI moderation pipelines and see how each rule scores it.
Evaluations use your saved settings, and you can override them for a single request to try changes before you save them. Evaluations are read-only, they never save or change anything.
Producer-only debugging endpoint.This is a self-service endpoint for application producers to test and debug their comment quality and moderation settings. It needs a producer access token and is not meant to be integrated into end-user apps. Its request, payload and response may change without prior notice, so always refer to this page for the latest details before use.
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /api/v1/applications/{client_id}/evaluations/ | Start an evaluation |
GET | /api/v1/applications/{client_id}/evaluations/{evaluation_id}/ | Poll the result |
Authentication:
- A producer access token for the application (
Authorization: Bearer <token>)
Pipelines
| # | pipeline | What it checks |
|---|---|---|
| 1 | comment_quality | Whether a comment qualifies as a quality comment: length, characters, emoji, GIFs, sentiment and toxicity |
| 2 | comment_moderation | Whether AI moderation would flag a text or comment |
| 3 | chat_moderation | Whether AI moderation would flag a text or chat message |
Payload
Each pipeline(POST API) needs exactly one input:
- Either
text, or the ID of an existing item (e.g Comment ID or Chat message ID). - An optional
override_config. This changes your saved settings for this request only, fields you leave out keep their saved values. This allows you to evaluate the tuned configuration before saving.
- Comment Quality Pipeline Payload
- Comment Moderation Pipeline Payload
- Chat Message Moderation Pipeline Payload
Response
Every response, from every pipeline, has the same five keys:
url: Where to poll this evaluation for result.pipeline: The pipeline that was run.status:pending,completedorfailed.effective_config: The final settings used for this evaluation: your saved settings withoverride_configapplied. It has the same shape asoverride_config.result:nulluntilstatusiscompleted, then the outcome.decision:passorfailrules: A list of rules. One entry per rule. Each rule in the list has 4 keys -name: The rule field (quality) or category (moderation)outcome:passorfail.errorwhen a rule couldn't run.value: What was measured, e.g. character count, emoji ratio or scorethreshold: The threshold it was compared with.
Response examples
Pending (async POST):
{
"url": "https://<host>/api/v1/applications/<client_id>/evaluations/<evaluation-id>/",
"pipeline": "comment_quality",
"status": "pending",
"effective_config": {
"min_char_count": 0,
"disallowed_chars": "*",
"emoji_ratio_threshold": 0.7,
"exclude_gif": false,
"min_sentiment_score": 0.2,
"max_toxicity_score": 0.1
},
"result": null
}Comment quality(Completed):
{
"url": "https://<host>/api/v1/applications/<client_id>/evaluations/<evaluation-id>/",
"pipeline": "comment_quality",
"status": "completed",
"effective_config": {
"min_char_count": 0,
"disallowed_chars": "*",
"emoji_ratio_threshold": 0.7,
"exclude_gif": false,
"min_sentiment_score": 0.2,
"max_toxicity_score": 0.1
},
"result": {
"decision": "pass",
"rules": [
{"name": "min_char_count", "outcome": "pass", "value": null, "threshold": 0},
{"name": "disallowed_chars", "outcome": "pass", "value": "", "threshold": "*"},
{"name": "emoji_ratio_threshold", "outcome": "pass", "value": 0.0345, "threshold": 0.7},
{"name": "exclude_gif", "outcome": "pass", "value": null, "threshold": false},
{"name": "min_sentiment_score", "outcome": "pass", "value": 0.91, "threshold": 0.2},
{"name": "max_toxicity_score", "outcome": "pass", "value": 0.03, "threshold": 0.1}
]
}
}Moderation (Completed):
{
"url": "https://<host>/api/v1/applications/<client_id>/evaluations/<evaluation-id>/",
"pipeline": "comment_moderation",
"status": "completed",
"effective_config": {
"model_id": "unitary/toxic-bert",
"toxic": 0.8,
"severe_toxic": 0.8,
"obscene": 0.8,
"threat": 0.8,
"insult": 0.5,
"identity_hate": 0.8
},
"result": {
"decision": "fail",
"rules": [
{"name": "toxic", "outcome": "pass", "value": 0.42, "threshold": 0.8},
{"name": "severe_toxic", "outcome": "pass", "value": 0.01, "threshold": 0.8},
{"name": "obscene", "outcome": "pass", "value": 0.05, "threshold": 0.8},
{"name": "threat", "outcome": "pass", "value": 0.02, "threshold": 0.8},
{"name": "insult", "outcome": "fail", "value": 0.67, "threshold": 0.5},
{"name": "identity_hate", "outcome": "pass", "value": 0.01, "threshold": 0.8}
]
}
}Note: Results expire 10 minutes after they're created. After that, the GET returns 404.
GET returns 404.Updated about 6 hours ago

