Content filtered and charging

If chat completion api decided that the prompt contains profanity/bad words and got filtered/moderated, will I still be charged for this failed response?

If it is the AI decision to refuse a desired generation, then you would be charged for the tokens generated to tell the user that their action is not permitted. If, for example, the end user tries to make your salesperson bot fall in love with them.

There is no bad word filter, the AI won’t get mad if you launch a profanity-laced tirade at it for your bad product support. Nor is it likely to respond in kind.

Use of the moderation API is free to submit the input to first, so that you can block anything that would be strong enough to violate OpenAI policies. That is what you see in ChatGPT when something is flagged.

1 Like