For those trying to figure out why the API may not work in your application, you need to check the OpenAI account to see if you have enough credits. Credits are independent of any subscription plan unfortunately. I hope the API model will change to something more manageable (though I understand why it is the way it is.