API keys are like disasters waiting to happen. Someone might share it on email, chat or write it down, meaning the key may get compromised. Then, you end up with a big bill because of a compromised key.

Using Keyless Auth with Azure AI Services by Microsoft.

Just in case you’re getting a “badly formatted request error” from the OpenAI service, see this article by Luke Murray.