Hey there Suji
So thw "401 Unauthorized" error indicates that there is an issue with authentication or authorization when accessing the Azure Cognitive Services API.
let me drop you a few troubleshoots\
- Make sure that you are using the correct API key to authenticate your requests. The API key should be generated from the Azure portal and correctly included in the request headers.
- Double-check the endpoint URL used in your application to make sure it matches the endpoint URL provided in the Azure portal for the specific Cognitive Services resource.
- Make sure that your Azure subscription includes access to the Cognitive Services resource and that the resource has been provisioned and configured correctly in the Azure portal.
If this helps kindly accept the answer thanks much.