> For the complete documentation index, see [llms.txt](https://docs.unitary.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitary.ai/api-references/detoxify.md).

# 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](/api-references/features-and-requirements.md).

{% hint style="info" %}
Please follow the [API Authentication](/api-references/authentication.md) 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="/files/Qi5eEXKOFsvbyKUL4QLW" 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="/files/Qi5eEXKOFsvbyKUL4QLW" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
