i’ve been having the same issues. i’ve tried three ways of writing the requests to this endpoint (openai npm package, js fetch, and jquery), and i haven’t been able to find the correct request format. this was the error that blocked me when using the npm package, but i didn’t get any closer with the other 2 formats.
the problem is i don’t know what the headers are supposed to be. i didn’t get any closer with these two methods than the openai npm package, because all i can get is ‘400 bad request’ error. but maybe you can figure it out
looks like you have to do it with node.js
i create a nodejs server and applied the code there it worked fine
this is a helpful tutorial that i followed since am not experienced with node