change your model value to a lower (public) model
you might be here because the link says that you didn't pass an API key (but you did)
what helped me resolve this issue was changing the model. seems like i didn't have access to the one i tried at first:
ex:
//initial
async function getReply(){
const response = await openai.createChatCompletion({
model: 'gpt-4',
messages: conversationArray
})
console.log(response)
}
//updated with lower model value
async function getReply(){
const response = await openai.createChatCompletion({
model: 'gpt-3.5-turbo',
messages: conversationArray
})
console.log(response)
}