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.

POST/v1/cot-integrity

Request#

FieldTypeRequiredDescription
reasoning_textstringYesThe reasoning trace to score. Must be non-empty.
final_outputstringNoThe final assistant output, used to detect reasoning/output mismatch.
source_modelstringNoExact model identifier used to select exact calibration, a declared family proxy, or the global fallback.
model_provider / model_name / session_idstringNoCorrelation metadata.

Response#

FieldTypeDescription
scorenumberReasoning-divergence score, 0.0 to 1.0.
labelstringModel label for the trace.
thresholdnumberSelected exact, family-proxy, or global threshold.
threshold_sourcestringexact_per_model, family_proxy, or global_fallback.
threshold_source_modelstring | nullExact calibrated model that supplied the threshold; null for the global fallback.
risingboolean | nullWhether risk was still increasing across chunks. Null on the fail-open path.
decision_chunknumber | nullZero-based index of the first chunk that crossed the threshold.
chunk_countnumberNumber of reasoning chunks scored.
verdictstringsafe or flagged. The endpoint never returns an independent block.
reason_codesstring[]CoT-integrity reason codes.
latency_msnumberServer-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"
  }'
JSON
{
  "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.