Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
What drives cost
Five things determine what a voice agent costs:Choose between managed and self-deployed models
model_type determines where model usage is billed:
managed: the service hosts the model. Usage is billed as part of the voice agent.self_deployed: the agent uses your own Foundry model deployment. Model usage is billed against that deployment, under the terms of the deployment type you chose, such as standard or provisioned throughput.
Reduce cost
Most cost reduction for voice agents comes from making the agent talk less and think less:- Cap response length. Set
max_output_tokenson the agent definition. Long spoken answers cost more and are also worse voice design. - Write short instructions. Instructions are resent as context on every turn, so instruction length multiplies across the conversation.
- Prefer static interim responses. A
static_interim_responsefills latency gaps without a model call. Anllm_interim_responseadds a model call on every trigger. - End calls deliberately. Attach the
end_conversationsystem tool so completed calls release the session instead of running until timeout. - Turn off storage when you don’t need it.
storedefaults tofalse. Enable it for the conversations you actually intend to review. - Scope tools. Every attached tool adds tokens to each turn’s context, whether or not the model calls it.
See usage before the invoice
Voice agent traces carry per-turn token usage and estimated-cost attributes, so you can attribute spend to specific conversations while you’re still developing. Estimated cost appears on both the turn span and the session root span, split into a managed component and a self-deployed component undermicrosoft.foundry.voice.estimated_cost.*, with avatar cost reported separately on the root span.
These attributes are estimates for analysis and tuning. They aren’t commerce or invoice records. Use Microsoft Cost Management for billing.
usage field after the session completes. See Voice agent tracing, monitoring, and evaluation.