O1 (mini & preview) API - getting 'prompt violating usage policy' on innocent prompts

To clarify I’m literally providing non-sensitive code files and having them rejected.

If I put ~400 lines of code or more I get this error. If I trim that same prompt and retry it will almost certainly fail even if cutting down to ~2 lines.

Error: 400
API Error: {“error”:{“message”:“Invalid prompt: your prompt was flagged as potentially violating our usage policy. Please try again with a different prompt: https://platform.openai.com/docs/guides/reasoning/advice-on-prompting",“type”:“invalid_request_error”,“param”:null,“code”:"invalid_prompt”}}

I’m getting this not in Dalle but regular text

Welcome!

Can you provide some more details?

Are you sending text to the moderation endpoint first?

https://platform.openai.com/docs/guides/moderation/overview.eot

There’s a wealth of information in the API reference for Best Safety Practices too…

https://platform.openai.com/docs/guides/safety-best-practices/use-our-free-moderation-api

If you continue to have a problem, though, let us know some details, and we’ll try to help.

I posted this elsewhere but this is going to be an ongoing battle for OpenAI. The core issue is that no matter how well trained these safety models are they will always be perceived of as being too aggressive.

Think about it…. If they let a prompt through that they shouldn’t have you can’t detect that and nobody is going to report it so you can’t easily increase their safety. But if they block a prompt they shouldn’t have everyone sees that and will report it. What you end up with is a system where 99% of the reports are about things you blocked that you shouldn’t have and less then 1% of the reports are for things that will actually improve model safety.

I just don’t see how this system ever works as intended.

2 Likes

Thanks for the offer, @PaulBellow.

I have a pretty simple prompt that checks the internal consistency of another very complex prompt, which I of course need to pass to the model as well.

I believe this very complex prompt causes the error message, due to “Limit additional context in retrieval-augmented generation (RAG): When providing additional context or documents, include only the most relevant information to prevent the model from overcomplicating its response.”

Since I want to check the inner consistency, I need to pass the very complex prompt as is.

Do you see any other solution besides moving to model R1 instead?

I’m running into this problem with o1-mini, too. My impression is that one important factor might be the presence of some “assistant” message in the loop. I can share a playground preset, if that would be helpful.

1 Like

I used to be able to use it normally before, but I want to know how to solve it. It has been bothering me for a long time