Microsoft Foundry / Azure AI Foundry

Microsoft Foundry is the new way to use AI models on Azure, which is a simplified version of Azure-on-openai provider.

To use the Microsoft Foundry (Azure AI) (https://ai.azure.com), you can leverage the openai-generic provider.

Use the Completions API setup to make it work with BAML.

Example:

BAML
1client<llm> MyClient {
2 provider "openai-generic"
3 options {
4 // use the API key it indicates in the 'models' sidebar navigation menu, and clicking on the model you want to use
5 base_url "https://boundarydev-resource.openai.azure.com/openai/v1/"
6 api_key env.AZURE_AI_FOUNDRY_API_KEY
7 model "gpt-5-mini" // use the model you actually deployed
8 }
9}

See here to see how to get your API key and base url:

Azure AI Foundary