I have an app that serves as an interface where users can bring their API keys and connect to OpenAI for completions.
Up until yesterday all was great and then I started getting the error above and seeing this in my logs:
openai:error_code=400 error_message='Please set an "HTTP-Referer" header with the URL of your app' error_param=None error_type=None message='OpenAI API error received' stream_error=False
If I change nothing, restart my dynos on Heroku then everything is fine for a while, but as soon as the error pops back up after a while I am stuck again.
Not sure if this is due to some of the OpenAI outages or if multiple requests from the same IP are getting flagged and require a different configuration.
I initially set up headers as the error indicated sending the Authorization along with the beaerer passing the users individual key, plus the HTTP-Referer with the address of the website plus X-Title with the name of our site.
And that worked for a while but then I started getting unauthorized errors when the header elements were included manually so I stripped them back out.
So I have access for a while, then get header errors, then restart the virtual cloud server and am good for a while and they come back again. Not sure what to do.