Hi i'm currently trying to integrate chat gpt to html code for my school project but it kept getting error

im trying to integrate chatgpt to my code via client side but it kept getting error 400 ‘bad request’ and ‘unexpected response’ error

I can assure you that it works for those who write good code. There’s numerous examples on the forum you can search (like “example chatbot”) to come up with some local tests to see that you know how to make successful API calls to your funded organization account with API keys, and then extend that into a server that can service secure web requests from a browser, with user authentication.