Unitary AI Detoxify API

The Detoxify API from Unitary AI — 2 operation(s) for detoxify.

Operations 2

POST /detoxify/text/ Queue text for Detoxify classification #
GET /detoxify/text/{job_id} Retrieve the results of a queued Detoxify classification #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/unitary-ai-detoxify-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

unitary-ai-detoxify-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Unitary content classification Detoxify API
  description: This API is for classifying image and video files to detect various types of potentially harmful content.
  version: 1.0.0
tags:
- name: Detoxify
paths:
  /detoxify/text/:
    post:
      tags:
      - Detoxify
      summary: Queue text for Detoxify classification
      description: This endpoint predicts the Detoxify categories of text.
      operationId: text_detoxify_classify_detoxify_text__post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_text_detoxify_classify_detoxify_text__post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobIDResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - JWTBearer: []
  /detoxify/text/{job_id}:
    get:
      tags:
      - Detoxify
      summary: Retrieve the results of a queued Detoxify classification
      description: This endpoint returns the results of a previously queued classify job
      operationId: text_results_detoxify_text__job_id__get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid4
          title: Job Id
        name: job_id
        in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncResponse_DetoxifyResponse_'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - JWTBearer: []
components:
  schemas:
    DetoxifyModel:
      type: string
      enum:
      - multilingual
      title: DetoxifyModel
      description: An enumeration.
    AsyncResponse_DetoxifyResponse_:
      properties:
        status:
          allOf:
          - $ref: '#/components/schemas/AsyncResponseStatus'
          title: Status of classification job
        results:
          allOf:
          - $ref: '#/components/schemas/DetoxifyResponse'
          title: Classification results
        msg:
          type: string
          title: Error details
      type: object
      required:
      - status
      title: AsyncResponse[DetoxifyResponse]
    AsyncResponseStatus:
      enum:
      - done
      - failed
      - queued
      title: AsyncResponseStatus
      description: An enumeration.
    DetoxifyResponse:
      properties:
        toxicity:
          type: number
          title: Toxicity
        severe_toxicity:
          type: number
          title: Severe Toxicity
        obscene:
          type: number
          title: Obscene
        threat:
          type: number
          title: Threat
        insult:
          type: number
          title: Insult
        identity_attack:
          type: number
          title: Identity Attack
        sexual_explicit:
          type: number
          title: Sexual Explicit
      type: object
      required:
      - toxicity
      - severe_toxicity
      - obscene
      - threat
      - insult
      - identity_attack
      - sexual_explicit
      title: DetoxifyResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Body_text_detoxify_classify_detoxify_text__post:
      properties:
        callback_url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Webhooks callback URL
        text:
          type: string
          maxLength: 262144
          title: Text to classify (max 256kb)
        model:
          allOf:
          - $ref: '#/components/schemas/DetoxifyModel'
          title: Detoxify model type
          default: multilingual
        correlation_id:
          type: string
          maxLength: 128
          title: An optional id chosen by the user to correlate requests and responses
      type: object
      required:
      - text
      title: Body_text_detoxify_classify_detoxify_text__post
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobIDResponse:
      properties:
        job_id:
          type: string
          format: uuid4
          title: Job Id
      type: object
      required:
      - job_id
      title: JobIDResponse
  securitySchemes:
    JWTBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT