Skip to main content
In this article, you learn how to add a new model deployment to a Foundry Models endpoint. The deployment is available for inference in your Foundry resource when you specify the deployment name in your requests.

Prerequisites

To complete this article, you need the following:
  • An Azure subscription.
  • A Foundry project. This project type is managed under a Foundry resource. If you don’t have a Foundry project, see Create a project for Microsoft Foundry.
  • Azure role-based access control (RBAC) permissions to create and manage deployments. You need the Cognitive Services Contributor role or equivalent permissions for the Foundry resource.
  • Foundry Models from partners and community require access to Azure Marketplace. Ensure you have the permissions required to subscribe to model offerings. Foundry Models sold by Azure don’t have this requirement.
  • Install the Azure CLI (version 2.60 or later). The az cognitiveservices commands used in this article are part of the core CLI, so no extra extension is required.
  • Some commands in this tutorial use the jq tool, which might not be installed on your system. For installation instructions, see Download jq.
  • Identify the following information:
    • Your Azure subscription ID
    • Your Foundry resource name
    • The resource group where you deployed the Foundry resource
  • The model name, provider, version, and SKU you want to deploy. Use the Foundry portal or the Azure CLI to find this information. In this example, you deploy the following model:
    • Model name: Phi-4-mini-instruct
    • Provider: Microsoft
    • Version: 1
    • Deployment type: Global standard

Permissions required to subscribe to Models from partners and community

Foundry Models from partners and community available for deployment (for example, Cohere models) require Azure Marketplace. Model providers define the license terms and set the price for use of their models using Azure Marketplace. When deploying third-party models, ensure you have the following permissions in your account:
  • On the Azure subscription:
  • Microsoft.MarketplaceOrdering/agreements/offers/plans/read
  • Microsoft.MarketplaceOrdering/agreements/offers/plans/sign/action
  • Microsoft.MarketplaceOrdering/offerTypes/publishers/offers/plans/agreements/read
  • Microsoft.Marketplace/offerTypes/publishers/offers/plans/agreements/read
  • Microsoft.SaaS/register/action
  • On the resource group—to create and use the SaaS resource:
  • Microsoft.SaaS/resources/read
  • Microsoft.SaaS/resources/write The Owner and Contributor built-in roles on the Azure subscription include these permissions. If you don’t have the required permissions, ask your subscription administrator to assign you the Contributor role, or create a custom role that includes the listed actions.
To verify your permissions, go to the Azure portal, open your subscription, select Access control (IAM) > Check access, and review your assigned roles.
Microsoft.SaaS/register/action is a one-time registration of the SaaS resource provider on the subscription. After registration, it doesn’t need to be repeated for each deployment.
The remaining sections in this article are identical for both the CLI and Bicep approaches.

Use the model

You can consume deployed models using the Endpoints for Foundry Models for the resource. When you construct your request, specify the parameter model and insert the model deployment name you created. You can programmatically get the URI for the inference endpoint by using the following code: Inference endpoint
To make requests to the Foundry Models endpoint by using the OpenAI v1 API, call the /openai/v1/ route on the endpoint URL, https://<resource-name>.openai.azure.com/openai/v1/ and pass the deployment name in the model field of your request. The /openai/v1/ route uses implicit versioning, so you don’t pass an api-version. See the Azure OpenAI v1 API reference for all supported operations. Inference keys

Manage deployments

Use the CLI to view all available deployments:
  1. Run the following command to see all the active deployments:
    Reference: az cognitiveservices account deployment list
  2. Run the following command to see the details of a given deployment:
    Reference: az cognitiveservices account deployment show
  3. Run the following command to delete a given deployment:
    Reference: az cognitiveservices account deployment delete

Troubleshooting