Skip to main content
POST
The content moderation API is designed to help developers identify potentially harmful or inappropriate text content. This endpoint analyzes text input and categorizes it based on various types of concerning content.

Key Features

  • Automatic detection of harmful content.
  • Multiple categories of problematic text.
  • Easy integration for content filtering.

How It Works

When you submit text to the moderation endpoint, it uses OpenAI models to analyze the content. The API then returns results indicating whether the text falls into any of the defined problematic categories.

Categories of Harmful Content

The API classifies text into the following categories:

Usage and Best Practices

  1. Optimal Text Length: For best results, we recommend splitting long text into smaller chunks. Aim for segments of less than 2,000 characters each.
  2. Integration: Use this API to automatically flag potentially problematic content in your applications, forums, or user-generated content platforms.
  3. Action on Results: Based on the API’s output, you can implement appropriate actions such as content filtering, user warnings, or further review processes.

Header Parameters

Body Parameters

string
The text to analyze for moderation.
string
The URL of the image. Must begin with https://.