Edit

Share via


Plan and manage costs for Microsoft Foundry (classic)

Currently viewing: Foundry (classic) portal version - Switch to version for the new Foundry portal

This article shows you how to estimate expenses before deployment, track spending in real time, and set up alerts to avoid budget surprises.

Prerequisites

Before you begin, ensure you have:

  • Azure subscription: An active Azure subscription with the resources you want to monitor.
  • Role-based access control (RBAC): One or both of the following roles at the subscription or resource group scope:
  • Supported Azure account type: One of the supported account types for Cost Management.
  • Region and model availability check: Confirm required model and feature availability in your target regions before deployment. For details, see Feature availability across cloud regions.
  • Resource topology awareness: Know whether your cost views are scoped to subscription, resource group, or resource, and keep the same scope when you compare estimate versus actual cost.
  • Reporting latency expectation: Cost and usage records can appear with delay depending on service ingestion timing. Use trend windows instead of minute-by-minute comparisons for reconciliation.

If you need to grant these roles to team members, see Assign access to Cost Management data and Foundry RBAC roles.

Use this task-to-role mapping as a starting point:

  • View Cost Management data: Cost Management Reader.
  • View Foundry resources and related usage context: Azure AI User.
  • Create or modify custom roles: Owner at the target scope.

Note

Foundry doesn't have a dedicated page in the Azure pricing calculator because Foundry is composed of several optional Azure services. This article shows how to use the calculator to estimate costs for these services.

Estimate costs before using Foundry

Use the Azure pricing calculator to estimate costs before you add Foundry resources.

  1. Go to the Azure pricing calculator.
  2. Search for and select a product, such as Azure Speech in Foundry or Azure Language in Foundry.
  3. Select additional products to estimate costs for multiple services. For example, add Azure AI Search to include potential search costs.
  4. As you add resources to your project, return to the calculator and update estimates.

Validate your cost plan before rollout

Before rolling out to production, validate the following:

  1. Required models and services are available in your target regions. See Feature availability across cloud regions.
  2. The same resource scopes used in your estimates (subscription, resource group, and resource) are used in Cost Management views.
  3. Meter-level cost breakdowns map to expected services and deployments in your architecture.
  4. Built-in roles or custom roles required for cost visibility are assigned to operations and finance users.

Worked example: estimate and verify

Use this lightweight workflow to reduce billing surprises:

  1. Build an estimate in the Azure pricing calculator for the services in your architecture.
  2. Deploy a small test workload and generate representative traffic.
  3. In Cost Management, group costs by Resource and then by Meter.
  4. Compare actual meter charges to your estimate assumptions, and adjust your baseline budget.

Expected result: You can map each major estimate assumption to one or more observed billing meters, and explain any material variance before production rollout.

Reconcile estimates with actual costs

Use this checklist after each test cycle:

  1. Confirm the evaluation scope (subscription, resource group, or resource) matches the scope used in your estimate.
  2. Export or view meter-level charges for the same date range used during test traffic.
  3. Verify that required tags are present and consistently applied to participating resources.
  4. Compare estimate assumptions to observed meters, and record variance by service.
  5. Update budgets and alert thresholds only after you validate at least one full billing cycle trend.

Reference: Azure pricing calculator

Costs associated with Foundry

When you create a Foundry resource, you pay for the Azure services you use, such as Azure OpenAI, Azure Speech in Foundry, Content Safety, Azure Vision in Foundry, Azure Document Intelligence, and Azure Language in Foundry. Costs vary by service and feature. For details, see the Foundry Tools pricing page.

Understand billing models for Foundry

Foundry resources run on Azure infrastructure and accrue costs when deployed. When you create or use Foundry resources, you're charged based on the services you use.

Common billing approaches include:

  • Pay-as-you-go (Serverless API): You're billed according to your usage of each Azure service.
  • Commitment tiers: You commit to using service features for a fixed fee, providing predictable costs. For details, see Commitment tier pricing.

Note

If you use the resource above the quota provided by the commitment plan, you pay for the extra usage as described in the overage amount in the Azure portal when you buy a commitment plan.

Understand the billing model for Foundry Models

Token-based pricing

Language and vision models process inputs by breaking them down into tokens. Text, image, and audio workloads can all use token-based metering. The billing unit and rate can vary by model, deployment type, and meter. Check the pricing page for the exact meter names and units for your deployment. For current rates, see the Azure OpenAI pricing page.

