Python

For data and compliance teams. Typed models and a receipt verification helper.

pip install cohesion-sdk

TypeScript

For application and platform teams. Works in Node and edge runtimes.

npm i @cohesionauth/sdk

REST

For any other language. Call the scoring API directly over HTTPS with an X-API-Key header.

POST /v1/score
Quickstart

Score an interaction in Python.

Install, authenticate with an environment key, and score. The client returns a typed result and verifies the envelope signature for you.

Pythonfrom cohesion import Client client = Client(api_key=env("COHESION_API_KEY")) result = client.score(interaction=interaction) # typed, signature verified print(result.jis) # 82.4 print(result.band) # "proficient" print(result.article_14) # "7/7"

Read the full reference.