TypeError from OpenAiAPI: openai.createCompletion is not a function

Good day, I am working with Dall E for image creation. Are there migration docs for image creation too and not just text completion. I am getting an erro that says “Error creating image: Request failed with status code 401”