Models sold directly by Azure

Models sold directly by Azure (including Azure OpenAI) are billed by Microsoft. In Cost Management, these charges typically appear as model-related meters associated with your deployed resources.

Models from partners and community

Third-party provider models (such as Cohere) are billed via Azure Marketplace. These entries appear at the resource group level (not the Foundry resource level) under Marketplace > Service Name SaaS, with separate meters for inputs and outputs.

Important

Billing scope and meter placement differ between Microsoft-sold models and partner/community offers. Validate the exact meter names and charge location in your subscription before you finalize budgets.

Fine-tuned models

Azure OpenAI fine-tuned models are charged in three ways:

  • Training: Charged per token or per hour, depending on the model.
  • Hosting: Hourly cost per deployed model (applies even if the model is unused).
  • Inference: Per 1,000 tokens (input and output) when the model is called.

Monitor hosted fine-tuned model costs closely to avoid unexpected charges. For current rates, see the Azure OpenAI pricing page.

Important

Fine-tuned deployments incur hosting charges while deployed, even during low usage periods. Remove or scale down deployments that you don't need. For details on deployment lifecycle and cleanup policies, see the fine-tuning documentation.

HTTP Error response code and billing status

HTTP status codes alone don't determine whether usage is billed. Charges depend on whether billable processing occurred for the request and on the specific meter behavior.

Use Cost Management meter data and service metrics to reconcile billed usage, and treat your invoice and meter records as the source of truth.

Monitor costs

Track your Foundry spending using cost analysis tools. You can view costs by day, month, or year, compare against budgets, and identify spending trends.

Access cost information from the Microsoft Foundry portal or the Azure portal. Reference: Cost analysis

Important

Your Foundry costs are only a subset of your overall application or solution costs. You need to monitor costs for all Azure resources used in your application or solution.

Configure permissions to view costs

To view Foundry costs, assign roles based on the task and scope. For cost reporting, assign the Cost Management Reader role at the required scope. Assign the Azure AI User role when users also need to inspect Foundry resources and usage context.

If built-in roles don't meet your needs, you can create a custom role with least-privilege permissions. Validate role actions in your environment because available actions can evolve over time.

Example read permissions:

  • Microsoft.Consumption/*/read
  • Microsoft.CostManagement/*/read
  • Microsoft.Resources/subscriptions/read
  • Microsoft.CognitiveServices/accounts/AIServices/usage/read

Note

You need the Owner role at the subscription or resource group scope to create custom roles in that scope.

To create a custom role, use one of the following articles:

For more information about custom roles, see Azure custom roles.

To create a custom role, construct a role definition JSON file that specifies permissions and scope for the role. The following example is an illustrative starting point for a custom Foundry Cost Reader role:

{
    "Name": "Foundry Cost Reader",
    "IsCustom": true,
    "Description": "Can see cost metrics in Foundry",
    "Actions": [
        "Microsoft.Consumption/*/read",
        "Microsoft.CostManagement/*/read",
        "Microsoft.Resources/subscriptions/read",
        "Microsoft.CognitiveServices/accounts/AIServices/usage/read"
    ],
    "NotActions": [],
    "DataActions": [],
    "NotDataActions": [],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.CognitiveServices/accounts/<foundryResourceName>"
    ]
}

Replace <subscriptionId>, <resourceGroupName>, and <foundryResourceName> with your actual values.

Note

Validate custom role definitions in a nonproduction environment before broad rollout, and verify each action against your tenant's supported resource provider operations.

Note

This custom role example doesn't grant access to Foundry resources by itself. Assign an additional role such as Azure AI User if users also need Foundry resource visibility.

Monitor in Azure portal

  1. Sign in to the Azure portal.

  2. View costs for your resource group or individual Foundry resource.

    Tip

    To open your Resource group:

    1. Sign in to Microsoft Foundry. Make sure the New Foundry toggle is off. These steps refer to Foundry (classic).
    2. Select your project, then select Management center from the left menu.
    3. Under the Resource heading, select Overview.
    4. Under the Resource properties, select the link to open it directly in the Azure portal.
  3. In the Azure portal, select Cost analysis under Cost Management (for your resource group or Foundry resource).

  4. View the cost overview. Optionally, add filters (deployment tags, user-defined tags) to segment costs by model deployment:

    Screenshot of cost overview showing deployment-level tags filter.

  5. Select Costs by resource > Resources to see your Foundry resource cost split across model deployments:

    Screenshot of split of Foundry resource cost across model deployments.

