@Ashwin Thank you for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.
In my observation whenever create API key and secret key it will automatically obtain the Baidu endpoint. We recommend to you create a new API Key and Secret key again and try pasting in the azure portal and check.
Here are the steps to view/create the API key and Secret Key in baidu.