Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 17 of 30
❮Prev Next❯

Deploy a Model and Chat in the Foundry Portal

Module 2: Microsoft Foundry ⏱ 8 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    To use a model in Microsoft Foundry, you deploy it first: pick it in the model catalog, select Deploy, give it a deployment name and choose a deployment type such as Global Standard. Then open the chat playground, add a system message, ask questions and adjust parameters like temperature and max tokens. When it behaves the way you want, View code shows ready-to-run code that calls your deployment by name.

    Simulate it » No Azure account needed

    Exam objective: 2.1.2 Deploy a model and interact with it in the Foundry portal. (Skills measured as of April 15, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Deploy a model and chat with it Deploy gpt-4.1-mini and chat with it in the playground.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Open <strong>Models + endpoints</strong> and select <strong>+ Deploy model</strong> ➜ *Deploy base model* ➜ <strong>gpt-4.1-mini</strong>.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Open Models + endpoints and select + Deploy model ➜ Deploy base model ➜ gpt-4.1-mini.
    2. Choose the deployment name and deployment type.
    3. The deployment is Succeeded. It has its own endpoint, rate limit and guardrail.
    4. Select Open in playground. The system message sets the rules; parameters tune the answers.
    5. Select View code to get the same call in Python, ready for your app.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    You want to try a model today, not after a week of coding.

    😊 THE SOLUTION

    Deploy it in the portal and chat with it in the playground.

    • Long setup✓ Deploy in a few clicks
    • Unsure how it behaves✓ Test in the chat playground
    • Need code next✓ View code
    🛠️ Solved with: Foundry playground

    Start with a question

    You found the perfect model in the catalog. Why can't you just start chatting with it?

    Picture a car showroom in Hyderabad. You can look at every model on the floor, read the spec sheet and compare mileage, but you can’t drive any of them home until one is registered in your name with a number plate.

    Deploying a model in Foundry is that registration. The model gets a deployment name (your number plate) inside your resource, and from then on the playground and your app can use it.

    Explain it like I’m 10

    The technical explanation

    1. 1 Pick a model

      Open the model catalog and choose one, for example gpt-4.1-mini.

    2. 2 Deploy

      Set the deployment name and deployment type (Global Standard by default).

    3. 3 Chat

      Open the playground, write a system message and ask questions.

    4. 4 Tune

      Change temperature, max tokens and other parameters.

    5. 5 View code

      Copy sample code that calls your deployment by name.

    From catalog to working code in the Foundry portal

    The deploy step

    When you select Deploy on a model, Foundry asks for:

    • Deployment name: anything you like, such as gpt-4.1-mini or support-bot. Your code will pass this exact name as model.
    • Deployment type: where requests are processed and how you pay.
    • Rate limit (tokens per minute) from your quota, plus the guardrail (content filter) to apply.
    Deployment typeWhat it meansPick it when
    Global StandardPay per token; requests can be processed in any regionYou’re starting out, or want the newest models
    Data Zone StandardProcessing stays inside the US, EU or APAC data zoneData must stay in a zone
    StandardProcessing in the resource’s own geographyStrict regional processing
    Provisioned (global, data zone or regional)Reserved capacity in provisioned throughput unitsSteady, high volume with predictable latency
    Global BatchUpload a file of requests, results within 24 hours, about half the priceLarge jobs that aren’t urgent

    Data stored at rest stays in your resource’s geography for every type.

    The chat playground

    The playground has a system message box, a chat window and a parameters panel:

    ParameterWhat it does
    Temperature (0 to 2)Lower is focused and repeatable, higher is more varied and creative
    Top PAnother way to control variety. Change this or temperature, not both
    Max output tokensCaps the length of each reply
    Stop sequencesText that makes the model stop generating
    Frequency and presence penaltyDiscourage repeating the same words or topics
    Past messages includedHow much chat history is sent with each new question

    Reasoning models show a reasoning effort setting instead of temperature.

    When you’re happy, select View code. It shows sample code (Python and other languages) with your endpoint, deployment name, system message and parameters already filled in, so the app behaves the same as the playground.

    Architect level Quota, rate limits and instant access

    Each subscription has a quota of tokens per minute per model and region. When you deploy, you assign part of that quota to the deployment, and requests over the limit get HTTP 429 errors. Some models in preview offer instant access, where you can call them by name without creating a deployment, but for the exam assume the deploy-then-call flow. Open models can also run on managed compute, where you pay per hour for the VMs instead of per token.

    Real-world business scenario

    Retail

    Wide World Importers (fictional)

    The problem
    Product managers wanted to test AI-written product descriptions before asking developers to build anything.
    What they used
    A gpt-4.1-mini deployment on Global Standard named product-writer, tested in the chat playground with a system message, temperature 0.7 and a 150-token limit.
    Why that choice
    The playground let non-developers tune the tone and length themselves, and View code handed developers the exact settings.
    The result
    The first app version matched what the product team had approved in the playground, with no back-and-forth on settings.

    When to use it and when not to

    ✓ Use it when…

    • You want to try a model and prompts before writing an app.
    • You need to compare settings like temperature side by side.
    • You want sample code that matches a tested setup.

    ✕ Think twice when…

    • Running production traffic through the playground. It's a test tool; call the deployment from your app.
    • Picking a provisioned deployment before you know your traffic. Start with Global Standard.

    ↔ Alternatives to consider

    • The Foundry SDK to call your deployment from code once you know what works.
    • The agent playground when you need tools like file search or web search.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AI-901 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

    Question 1

    Question 1 of 5

    You select a model in the Microsoft Foundry model catalog. What must you do before you can chat with the model in the chat playground?

    Question 2

    Question 2 of 5

    You deploy gpt-4.1-mini and set the deployment name to support-bot. A developer writes code that calls the deployment.

    Which value should the developer pass as the model parameter?

    Question 3

    Question 3 of 5

    While testing in the chat playground, you need the model to give more focused and repeatable answers. Which parameter change should you make?

    Question 4

    Question 4 of 5 · Select 2

    Which TWO statements about the Global Standard deployment type are true?

    Question 5

    Question 5 of 5

    You have tuned a system message and parameters in the chat playground. You need sample code that calls the deployment with the same settings. What should you use?

    Interview preparation

    Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

    Beginner Why do you have to deploy a model before you can use it?

    Model answer

    The catalog is just a list. Deploying creates an endpoint for that model in my Foundry resource with a name, a deployment type and limits, so my project can actually send it requests and I get billed for what I use.

    Interviewer follows up

    What do you pass as the model name in code?

    You

    The deployment name, not the catalog name. If I deployed gpt-4.1-mini as "support-bot", my code uses "support-bot".

    Intermediate What would you change in the playground to make answers more consistent?

    Model answer

    I'd lower the temperature, say to 0.2, and tighten the system message. If answers are being cut off I'd raise max output tokens. I'd change temperature or top_p, not both at once, so I know which one made the difference.

    Experienced developer Which deployment type would you start with, and when would you change it?

    Model answer

    Global Standard is the usual start: pay per token, highest default quota and new models first. If data must be processed inside the EU or US, I'd move to Data Zone Standard. For steady, high-volume traffic where latency must be predictable I'd look at provisioned throughput, and for big offline jobs, Global Batch is about half the price.

    Scenario A tester says the playground gives good answers, but the developer's app doesn't. What would you check first?

    Model answer

    That the app uses the same deployment name, the same system message and the same parameters. Using View code from the playground is the quickest way to make them match.

    Quick revision

    Key points

    • You must deploy a model before the playground or an app can call it.
    • The deployment name you choose is what code passes as model.
    • Global Standard is the default deployment type, billed per token.
    • The chat playground lets you set a system message and tune temperature, top_p and max tokens.
    • View code copies working code for the current setup.

    Important terminology

    Deployment
    A hosted instance of a model in your Foundry resource that your apps and the playground can call.
    Deployment name
    The name you give a deployment. Code passes this name as the model parameter.
    Global Standard
    The default deployment type. You pay per token and requests may be processed in any Azure region.
    Chat playground
    A page in the Foundry portal where you chat with a deployment, edit the system message and change parameters without writing code.
    Temperature
    A parameter from 0 to 2 that controls randomness. Low values give focused, repeatable answers; high values give more varied ones.
    Max output tokens
    The upper limit on how many tokens the model can generate in one reply.
    View code
    The playground button that shows sample code for the current deployment, system message and parameters.

    Common mistakes

    • Using the catalog model name in code when the deployment has a different name.
    • Changing temperature and top_p together, then not knowing which caused the change.

    Exam tips

    • "Test prompts and parameters without writing code" = chat playground.
    • "More predictable, less creative answers" = lower temperature.
    • "Answers are cut off mid-sentence" = raise max output tokens.

    Five quick revision questions

    1. 1.What's the default deployment type for most models?Show

      Global Standard.

    2. 2.Which name does your code use to call a model?Show

      The deployment name.

    3. 3.What does a low temperature do?Show

      Makes answers more focused and repeatable.

    4. 4.Where do you get sample code for your playground setup?Show

      The View code button in the playground.

    5. 5.What limits the length of a reply?Show

      Max output tokens.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Build a Chat App with the Foundry SDK

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.