OpenAI RETIRED TRIVIAL

text-moderation-007 — Retired

Deprecated
Shutdown
2025-10-27
Status
deprecated
Replacement
omni-moderation

Quick fix — copy & paste

Choose your language. The "before" block matches the deprecated call; the "after" block is the drop-in replacement.

Breaks on 2025-10-27
# OpenAI: text-moderation-007 (deprecated)
model = "text-moderation-007"
Use this instead
# Replacement
model = "omni-moderation"

This migration was generated automatically from the model rename. If your code does more than swap a model id, double-check request/response shapes against the official OpenAI migration guide.

Error messages

Seeing one of these? You're in the right place.

  • model_not_found: text-moderation-007
  • The model `text-moderation-007` has been deprecated
  • The model `text-moderation-007` does not exist or you do not have access to it

Replacement options

Other OpenAI deprecations

What this means for your code

text-moderation-007 is a moderation model that classifies content for policy violations. Moderation categories and scoring thresholds change between versions. A migration may flip the false-positive / false-negative balance on your inputs.

text-moderation-007 was retired by OpenAI on 2025-10-27. API calls now return an error and the model is no longer accessible. New code should use omni-moderation; legacy code that still references this model id needs to be updated immediately.

Find every call in your codebase

Before you change anything, locate every place the deprecated model id is referenced. Search source files, environment files, feature flags, and config repos. Use these commands from your project root:

Python projects

grep -rn '"text-moderation-007"' --include="*.py" .

JavaScript / TypeScript projects

grep -rn '"text-moderation-007"' --include="*.{js,ts,tsx,jsx}" .

Anywhere (configs, scripts, infra)

grep -rn "text-moderation-007" .

Migration checklist

Steps in order. Skip any that don't apply, but read the whole list — for moderation models, the non-obvious steps are usually the ones that break in production.

  1. 1. Update the model id in moderation API calls
  2. 2. Re-run a labeled validation set through the new model and compare category scores
  3. 3. Recalibrate thresholds — defaults that worked before may be too strict or too loose
  4. 4. Verify all old categories still exist on the new model
  5. 5. Update downstream logic if new categories were added

Will this migration cost more?

Switching from text-moderation-007 to omni-moderation could change your costs significantly. Calculate the exact difference for your prompts.

Open the cost calculator →