A catalog of AI models in Microsoft Foundry that you can discover, compare, and deploy using Azure’s built‑in tools for evaluation, fine‑tuning, and inference
For a deployed GPT‑4.1‑mini model in Azure AI Foundry, the “key and endpoint” used by applications are the API keys of the underlying Azure AI / Azure OpenAI resource, not per‑model keys. Key rotation is done at the resource level.
To regenerate (rotate) the API keys:
- Go to the Azure portal and open the Azure AI / Azure OpenAI resource that backs the Foundry project.
- Select the Keys and Endpoint blade.
- There are two keys (Key 1 and Key 2). Use the following rotation pattern:
- Ensure all applications are currently using only one key (for example, Key 1).
- Select Regenerate Key 2.
- Update all applications to use the new Key 2.
- Once all traffic uses Key 2, select Regenerate Key 1.
- Optionally switch applications back to Key 1 and repeat this pattern on a schedule.
This lets keys be rotated frequently for security without downtime.
Regarding key expiry:
- The built‑in API keys for Azure AI / Azure OpenAI resources do not support setting an explicit expiry date.
- To achieve time‑bound access, use process controls (e.g., scheduled rotation as above) or front the resource with your own access layer (for example, a service that issues short‑lived tokens) rather than relying on built‑in key expiry.
For customer‑managed encryption keys (CMK) in Key Vault (different from API keys):
- CMKs can have rotation policies and expiry configured in Azure Key Vault.
- When a CMK is rotated, the Azure OpenAI resource must be updated to use the new key URI; rotation does not re‑encrypt existing data.
References: