Skip to main content

Cost Estimates

Overview

This page provides detailed cost estimates for the Mastra Agent Framework infrastructure across all environments. Costs are based on Azure pricing as of January 2026 (East US region) and the checked-in environment files.

info

Key insight: assuming AI services stay within their free or low-usage tiers, the main fixed cost is compute. The checked-in env files use VNet + Service Endpoints + deny-by-default lockdown as the baseline networking model, which adds little to no fixed monthly cost by itself.

Three-Environment Summary

EnvironmentMonthlyAnnual% of Total
Development~$42~$50418%
Staging~$85~$1,02037%
Production~$103~$1,23645%
Total~$230~$2,760100%

Cost Breakdown by Category

CategoryDevStagingProd
Infrastructure$37$75$88
APIM (Consumption)$5$10$15
AI Services$0$0$0
Networking (VNet + SE + Lockdown)~$0~$0~$0
Total~$42~$85~$103

Development Environment

Configuration: Minimal compute with production-style networking: VNet, Service Endpoints, and deny-by-default lockdown.

ServiceSKUSpecificationMonthly Cost
App Service PlanB22 vCPU, 3.5 GB RAM$25.00
SQL DatabaseBasic5 DTUs, 2 GB max$5.00
Container RegistryBasic10 GB storage$5.00
API ManagementConsumptionPay-per-call$5.00
Storage AccountStandard LRSMinimal usage$1.00
Key VaultStandardLow operations$0.50
Application InsightsConsumptionWithin 5 GB free tier$0.00
Virtual NetworkStandard1 VNet, Service Endpoints$0.00
Network Lockdown-Firewall and access restriction config$0.00
Managed Identity-System-assigned$0.00
AI Foundry (OpenAI)S0Variable usage$0.00
Content SafetyS0Pay-per-use (within free tier)$0.00
Form RecognizerS0Pay-per-use (within free tier)$0.00
Total~$42/month
note

Why S0 instead of F0 for AI services? Content Safety and Form Recognizer S0 tiers are pay-per-use with generous free tiers (5,000 requests/month for Content Safety, 500 pages/month for Form Recognizer). F0 has rate limits and feature restrictions that can break development. S0 costs $0 until free tier limits are exceeded.


Staging Environment

Configuration: Production-sized compute with the same baseline networking model as production: VNet, Service Endpoints, and deny-by-default lockdown.

ServiceSKUSpecificationMonthly Cost
App Service PlanP0v31 vCPU, 4 GB RAM$57.00
SQL DatabaseBasic5 DTUs, 2 GB max$5.00
Container RegistryBasic10 GB storage$5.00
API ManagementConsumptionPay-per-call$10.00
Storage AccountStandard LRSModerate usage$2.00
Key VaultStandardModerate operations$0.50
Application InsightsConsumption~3 GB ingestion$5.00
Virtual NetworkStandard1 VNet, Service Endpoints$0.00
Managed Identity-System-assigned$0.00
Network Lockdown-Firewall and access restriction config$0.00
AI Foundry (OpenAI)S0Variable usage$0.00
Content SafetyS0Pay-per-use (within free tier)$0.00
Form RecognizerS0Pay-per-use (within free tier)$0.00
Infrastructure Subtotal$74.50
Networking Subtotal$0.00
Total~$85/month

Production Environment

Configuration: Premium compute (P0v3) with VNet, Service Endpoints, and deny-by-default lockdown.

ServiceSKUSpecificationMonthly Cost% of Total
App Service PlanP0v31 vCPU, 4 GB RAM$57.0038%
SQL DatabaseBasic5 DTUs, 2 GB max$5.003%
Container RegistryBasic10 GB storage$5.003%
API ManagementConsumptionPay-per-call$15.0010%
Storage AccountStandard LRSModerate usage$5.003%
Key VaultStandardProduction operations$1.001%
Application InsightsConsumption~5 GB ingestion$15.0010%
Virtual NetworkStandard1 VNet, 4 subnets$0.000%
Managed Identity-System-assigned$0.000%
Network Lockdown-Firewall and access restriction config$0.000%
AI Foundry (OpenAI)S0Variable usage$0.000%
Content SafetyS0Pay-per-use (within free tier)$0.000%
Form RecognizerS0Pay-per-use (within free tier)$0.000%
Infrastructure Subtotal$88.0085%
Networking Subtotal$0.000%
Total~$103/month100%

Side-by-Side Comparison

ComponentDevelopmentStagingProductionNotes
App Service PlanB2 ($25)P0v3 ($57)P0v3 ($57)Dev stays cheaper
vCPU211Scale up as needed
RAM3.5 GB4 GB4 GBVNet integration on Premium
Instances111Add instances for HA
VNet IntegrationYes (free)Yes (free)YesAll envs use VNet
SQL DatabaseBasic ($5)Basic ($5)Basic ($5)Basic across all envs
Container RegistryBasic ($5)Basic ($5)Basic ($5)Basic across all envs
API ManagementConsumption ($5)Consumption ($10)Consumption ($15)Mandatory for all envs
Storage AccountLRS ($1)LRS ($2)LRS ($5)Minimal usage
Key Vault~$0~$0$1Essentially free
App Insights$0$5$15First 5 GB free
VNetEnabled ($0)Enabled ($0)Enabled ($0)Free in all envs
Service EndpointsYes ($0)Yes ($0)Yes ($0)Free in all envs
Private EndpointsDisabledDisabledDisabledOptional, not baseline
AI ServicesS0 ($0)S0 ($0)S0 ($0)Pay-per-use
Infrastructure$36.50$74.50$88.00Fixed costs
Networking Lockdown$0.00$0.00$0.00Config-only
Monthly Total~$42~$85~$103
Annual Total~$504~$1,020~$1,236

