Skip to main content

Retell AI Complete Reference

Overview

Retell AI is an API for building human-like conversational voice AI agents with response times averaging 800ms.

Voice Agent Types

  • Single Prompt Agents: Best for straightforward conversations
  • Multi-Prompt Agents: Multiple specialized prompts for different phases
  • Conversation Flow Agents: Visual flow editor with conditional logic

Custom Functions

{
"name": "book_appointment",
"description": "Books an appointment in the calendar system",
"url": "https://your-api.com/book",
"method": "POST",
"parameters": {
"type": "object",
"properties": {
"date": {"type": "string"},
"time": {"type": "string"},
"name": {"type": "string"}
}
}
}

Webhooks

Event Types:

  • call_started: When call begins
  • call_ended: When call completes
  • call_analyzed: Post-call analysis available
  • function_called: Custom function executed

Pricing (2025)

  • Voice synthesis: $0.07-$0.08/minute
  • LLM usage: $0.03-$0.08/minute
  • Telephony: $0.01-$0.03/minute
  • Total: $0.13-$0.31/minute

Prompt Engineering Template

You are [role description]. Your goal is to [main objective].

CONVERSATION FLOW:
1. Greeting: [specific greeting]
2. Qualification: [what to ask]
3. Action: [what to do with info]
4. Closing: [how to end]

RULES:
- [Specific rule 1]
- [Specific rule 2]

TONE: [Professional/Casual/Empathetic]

WHEN TO CALL FUNCTIONS:
- [Function name]: [When to use it]

Common Use Cases

Appointment Booking

  1. Agent checks calendar availability via function
  2. Collects customer preferences
  3. Confirms slot via function call
  4. Sends confirmation SMS
  5. Updates CRM with appointment details

Lead Qualification

  1. Ask qualifying questions per script
  2. Calculate lead score based on responses
  3. Route qualified leads via webhook
  4. Send lead data to CRM
  5. Trigger follow-up workflow

Troubleshooting

Agent not calling functions:

  • Verify function description is clear
  • Check parameter schema is correct
  • Test in LLM playground first

High latency:

  • Use turbo models when available
  • Optimize function response times
  • Reduce knowledge base size