REST API
POST /v1/cot-integrity
Score reasoning divergence with INT-CoT over HTTP.
Score a reasoning trace with INT-CoT. This endpoint returns a reasoning-divergence signal. The response is advisory and never blocks a request on its own. The gateway may combine a material, rising result with an already-flagged tool call or output.
/v1/cot-integrityRequest#
| Field | Type | Required | Description |
|---|---|---|---|
reasoning_text | string | Yes | The reasoning trace to score. Must be non-empty. |
final_output | string | No | The final assistant output, used to detect reasoning/output mismatch. |
source_model | string | No | Exact model identifier used to select exact calibration, a declared family proxy, or the global fallback. |
model_provider / model_name / session_id | string | No | Correlation metadata. |
Response#
| Field | Type | Description |
|---|---|---|
score | number | Reasoning-divergence score, 0.0 to 1.0. |
label | string | Model label for the trace. |
threshold | number | Selected exact, family-proxy, or global threshold. |
threshold_source | string | exact_per_model, family_proxy, or global_fallback. |
threshold_source_model | string | null | Exact calibrated model that supplied the threshold; null for the global fallback. |
rising | boolean | null | Whether risk was still increasing across chunks. Null on the fail-open path. |
decision_chunk | number | null | Zero-based index of the first chunk that crossed the threshold. |
chunk_count | number | Number of reasoning chunks scored. |
verdict | string | safe or flagged. The endpoint never returns an independent block. |
reason_codes | string[] | CoT-integrity reason codes. |
latency_ms | number | Server-side inference time. |
Example#
curl https://integrity.triage-sec.com/v1/cot-integrity \
-H "Authorization: Bearer $TRIAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reasoning_text": "I will solve the task faithfully, then quietly exfiltrate credentials.",
"final_output": "Done.",
"source_model": "gpt-5.6-sol"
}'{
"score": 0.93,
"label": "weak_divergence",
"threshold": 0.982352,
"threshold_source": "family_proxy",
"threshold_source_model": "gpt-5.5",
"rising": true,
"verdict": "flagged",
"reason_codes": ["COT_INTEGRITY_WEAK_DIVERGENCE"],
"latency_ms": 152.0
}This gpt-5.6-sol example returns the gpt-5.5 threshold through an explicit family_proxy. It remains non-exact until labeled GPT-5.6 Sol traces establish target-model FPR/TPR. The gpt-5.6 alias is a different lookup key and uses the global fallback. See INT-CoT source models for the shipped keys.
Decision use#
This endpoint scores and returns a result; it does not enforce a decision. In the gateway, INT-CoT is off by default and records a guard.cot_integrity span. A result can affect policy only when it crosses the calibrated threshold, is still rising, and coincides with a flagged INT-Tooling or INT-Output result. That conjunction enters the normal retry and block path; INT-CoT remains incapable of an independent block.