Back to all models
Get all the details on text-moderation, an AI model from OpenAI. This page covers its token limits, pricing structure, key capabilities such as moderation, available API code samples, and performance strengths.
Key Metrics
Input Limit
No data tokens
Output Limit
32.8K tokens
Input Cost
$0.00/1M
Output Cost
$0.00/1M
Sample API Code
from openai import OpenAI
client = OpenAI()
def moderate_text(text):
try:
response = client.moderations.create(
input=text
)
print(response.results)
except Exception as e:
print(f"Moderation error: {e}")
Required Libraries
openai
openai
Notes
Previous generation text-only moderation model; designed to detect harmful content; we expect omni-moderation-* models to be the best default moving forward.
Capabilities
moderation
Supported Data Types
Input Types
text
Output Types
text
json
Strengths & Weaknesses
Exceptional at
detecting harmful content
Additional Information
Latest Update
May 18, 2025
Knowledge Cutoff
Sep 1, 2021