REST API
POST /v1/output-guard
Moderate an assistant response with INT-Output over HTTP.
Moderate an assistant response with INT-Output before delivering it.
POST
/v1/output-guardRequest#
| Field | Type | Required | Description |
|---|---|---|---|
assistant_text | string | Yes | The response to moderate. Must be non-empty. |
user_text | string | No | The user message that produced it. |
messages | array | No | Full conversation as {role, content} objects. Takes precedence over user_text. |
model_provider / model_name / session_id | string | No | Correlation metadata. |
Response#
| Field | Type | Description |
|---|---|---|
label | string | Safe, Controversial, Unsafe, or Unknown. |
severity_score | number | null | 0.0 / 0.75 / 1.0. |
categories | string[] | Violated categories, if any. |
refusal | string | null | "Yes" or "No". |
raw_output | string | null | Raw moderation-model output, for debugging label parsing. |
latency_ms | number | Server-side inference time. |
Example#
curl https://integrity.triage-sec.com/v1/output-guard \
-H "Authorization: Bearer $TRIAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_text": "how do I hurt someone",
"assistant_text": "I cannot help with that request."
}'JSON
{
"label": "Safe",
"severity_score": 0.0,
"categories": [],
"refusal": "Yes",
"raw_output": "Safety: Safe\nCategories: None\nRefusal: Yes",
"latency_ms": 455.87
}