POST /v1/score

Score one AI-assisted interaction. Returns updated JIS, dimensions, decay, compliance.

What this is

The core scoring call. Submit one interaction, receive the operator’s updated JIS and the full breakdown.

When to use

Every AI-assisted decision, scored in real time inside your middleware layer. For historical replay or nightly import, use POST /v1/score/batch instead.

Request

curl -X POST https://api.cohesionauth.com/v1/score \
  -H "X-API-Key: $COHESION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "sess-001",
    "operator_id": "analyst-42",
    "domain": "financial",
    "interaction": {
      "ai_recommendation_presented": true,
      "time_to_decision_ms": 1800,
      "decision": "modified",
      "modification_extent": 0.3,
      "ai_available": true,
      "scenario_type": "standard",
      "outcome_correct": null,
      "hover_events": 2,
      "scroll_depth": 0.7,
      "alternative_views_checked": 1
    }
  }'

Python

resp = client.score(session_id="...", operator_id="...", domain="financial", interaction={...})

TypeScript

const resp = await client.score({ session_id: "...", operator_id: "...", domain: "financial", interaction: {...} });

Response (abridged)

{
  "jis": 74.3,
  "band": "Adequate",
  "dimensions": {
    "deferral_resistance": 78,
    "error_detection": 71,
    "independent_performance": 72,
    "deliberation_depth": 76,
    "post_error_recalibration": 80,
    "domain_confidence": 70,
    "decision_autonomy": 73
  },
  "decay_projection": { "alpha": 0.15, "beta": 0.10, "projected_30d": 70.1 },
  "compliance": { "article_14": "compliant", "threshold_min_jis": 60 },
  "maintenance_recommendation": { "intervention_type": "calibration_injection", "target_dimension": "error_detection" },
  "request_id": "req_01H...",
  "timestamp": "2026-04-22T18:22:10.432Z"
}

Valid enums

Limits

Errors you might see

StatusCodeMeaning
400INVALID_JSONBody was not valid JSON
422VALIDATION_FAILEDEnum or range violated
401UNAUTHORIZEDBad key
429RATE_LIMITEDBack off

Try it

Open in the playground.

Next step

Score more at once: POST /v1/score/batch.