Understand cost breakdown by meter

Use the Cost Analysis tool to view costs grouped by billing meter:

  1. Sign in to the Azure portal and select your resource group.

  2. Select Cost analysis under Cost Management.

  3. By default, cost analysis is scoped to the selected resource group.

    Important

    Scope Cost Analysis to the resource group where you deployed the Foundry resource. The cost meters associated with Models from Partners and Community display under the resource group instead of the Foundry resource.

  4. Modify Group by to Meter. You can now see that for this particular resource group, the source of the costs comes from different model series.

    Screenshot of how to see the cost by each meter in the resource group.

Models sold directly by Azure

Models sold directly by Azure (including Azure OpenAI) are billed directly by Microsoft. When you inspect your bill, you typically see meters that account for model input and output usage.

Screenshot of cost analysis dashboard scoped to the resource group where the Foundry resource is deployed, highlighting the meters for Azure OpenAI and Phi models. Cost is group by meter.

Models from partners and community

Models provided by third-party providers, like Cohere, are billed using Azure Marketplace. As opposite to Microsoft billing meters, those entries are associated with the resource group where your Foundry is deployed instead of to the Foundry resource itself. Given model providers charge you directly, you see entries under the category Marketplace and Service Name SaaS accounting for inputs and outputs for each consumed model.

Screenshot of cost analysis dashboard scoped to the resource group where the Foundry resource is deployed, highlighting the meters for models billed throughout Azure Marketplace. Cost is group by meter.

Important

This distinction affects how offers are represented and billed in Cost Management. Verify offer details, compliance requirements, and billing meters for each model provider in your environment.

Monitor costs by resource

You can get more detailed billing information by grouping costs by resource:

  1. In Cost Analysis, select View > Cost by resource.

    Screenshot of how to see the cost by each resource in the resource group.

  2. Now you can see the resources generating each of the billing meters. To understand the breakdown of what makes up that cost, it can help to modify Group by to Meter and switching the chart type to Line.

  3. Azure OpenAI models and Microsoft models are displayed as meters under each Foundry resource.

  4. Some providers' models are displayed as meters under Global resources. The word Global isn't related to the SKU of the model deployment (for instance, Global standard). If you have multiple Foundry resources, your bill contains one entry for each model for each Foundry resource. The resource meters have the format model-name-GUID where the GUID is an identifier associated with a given Foundry resource. You notice billing meters accounting for inputs and outputs for each model you consumed.

    Screenshot of cost analysis dashboard scoped to the resource group where the Foundry resource is deployed, highlighting the meters for models billed throughout Azure Marketplace. Cost is group by resource.

It's important to understand scope when you evaluate costs associated with Foundry resources. If your resources are part of the same resource group, you can scope Cost Analysis at that level to understand the effect on costs. If your resources are spread across multiple resource groups, you can scope to the subscription level.

When scoped at a higher level, you often need to add more filters to focus on Azure OpenAI usage. When scoped at the subscription level, you see many other resources that you might not care about in the context of Azure OpenAI cost management. When you scope at the subscription level, navigate to the full Cost analysis tool under the Cost Management service.

Here's an example of how to use the Cost analysis tool to see your accumulated costs for a subscription or resource group:

  1. Search for Cost Management in the top Azure search bar to navigate to the full service experience, which includes more options such as creating budgets.
  2. If necessary, select change if the Scope: isn't pointing to the resource group or subscription you want to analyze.
  3. On the left, select Reporting + analytics > Cost analysis.
  4. On the All views tab, select Accumulated costs.

Screenshot of cost analysis dashboard showing how to access accumulated costs.

The cost analysis dashboard shows the accumulated costs that are analyzed depending on what you specified for Scope.

Screenshot of cost analysis dashboard with scope set to subscription.

If you try to add a filter by service, you can't find Azure OpenAI in the list. This situation occurs because Azure OpenAI usage appears under the broader Cognitive Services service classification in Cost Management. If you want to focus on Azure OpenAI usage across a subscription, use Service tier: Azure OpenAI:

Screenshot of cost analysis dashboard with service tier highlighted.

Monitor costs for models in Azure Marketplace

