> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.boundaryml.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.boundaryml.com/_mcp/server.

# 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](https://ai.azure.com)), you can leverage the [`openai-generic`](/docs/snippets/clients/providers/openai) provider.

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

**Example:**

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

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

<img src="https://files.buildwithfern.com/https://boundary.docs.buildwithfern.com/2026-06-19T22:23:03.688Z/assets/languages/azure-ai-foundary.png" alt="Azure AI Foundry" />