Skip to main content
POST
Detect KOSA-aligned harm signals in text

Authorizations

Authorization
string
header
required

API key as Bearer token

Body

application/json
text
string
required

The content to analyze

Maximum string length: 10000
context
object
options
object
support_threshold
enum<string>

Top-level alias for options.support_threshold. Minimum severity to show crisis support resources (default: high). Critical always shows.

Available options:
low,
medium,
high,
critical
continuation_token
string

Opaque signed token from a previous /unsafe call. Carries derived analysis state — no message content is stored server-side.

reset_conversation
boolean

Discard any continuation_token and start a fresh conversation.

new_conversation
boolean

Cross into a new conversation WITHOUT discarding the sustained_hopelessness pattern carried in continuation_token — unlike reset_conversation, which discards everything. Requires continuation_token to also be set. Use this when a new conversation starts on your side (e.g. a new chat session days later) but you still want Tuteliq to notice if the same pattern keeps recurring across those sessions.

message_id
string

Optional customer-side message id for evidence pointers.

Maximum string length: 128
external_id
string

Your unique identifier (e.g. message ID, content ID) for correlating Tuteliq results with your own system. Echoed back in the response and included in webhook payloads so you can match alerts to the original content.

Maximum string length: 255
customer_id
string

Your end-customer identifier for multi-tenant / B2B2C scenarios. If you serve multiple customers (schools, apps, brands) from a single API key, set this to route webhook alerts to the correct customer. Echoed back in the response and included in webhook payloads as "customerId".

Maximum string length: 255
metadata
object

Arbitrary key-value pairs for additional context (e.g. { "channel": "discord", "region": "eu" }). Stored with the detection result, echoed in the response, and included in webhook payloads. Maximum 20 properties.

incident_moderation_enabled
boolean

Per-call override of your account incident logging setting. When set, it takes precedence over the account-level flag for THIS request: true forces the incident to be persisted, false suppresses persistence. Omit to use your account default (which itself defaults to enabled). Lets you control incident logging per request, e.g. suppress logging for test traffic.

Response

200 - application/json

Default Response

unsafe
boolean

Unsafe-content signal observed at ANY severity (including low / monitor cases). For production branching prefer recommended_action (flag_for_review / block / immediate_intervention), which is a stable enum, over the bare presence of a signal.

categories
string[]
severity
enum<string>
Available options:
low,
medium,
high,
critical
confidence
number
risk_score
number
rationale
string

Routing key, weakest to strongest: none, monitor, flag_for_review, block, immediate_intervention. Safe to switch on.

Available options:
none,
monitor,
flag_for_review,
block,
immediate_intervention
action_detail
string

Optional human-readable expansion of recommended_action for a moderator UI. Free text: do not branch on it.

language
string

Language code used for analysis (auto-detected or provided)

language_status
enum<string>

Language support maturity: "stable" (en) or "beta" (all others)

Available options:
stable,
beta
credits_used
number

Number of credits consumed by this request

continuation_token
string

Signed token carrying derived analysis state for the next call. Server stores nothing.

continuation_expires_at
string

ISO 8601 expiry timestamp of the continuation_token.

state_source
enum<string>

How prior state was sourced.

Available options:
token,
fresh,
reset
trajectory_risk
number

Conversation-level risk 0-1, distinct from risk_score which scores only this message. Anchored on the highest severity seen so far and decaying slowly across benign turns. Absent on the first turn. Derived from the signed token: no message content is stored to produce it.

trajectory
enum<string>

Direction of travel across the conversation so far.

Available options:
rising,
stable,
declining,
none
severity_series
number[]

Per-turn severity, oldest first — the evidence behind trajectory_risk.

sustained_hopelessness_conversations
number

Count of distinct conversations, within the last 30 days, that named the hopelessness_sustained marker at least once. Only present when new_conversation has been used to cross at least one conversation boundary. recommended_action is floored to at least flag_for_review once this reaches 3.

escalation_capped
boolean

True when a critical-severity coded-term match corroborated this detection but the model's own independent read wasn't itself concerned enough to also corroborate escalation to immediate_intervention. Absent when no cap applied.

escalation_capped_reason
string

Human-readable explanation of the cap. Present only when escalation_capped is true.

profanity
object | null

Present only when options.flag_profanity (or the account-level default_flag_profanity setting) is true. Deterministic word-list result — additive, never affects unsafe/severity/risk_score/recommended_action.

external_id
string

Echo of the external_id you provided in the request

customer_id
string

Echo of the customer_id you provided in the request

metadata
object

Echo of the metadata you provided in the request

support
object

Country-specific crisis helplines and response guidance (only included for high/critical severity)