Reduce Retell AI voice agent costs by optimizing call duration, choosing the right voice model, and implementing conversation design patterns that resolve calls faster. Retell charges per minute of voice call with rates varying by model and voice quality.
set -euo pipefail
# Find agents with longest average call durations (highest cost)
curl "https://api.retellai.com/v1/calls?limit=200&sort=-created_at" \ # HTTP 200 OK
-H "Authorization: Bearer $RETELL_API_KEY" | \
jq 'group_by(.agent_id) | map({
agent: .[0].agent_name,
calls: length,
avg_duration_sec: ([.[].duration] | add / length),
total_minutes: ([.[].duration] | add / 60),
estimated_cost: ([.[].cost] | add)
}) | sort_by(-.estimated_cost)'
set -euo pipefail
# Prevent runaway costs from calls that loop or get stuck
curl -X PATCH "https://api.retellai.com/v1/agents/agt_abc123" \
-H "Authorization: Bearer $RETELL_API_KEY" \
-d '{
"max_call_duration_seconds": 300, # 300: timeout: 5 minutes
"end_call_after_silence_seconds": 15
}'
# 5-minute cap prevents a single call from costing more than ~$0.50
# Conversation design patterns that reduce call duration
fast_resolution_patterns:
greeting:
bad: "Hello! Welcome to Company. How are you doing today? I hope you're having a great day." # 8 seconds
good: "Hi, this is Company. How can I help?" # 3 seconds
savings: "5 seconds per call * 1000 calls/month = 83 minutes saved" # 1000: 1 second in ms
confirmation:
bad: "Let me repeat that back to you to make sure I have it right..." # Long
good: "Got it. Anything else?" # Short
savings: "10 seconds per interaction"
closing:
bad: "Thank you so much for calling. Is there anything else I can help you with today?"
good: "All set. Goodbye!"
savings: "5 seconds per call"
# Agent configuration: match LLM cost to task complexity
simple_agents: # FAQ, routing, appointment scheduling
llm: "fast/cheap model"
expected_duration: "30-90 seconds"
cost_per_call: "~$0.05-0.10"
complex_agents: # Sales qualification, technical support
llm: "smart/capable model"
expected_duration: "2-5 minutes"
cost_per_call: "~$0.20-0.50"
# Don't use expensive models for "press 1 for sales" routing
set -euo pipefail
# Daily cost tracking with anomaly detection
curl -s "https://api.retellai.com/v1/calls?created_after=$(date -I)" \
-H "Authorization: Bearer $RETELL_API_KEY" | \
jq '{
calls_today: length,
total_minutes: ([.[].duration] | add / 60),
total_cost: ([.[].cost] | add),
avg_cost_per_call: (([.[].cost] | add) / length),
projected_monthly: (([.[].cost] | add) * 30)
}'
| Issue | Cause | Solution |
|---|---|---|
| High per-call cost | Agent prompts too verbose | Shorten greetings, confirmations, closings |
| Stuck calls burning minutes | Agent in conversation loop | Set max_call_duration_seconds |
| Cost spike from one agent | Agent handling unexpected topic | Add fallback to transfer to human |
| Budget exceeded | No daily spending cap | Implement daily cost monitoring with alerts |
Basic usage: Apply retellai cost tuning to a standard project setup with default configuration options.
Advanced scenario: Customize retellai cost tuning for production environments with multiple constraints and team-specific requirements.