How to Update Connection in Open AI modules in all scenarios

Need to update all modules to New Open AI connection from My Open AI connection. How to do it easily without having to manually do it. Anybody have the API code for it?

API code.txt (2.8 KB)
I have this code from ChatGPT its throwing 400 error. Please help