OpenAI API is working on Google Colab but giving timeout error in VSCode

Contact whoever is responsible for maintaining the network you are on.

It sounds as though you likely didn’t have enough information yourself to be able to help anyone else debug your issue.