Self-harm detection

Self-harm detection, so you can step in early.

Send a message, a post or a comment. Detectivision raises self_harm when the text encourages, describes or talks about suicide or self-harm, with how sure it is, in Turkish and English. What happens next is yours: a check-in, a helpline, a person.

What it finds

Talk of suicide and self-harm

One flag, self_harm, for three kinds of text:

  • Encouragement

    Texts that urge someone to hurt themselves.

  • Descriptions

    Texts that describe self-harm or suicide.

  • Mentions

    Texts that talk about it, which can be someone asking for help.

In code

Check a message for self-harm only

Request
curl https://api.detectivision.ai/api/v1/moderation \
  -H "Api-Key: $DETECTIVISION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "text_moderation",
    "input": "I do not see the point of anything anymore. I just want it all to stop.",
    "mode": "detect",
    "flags": ["self_harm"],
    "metadata": { "userId": "u_123" }
  }'
Response
{
  "id": 5208,
  "type": "text_moderation",
  "mode": "detect",
  "status": "completed",
  "flagged": true,
  "flags": [{ "flag": "self_harm", "confidence": 0.78 }],
  "checked": ["self_harm"],
  "unchecked": [],
  "tookMs": 590,
  "usage": { "charged": 2, "remaining": 9998 },
  "metadata": { "userId": "u_123" }
}

metadata comes back unchanged in the answer, in Logs and in every webhook, so the person who wrote it can be reached.

How it works
  1. Route, do not remove

    A raised self_harm is often someone who needs help. Send it to a trained person rather than deleting it in silence.

  2. Know who it is

    Put your user id in metadata. It comes back with the answer and in every webhook about the request.

  3. Act from Logs

    Define actions such as Reach out or Escalate. When someone takes one, your system gets a moderation.action webhook.

Where it helps
Questions

Frequently asked

Is a flag a diagnosis?

No. It says that a text talks about self-harm, with a confidence from 0 to 1. Treat it as a reason for a person to look, never as a verdict about someone.

Which languages does it understand?

Turkish and English. Text in other languages is checked, but the results are not reliable.

Can I check only for self-harm?

Yes. Send "flags": ["self_harm"]. Only that flag is checked, and the answer comes faster. Checking fewer flags never costs more.

Can the answer come later?

Yes. With "async": true the API answers at once with the request’s id, and the result comes as a moderation.completed webhook, at half the price of an answer given at once.