# Detoxify endpoints

Detoxify is an easy-to-use Python library that detects hateful or offensive language.&#x20;

Detoxify is an [open-source tool](https://github.com/unitaryai/detoxify) to help researchers and practitioners identify potential toxic comments.

Detoxify models are trained to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, and Multilingual toxic comment classification.&#x20;

## Detoxify endpoints

Detoxify is offered as a set of two standalone text-only API endpoints so that you can avoid the hassle of hosting open-source models.

Any requests you send should meet the requirements listed on [features-and-requirements](https://docs.unitary.ai/api-references/features-and-requirements "mention").

{% hint style="info" %}
Please follow the [authentication](https://docs.unitary.ai/api-references/authentication "mention") instructions first. This will generate a token that is valid for 24 hours and must be used in subsequent API requests.
{% endhint %}

### POST endpoint reference

{% openapi src="<https://1303016406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgkYGyPKqtHGZyEvMl1GP%2Fuploads%2Fgit-blob-1ea297cbed161d2a16d21ca42ffa258cb07caefb%2Fapi-worker.autogenerated.openapi.yaml?alt=media>" path="/detoxify/text/" method="post" %}
[api-worker.autogenerated.openapi.yaml](https://1303016406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgkYGyPKqtHGZyEvMl1GP%2Fuploads%2Fgit-blob-1ea297cbed161d2a16d21ca42ffa258cb07caefb%2Fapi-worker.autogenerated.openapi.yaml?alt=media)
{% endopenapi %}

### GET endpoint reference

{% openapi src="<https://1303016406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgkYGyPKqtHGZyEvMl1GP%2Fuploads%2Fgit-blob-1ea297cbed161d2a16d21ca42ffa258cb07caefb%2Fapi-worker.autogenerated.openapi.yaml?alt=media>" path="/detoxify/text/{job\_id}" method="get" %}
[api-worker.autogenerated.openapi.yaml](https://1303016406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgkYGyPKqtHGZyEvMl1GP%2Fuploads%2Fgit-blob-1ea297cbed161d2a16d21ca42ffa258cb07caefb%2Fapi-worker.autogenerated.openapi.yaml?alt=media)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.unitary.ai/api-references/detoxify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
