Skip to main content

Microsoft Foundry

Microsoft Foundry (Azure AI Foundry) is the simplified way to use AI models on Azure.

Basic Example​

Use the Completions API setup:

client<llm> MyClient {
provider "openai-generic"
options {
base_url "https://your-resource.openai.azure.com/openai/v1/"
api_key env.AZURE_AI_FOUNDRY_API_KEY
model "gpt-4o-mini"
}
}

BAML-Specific Options​

OptionTypeDefaultDescription
base_urlstring-Azure AI Foundry endpoint
api_keystringenv.AZURE_AI_FOUNDRY_API_KEYAPI key
modelstring-Deployed model name

Getting Credentials​

  1. Go to ai.azure.com
  2. Navigate to the Models sidebar
  3. Click on your deployed model
  4. Copy the API key and endpoint URL

See Also​