Hello @Rudraksh Arora , Thanks for using Microsoft Q&A Platform.
Try to check if you have provided the correct API key and endpoint. Also make sure you have added all the necessary permissions and roles to the OpenAI resource like Cognitive Services OpenAI User, Cognitive Services OpenAI Contributor, Cognitive Services Contributor.
Here is the documentation related to RBAC: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/role-based-access-control
I hope this helps.
Regards,
Vasavi