Azure Marketplace offers serverless API deployments. Model publishers might apply different costs depending on the offering. Costs are tied to the subscription and resources where the offer is deployed. Use Microsoft Cost Management to monitor these charges:

  1. Sign in to the Azure portal

  2. On the left pane, select Cost Management + Billing and then select Cost Management.

  3. On the left pane, under the section for Reporting + analytics, select Cost Analysis.

  4. Select a view such as Resources. The cost associated with each resource is displayed.

    Screenshot of the Cost Analysis tool displaying how to show cost per resource.

  5. On the Type column, select the filter icon to filter all the resources of type microsoft.saas/resources. This type corresponds to resources created from offers available in Azure Marketplace. For convenience, you can filter by resource types containing the string SaaS.

    Screenshot of how to filter by resource type containing the string SaaS.

  6. One resource is displayed for each model offer per project. Naming of those resources is model-offer-name-GUID.

  7. Select to expand the resource details to get access to each of the costs meters associated with the resource.

    • Tier represents the offering.
    • Product is the specific product inside the offering.

    Some model providers might use the same name for both.

    A screenshot showing different resources corresponding to different model offers and their associated meters.

    Tip

    Remember that one resource is created per project, for each plan that your project subscribes to.

  8. When you expand the details, costs are reported per each of the meters associated with the offering. Each meter might track different sources of costs like inferencing, or fine tuning. The following meters are displayed (when some cost is associated with them):

    Meter Group Description
    paygo-inference-input-tokens Base model Costs associated with the tokens used as input for inference of a base model.
    paygo-inference-output-tokens Base model Costs associated with the tokens generated as output for the inference of base model.
    paygo-finetuned-model-inference-hosting Fine-tuned model Costs associated with the hosting of an inference endpoint for a fine-tuned model. This value isn't the cost of hosting the model, but the cost of having an endpoint serving it.
    paygo-finetuned-model-inference-input-tokens Fine-tuned model Costs associated with the tokens used as input for inference of a fine tuned model.
    paygo-finetuned-model-inference-output-tokens Fine-tuned model Costs associated with the tokens generated as output for the inference of a fine tuned model.

Create budgets

Prevent cost overruns with automated alerts. Create budgets that track your spending limits and set up alerts to notify you when costs approach or exceed thresholds.

Best practice: Create budgets and alerts for Azure subscriptions and resource groups as part of an overall cost monitoring strategy.

Create budgets with filters for specific resources or services in Azure if you want more granularity in your monitoring. Filters help ensure that you don't accidentally create new resources that cost more money. For more about filter options when you create a budget, see Group and filter options.

Important

While OpenAI has an option for hard limits that prevent you from going over your budget, Azure OpenAI doesn't currently provide this functionality. You can start automation from action groups as part of your budget notifications to take more advanced actions, but this functionality requires additional custom development.

Export cost data

You can export your cost data to a storage account. Exporting data is helpful when you or others need to do additional data analysis for costs. For example, finance teams can analyze the data by using Excel or Power BI. You can export your costs on a daily, weekly, or monthly schedule and set a custom date range. Exporting cost data is the recommended way to retrieve cost datasets.

Other costs that might accrue

Enabling capabilities such as sending data to Azure Monitor Logs and alerting incur extra costs for those services. These costs are visible under those other services and at the subscription level, but aren't visible when scoped just to your Foundry resource.

Using Azure Prepayment

You can pay for Models Sold Directly by Azure charges with your Azure Prepayment (previously called monetary commitment) credit. However, you can't use Azure Prepayment credit to pay for charges for other provider models because they're billed through Azure Marketplace.

For more information, see Azure pricing calculator.

Troubleshoot common cost analysis issues

  • Costs don't match your estimate: Confirm that all dependent resources (for example, storage, networking, and Marketplace resources) are included in your Cost Management scope.
  • Can't see cost data: Confirm you have both cost visibility permissions and Foundry access permissions at the correct scope.
  • Unexpected meter charges: Group by Meter and Resource to identify which service generated the charge, then compare with deployment and traffic patterns.
  • Region rollout cost variance: Validate region/model availability before deployment and recheck assumptions if you deploy in different regions.
  • Tag filters return incomplete results: Verify required tags are applied to all participating resources and inherited consistently from your deployment process.
  • Budget alerts are noisy or delayed: Recalibrate alert thresholds after observing normal usage for a full trend window, then separate warning and critical thresholds.
  • Policy or scope drift changes cost visibility: Confirm your selected scope and policy assignments still include all resources used by the workload.
  • Data appears delayed after test runs: Wait for ingestion latency, then recheck the same time window before concluding there is a billing discrepancy.