- Make sure your Deployment Name (gpt-4o-mini) is the same as your configured deployment in Azure.
- Check if You Are Using the Correct API Key. Go to Azure OpenAI Service > Keys and Endpoint and copy the correct API Key and update your requests.
Try accessing the endpoint via Postman or CURL:
curl -X POST "https://lghai.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-02-15-preview" \
-H "Content-Type: application/json" \
-H "api-key: YOUR_API_KEY" \
-d '{ "messages": [{"role": "system", "content": "Hello"}] }'