---
title: "Score text for abuse, Hinglish and Tanglish included"
method: POST
path: "/v1/text/moderate"
tags: ["Text tools"]
---

# Score text for abuse, Hinglish and Tanglish included

`POST /v1/text/moderate`

## Request

- Base URL: `https://api.dharun.dev`
- URL: `https://api.dharun.dev/v1/text/moderate`
- Auth: none declared

Three classifiers each score the text from 0 to 1: a general multilingual one (toxic), one for Hindi typed in Roman letters (profanity, harassment, hate_speech, caste, communal, regional, misogyny) and one for Tamil typed in Roman letters (offensive). flagged says whether any score reached the threshold. Up to 4,000 characters; the first 256 tokens are read. Scores are a model's guess: use them to sort or to ask a person, not to decide alone.

## Query parameters

- `threshold` string
- `models` string

## Request body

- object
  - `models` string: Comma-separated: general, hinglish, tanglish. Default all three.
  - `text` string, required: The text.
  - `threshold` string: Score at which flagged becomes true, between 0 and 1. Default 0.5.

## Response `200`

Success

- Envelope
  - `data` unknown, required
  - `meta` object, required
    - `limit` integer
    - `note` string
    - `offset` integer
    - `source` object: Where the data came from and the credit its licence asks for.
      - `attribution` string
      - `licence` string
      - `name` string
      - `retrieved` string
      - `url` string
      - `version` string
    - `total` integer

## Other responses

- `400`: Error
- `404`: Error
- `429`: Error

---

[API](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data.md) · [All operations](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/llms.txt) · [OpenAPI document](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/revisions/ecd8b0ec7863?raw)
