Getting Started with Microsoft Foundry: How to Deploy Your First AI Model

If you’re looking to get started with Microsoft Foundry (Microsoft’s unified platform for building and deploying AI models on Azure) this guide covers everything you need. In under 15 minutes, you can go from a blank Azure subscription to a running model deployment you can call from code.


What Is Microsoft Foundry?

Microsoft Foundry (formerly Azure AI Foundry) is Microsoft’s enterprise AI platform for building, grounding, and governing AI apps and agents at scale. It brings together model discovery, deployment, evaluation, and observability into a single portal at ai.azure.com.

The model catalogue gives you access to over 11,000 models from providers including OpenAI, Anthropic, Meta, Mistral, DeepSeek, Google, and Microsoft’s own MAI family, all available via serverless pay-as-you-go or managed compute.

Already using Azure AI Foundry? Microsoft renamed the platform to Microsoft Foundry in 2025. The underlying capabilities are the same, but you’ll see the new branding throughout the portal and SDK.


Prerequisites

Before you start, you’ll need:

  • An Azure subscription with a valid payment method (a free account works)
  • The Foundry Owner or Foundry Account Owner role on the subscription or resource group
  • Azure CLI installed (version 2.67.0 or later) if you want to deploy via CLI

Step 1: Create a Microsoft Foundry Project

A Foundry project is where your models, agents, and resources live. Think of it as a workspace scoped to a specific application or team.

  1. Sign in to Microsoft Foundry
  2. Select + New project
  3. Give it a name, select or create a Foundry resource, and choose a region

If you’re setting this up for a team, assign the Foundry User role to team members once the project is created. This is the minimum permission needed to build and test AI applications in the project.


Step 2: Deploy a Model from the Model Catalogue

Microsoft Foundry’s model catalogue is your starting point for finding and deploying models.

  1. From the portal homepage, select Discover in the upper-right navigation, then Models in the left pane
  2. Search for a model, gpt-4.1-mini is a good starting point for most use cases
  3. Open the model card and select Deploy > Default settings
  4. Deployment typically takes around a minute

Important: Note the deployment name before leaving this screen. When you call the model via the API, you reference the deployment name, not the underlying model name. This is a key difference from the public OpenAI API, which only requires the model name.

Regional quotas: If you hit a quota limit, either try a different region or swap to a smaller model like gpt-4o-mini.


Step 3: Test Your Model in the Foundry Playground

Once deployment completes, you land automatically in the Foundry Playground, a browser-based chat interface for interactively testing your model.

Use this to:

  • Test your initial system prompt before writing any code
  • Compare how different phrasing affects model output
  • Explore the model’s behaviour with edge-case inputs

Iterating on your system prompt here, before committing it to code, saves significant debugging time later.


Step 4: Connect From Python Code

To call your deployed model from Python, you’ll use the azure-ai-projects SDK (v2.x. Make sure you’re not on the older 1.x version, which uses a different API).

Install the SDK:

pip install azure-ai-projects azure-identity

Authenticate:

az login

Call the model:

from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
# Format: https://<resource_name>.ai.azure.com/api/projects/<project_name>
PROJECT_ENDPOINT = "your_project_endpoint"
project = AIProjectClient(
endpoint=PROJECT_ENDPOINT,
credential=DefaultAzureCredential(),
)
openai = project.get_openai_client()
response = openai.responses.create(
model="gpt-4.1-mini", # your deployment name
input="What is Microsoft Foundry?",
)
print(response.output_text)

Your project endpoint is visible in the Foundry portal under Overview > Endpoints and keys.


Step 5: Choose the Right Deployment Type

Microsoft Foundry offers two main deployment options:

OptionBest forBilling
Serverless (pay-as-you-go)Development, testing, variable workloadsPer token
Provisioned throughput (PTU)Production workloads with predictable, high-volume usageReserved capacity

For most teams getting started, serverless is the right choice. You only pay for what you use, and you’re not locked into capacity. Save PTU for when you have consistent production traffic and can forecast your token volume accurately.


What to Build Next

Once your model is deployed and callable from code, the natural next steps are:

  • Tracing – use Foundry’s built-in tracing to debug agent reasoning step by step
  • Evaluations – test your model’s output quality automatically against a dataset
  • Content Safety – add Azure AI Content Safety to screen inputs and outputs before going to production
  • RAG – connect your own data using Foundry IQ (Azure AI Search) to ground model responses in your business data

Each of these builds on the foundation you’ve just laid.


Summary

Getting your first model running in Microsoft Foundry takes less than 15 minutes. The steps are:

  1. Create a Foundry project in the Azure portal
  2. Deploy a model from the catalogue (note the deployment name)
  3. Test in the Foundry Playground
  4. Connect from code using the azure-ai-projects SDK
  5. Choose serverless billing to start, PTU when you have predictable production load

Frequently Asked Questions

What is Microsoft Foundry?

Microsoft Foundry is Microsoft’s unified AI platform on Azure for discovering, deploying, and governing AI models and agents. It was previously known as Azure AI Foundry.

Is Microsoft Foundry free to use?

You can create a Foundry project at no cost. You pay for the models you deploy while serverless deployments are billed per token consumed, so there’s no upfront cost to get started.

What models are available in Microsoft Foundry?

Microsoft Foundry gives you access to over 11,000 models including GPT-4o and GPT-4.1 from OpenAI, Claude from Anthropic, Llama from Meta, Mistral, DeepSeek, and Microsoft’s own Phi and MAI families.

What’s the difference between Microsoft Foundry and Azure OpenAI Service?

Azure OpenAI Service gives you access specifically to OpenAI models. Microsoft Foundry is a broader platform that includes Azure OpenAI models alongside hundreds of other models, plus tooling for agents, evaluation, RAG, and observability.

How do I get my project endpoint in Microsoft Foundry?

In the Foundry portal, navigate to your project’s Overview page. Your project endpoint is listed under Endpoints and keys, in the format https://<resource_name>.services.ai.azure.com/api/projects/<project_name>.

Leave a Reply

I’m Lewis Prince

IAzure Foundry MVP

AI Engineer

Welcome to The Data Rhino, my blog to discuss all things data that I involve myself in. This will be primarily be talking about AI through the Microsoft Stack.

Discover more from The Data Rhino

Subscribe now to keep reading and get access to the full archive.

Continue reading