Optional Private Endpoints Cost Breakdown

Private Endpoints are not part of the baseline env files today. If enabled later for a stricter isolation model, they become the main networking cost driver.

ComponentQuantityUnit CostMonthly Cost
Private Endpoints5$7.30/each$36.50
Private DNS Zones5$0.50/each$2.50
Data Processing100 GB$0.01/GB$1.00
Total~$40/month

Typical PE candidates: Key Vault, SQL Server, Storage Account, AI Foundry, AI Search


Free Components

These resources have no additional cost:

ComponentWhy Free
Virtual NetworkVNet itself is free
SubnetsNo charge for subnets
Service EndpointsFree security feature
Managed IdentityNo cost for identities
Key Vault~$0.03 (negligible)
Application InsightsWithin 5 GB free tier
Content SafetyWithin 5k free requests
Form RecognizerFirst 500 pages free

Scaling Options

App Service Plans

TiervCPURAMMonthly CostVNet Integration
B111.75 GB$12No (Service Endpoints only)
B223.5 GB$25No (Service Endpoints only)
S111.75 GB$69Yes
P0v314 GB$57Yes
P1v328 GB$113Yes
P2v3416 GB$226Yes

SQL Database Tiers

TierDTUsMax SizeMonthly CostUse Case
Basic52 GB$5Light workloads
S010250 GB$15Small apps
S120250 GB$30Small-medium
S250250 GB$75Medium apps
S3100250 GB$150Medium-large

Container Registry Tiers

TierStorageMonthly CostPrivate EndpointUse Case
Basic10 GB$5NoDevelopment
Standard100 GB$20NoStaging
Premium500 GB$50YesProduction (geo-replication)

AI Services Pricing

note

Costs depend on your Azure AI Foundry deployment (region + model + version). Multiply monthly input/output token volumes by the per-1M-token rates.

GPT-5.1

DirectionCost per 1M Tokens
Input$2.50
Output$10.00

GPT-5.2

DirectionCost per 1M Tokens
Input$5.00
Output$15.00

Embeddings (text-embedding-3-small)

ModelCost per 1M Tokens
text-embedding-3-small$0.10
text-embedding-3-large$0.13

Content Safety (S0 - Pay-per-use)

TierFree TierAdditional Cost
S05,000 requests/month$1.00 per 1,000 requests
note

Development stays free: With 5,000 free requests per month, typical development usage stays within the free tier. Only production workloads may exceed this limit.

Form Recognizer (S0 - Pay-per-use)

TierFree TierAdditional Cost
S0500 pages/monthVaries by feature ($1-$10 per 1,000 pages)
note

Development stays free: With 500 free pages per month, typical development usage stays within the free tier.


Optional Add-ons

ServiceSKUMonthly CostNotes
AI SearchBasic$75Vector search, RAG workloads

Cost Optimization Strategy

Compared to enterprise-grade configurations with premium SKUs everywhere:

ComponentEnterpriseOptimizedSavings
App ServiceP2v3 x 3 ($678)P0v3 ($57)$621
SQL DatabaseGP Gen5 2 vCore ($367)Basic ($5)$362
Container RegistryPremium x 3 ($150)Basic x 3 ($15)$135
APIMStandard ($700)Consumption ($30)$670
AI SearchStandard S1 ($250)Basic ($75)$175
NetworkingHub + PE ($120)PE only ($40)$80
Production Total$2,265$225$2,040 (90%)

Key Optimization Decisions

  1. Basic SQL across all environments: Most AI workloads are stateless; 5 DTU handles metadata and config
  2. Basic ACR across all environments: No need for Premium features or Private Endpoints on container images
  3. APIM Consumption tier: Pay-per-call instead of fixed monthly cost ($700+ for Standard)
  4. P0v3 for production: Entry-level Premium with VNet integration; scale up only if needed
  5. B2 for dev, P0v3 for staging/prod: keep dev cheaper while preserving prod-like networking
  6. S0 AI services: Pay-per-use with free tiers, no upfront commitment
  7. Service Endpoints + lockdown by default: Private Endpoints stay optional for stricter isolation later

Cost Monitoring Recommendations

  1. Set Azure Cost Management Alerts:

    • Alert at 80% of $250/month budget
    • Daily spend alert at $10
  2. Review AI usage weekly:

    • Monitor token consumption
    • Optimize prompts to reduce tokens
  3. Right-size after 30 days:

    • Check App Service CPU/memory usage
    • Review SQL DTU utilization
    • Scale only if needed
  4. Clean up resources:

    • Delete old container images
    • Archive unused storage blobs