Detecting Text
The core endpoint for judging a sentence is POST /detect.
Request
Endpoint: POST https://harm-api.rhu.kr/detect
| Field | Type | Required | Description |
|---|---|---|---|
text | string | ✔ | The sentence to judge (up to 4000 characters) |
operating_point | string | Sensitivity preset (defaults to balanced) |
curl -s -X POST https://harm-api.rhu.kr/detect \
-H 'Content-Type: application/json' \
-d '{"text":"니 수준을 아세요","operating_point":"balanced"}'
{
"text": "니 수준을 아세요",
"is_profane": true,
"label": "욕설",
"decision": "review",
"decision_label": "검토",
"score": 0.8975,
"severity": 2,
"tier": "free"
}
Operating points
The same model, with only the threshold changed — three presets to tune sensitivity.
| Operating point | Behavior | When to use |
|---|---|---|
balanced | Balances precision and recall (default) | Most cases |
high_precision | Flags profanity only when confident | When you want to minimize false positives |
high_recall | Flags profanity when in doubt | When you want to minimize misses |
Many sentences at once
Send a texts array (up to 256 items) to POST /detect/batch to judge them together. It counts as one request for rate limiting and billing.
curl -s -X POST https://harm-api.rhu.kr/detect/batch \
-H 'Content-Type: application/json' \
-d '{"texts":["안녕","씨발"]}'
Each item in the response uses the same schema as Response Fields.