Cost optimization overview for Microsoft Foundry

To reduce Microsoft Foundry costs, find what drives your spend, apply the cost lever that fits each workload, and keep the savings in place. This overview compares the levers and their trade-offs for developers, platform admins, and FinOps practitioners.

Find what drives your costs

The Foundry portal shows cost by subscription, project, agent, and model, next to the usage that drives it. Usage appears within minutes, and cost appears 8 to 24 hours after usage. Azure Cost Management shows the same cost by meter and tag.

View Where to find it What it shows
Subscription costs (preview) Manage > Cost > Overview Cost, month-end forecast, agent and model spend, and highest-spend assets. Manage > Fleet also lists Top cost increases.
Operations (preview) Manage > Operations Agent runs, model requests, tool calls, and tokens for each agent and model, with errors and latency.
Project, agent, and model costs (preview) Your project's Monitor > Cost tab Cost and usage for a project, broken down by agent and model deployment.
Insights in Foundry Build > Agents > your agent > Insights Recurring behavior in an agent's traces, grouped into categories that include Cost & tokens.
Azure Cost Management Azure portal > Cost Management > Cost analysis Cost by resource, meter, and tag, including reserved costs such as provisioned throughput reservations.

To see cost in the Foundry portal, you need Cost Management read access, such as Cost Management Reader, on the resource group or subscription. Foundry roles don't include it. For details, see Permissions for cost data and cost controls.

Choose a cost lever

Each lever trades something for the savings, such as latency, quality, or a commitment. You can combine levers, such as prompt caching with Flex processing or provisioned throughput, or model router with provisioned throughput: model router serves OpenAI models from your provisioned deployments first.

Lever Use it when Trade-off Where to set it
Agent Optimizer (preview) You want the agent model with the best quality-to-cost trade-off. Runs have their own model costs, and optimized instructions can raise token usage. Prompt agents: the agent's Optimize tab. Hosted agents: model_search_space in eval.yaml.
Model router Your requests vary in difficulty, across tasks such as chat, coding, and reasoning. Model router sends each request to the best-suited model for your goal, and with auto-update it keeps its models current. It can pick a different model for each request. If every request must use the same model, use a direct deployment. Deploy model router. The default Balanced routing mode and the Cost mode both lower cost compared with always calling a frontier model. To change the mode, use Custom settings when you deploy model router.
Reduce tokens per request Instructions, context, or answers are longer than the task needs. Too low an output cap returns incomplete responses that you still pay for. Output caps such as max_output_tokens, shorter instructions, and tool search for large toolboxes.
Prompt caching Requests share a long, identical prompt prefix. Only exact prefix matches benefit, and cache writes can incur charges on GPT-5.6 and later models. Your prompts: put stable content first. Caching is on by default for supported models.
Batch Large, asynchronous jobs don't need an immediate response. Jobs target a 24-hour turnaround, and fine-tuned models aren't supported. A Global-Batch or Data Zone Batch deployment.
Flex processing (preview) Requests are delay-tolerant and noninteractive, on a supported model. There's no latency or service SLA, and requests can return HTTP 429 with no automatic fallback. service_tier set to flex on each request to a Global Standard deployment.
Provisioned throughput with Azure reservations Production traffic is predictable, sustained, and high-volume. Deployed provisioned throughput units (PTUs) bill hourly, even when idle. Reservations are one-month or one-year commitments. Deploy with a provisioned Deployment type first, then buy a reservation on the Reservations page in the Azure portal.
Spillover You want to keep a provisioned deployment fully used and handle bursts. Spilled-over requests add standard token charges and might see added latency. Traffic spillover on the provisioned deployment, or a per-request header.
Delete or scale down idle fine-tuned deployments A fine-tuned deployment that you don't need still accrues hosting, PTU, or GPU charges. You redeploy to use the model again, and released capacity might not be available later. The deployment's detail page under Build > Models.
Right-size evaluation and optimization runs You plan an Agent Optimizer run, whose cost grows with candidates, dataset rows, and evaluators. Smaller runs cost less, but the dataset must still represent your tasks. Prompt agents: the optimization wizard, with an estimate on its Review step. Hosted agents: eval.yaml.

Priority processing is designed for consistent low latency, not for savings, and it has its own rates. Use it only for latency-sensitive traffic: turn on Priority processing for a deployment, or set service_tier to priority on individual requests.

For current rates, see Azure OpenAI pricing, Microsoft Foundry pricing, and fine-tuning pricing.

Keep savings in place

Pair your levers with spending limits and regular reviews, because savings can erode as usage changes.

Cost controls (preview) track spending or token usage for the projects, agents, or model deployments that you choose, as requests run. They send alerts or block requests at thresholds that you set. Create and manage cost controls in the Foundry portal. For alerts on cost across all your Azure services, also create an Azure Cost Management budget.

Review costs regularly:

  • After each change, compare cost with the previous period, and confirm quality with an evaluation.
  • Turn on scheduled Insights analysis to surface recurring cost and token issues.
  • Check reservation utilization. Reserved PTUs that no deployment uses still cost money.
  • If your app retries failed Flex requests with Standard processing (service_tier set to default), track those retries, because they're billed at Standard rates.
  • Watch cached_tokens for cache hits. On GPT-5.6 and later models, also compare cache_write_tokens with later cache reads.