Is the moderation API required?

Does OpenAI require developers to use the moderation API when you implementing the chat completion API in apps?

1 Like

It is not required but you should use it anyway.

If you’re not using the moderations endpoint and you get several users sending unacceptable content to the model, you will appear to not be making the appropriate effort to enforce the terms of service, which may lead to harsher sanctions.

If you are using it, and some things get through, the response from OpenAI will likely be much more measured.

1 Like

Yes, it’s required unless you want to build your own content filter.

The moderations endpoint is a tool you can use to check whether content complies with OpenAI’s usage policies. Developers can thus identify content that our usage policies prohibits and take action, for instance by filtering it.

It’s necessary that your app complies with OpenAI usage policies, to do so you’ll have to use moderations endpoint.

In the safety best practices it states:

Use our free Moderation API

OpenAI’s Moderation API is free-to-use and can help reduce the frequency of unsafe content in your completions. Alternatively, you may wish to develop your own content filtration system tailored to your use case.

1 Like

I like this answer, but it’s not strictly necessary—as long as none of their users ever do anything wrong with the service.

The moderations endpoint is there for the developers protection. It would be recklessly foolish to put anything into production to be used by other people without it.

1 Like

In order for the dev to be safe from the consequences of end user(s) breaking the OpenAI usage policy, it becomes strictly necessary, unless they have another content filter that honors OpenAI’s usage policy, which OpenAI reserves the right to change at any time.

It’s semantics at that point, but it is possible to not use the moderations endpoint and never have a problem.

From that perspective it’s not required.

OpenAI isn’t revoking access to developers solely for not using the moderations endpoint or having their own, custom, content filler.

But, OpenAI will sanction devs for sending too many bad requests to chat/completions/.

By way of analogy,

In the State of Minnesota adults are not required to wear a helmet while riding a motorcycle.

But a helmet is “required” if they don’t want their skull to do its best impression of a watermelon at a Gallagher show when they get hit by a car.

But, again, I think we’re both in agreement it would be monumentally foolish to not use the moderations endpoint when providing services to end-users.

So, irrespective of the answer to the question “is it required,” the end result should be it gets used.

1 Like