AI-901 courseLesson 7 of 14 · 11 min
How to Deploy a Model and Use the Chat Playground in Microsoft Foundry (AI-901)
XUtilHub Team ·
Exam skills covered
- Deploy a model and interact with it in the Foundry portal
Microsoft Foundry (formerly Azure AI Foundry) is Microsoft's platform for building AI apps and agents. It brings models, agents, tools, evaluations and safety features into one portal at ai.azure.com and one SDK. In this lesson you'll deploy a model and chat with it, which is a skill AI-901 tests directly.
Foundry's portal changes often. Button names below may differ slightly, but the steps stay the same.
The building blocks
- Azure subscription: where you're billed. A free account works for learning.
- Foundry resource: the Azure resource that hosts your models, agents and tools. It has an endpoint and keys.
- Project: a workspace inside a Foundry resource where you deploy models, build agents and run evaluations. Each project has its own endpoint, in the form
https://<resource-name>.services.ai.azure.com/api/projects/<project-name>. - Deployment: a model made available under a name you choose, with a deployment type and quota.
Step 1: create a project
- Sign in to the Foundry portal with your Azure account.
- Choose Create project (or Create an agent, which creates a project for you).
- Give the project a name. Foundry creates the Foundry resource and resource group if you don't already have them.
- Pick a region. Model availability differs by region, so if a model you want isn't listed, try another region.
Step 2: find a model in the catalog
Open the model catalog (sometimes called Discover or Models). You can:
- Filter by task (chat, reasoning, embeddings, image generation, speech), provider and deployment type
- Open a model card to read its capabilities, context window, pricing, limitations and benchmarks
- Compare models on quality, cost and speed with the leaderboards
For a first test, choose a small, inexpensive chat model.
Step 3: deploy it
- On the model card, choose Deploy.
- Enter a deployment name. Your code will use this name, so keep it simple, such as
gpt-5-mini. - Choose a deployment type, for example Global Standard (see the deployment types lesson).
- Optionally adjust the tokens-per-minute rate limit and the content filter (guardrail) configuration.
- Confirm. After a few seconds the deployment is ready.
Some newer Foundry features let you try certain models without a deployment. For the exam, remember the classic flow: choose a model → deploy → call the deployment by name.
Step 4: chat in the playground
The playground lets you use the model without code:
- Open your deployment and choose Open in playground.
- In Instructions, write a system prompt, for example: "You are a helpful assistant that answers in two sentences."
- Type a message and send it.
- Change parameters such as temperature and max tokens, and see how answers change.
- Try adding data or tools if the playground offers them.
Most playgrounds also have a View code option that shows the Python, C# or REST code for the conversation you just had. That's a great way to learn the SDK.
Step 5: find your connection details
You'll need these to write code:
- Project endpoint (on the project's overview page)
- Deployment name
- For key-based services, an API key. For the Foundry SDK, Microsoft recommends Microsoft Entra ID sign-in (keyless) using
DefaultAzureCredentialinstead of keys.
Your account needs the right role on the project, such as Azure AI User, to call models and agents.
Safety features you get by default
Deployments come with content filters that check prompts and responses for harmful content such as hate, sexual content, violence and self-harm, and can include prompt shields against jailbreak attempts. You can view and adjust the guardrail configuration, within Microsoft's policies.
Monitoring and cost
- Each deployment shows usage: requests, tokens and errors.
- Rate-limit errors (HTTP 429) mean you've hit the deployment's TPM limit.
- Delete deployments and resources you're not using to avoid charges. Standard deployments only charge for tokens used, but provisioned capacity and some tools charge for time.
Key takeaways
- Hierarchy: subscription → Foundry resource → project → deployments, agents, tools.
- Flow: catalog → deploy (name + type) → playground → code.
- The playground tests prompts and parameters without code, and can show you the matching code.
- Code needs the project endpoint and deployment name; prefer Entra ID over keys.
Next lesson: build a chat app with the Foundry SDK.
Check your understanding
Exam-style questions on this lesson. Get them all right to mark the lesson complete.
Finished reading?