{ "phone_number": "+14155551234", "instructions": "You are Sarah, a senior scheduler...", "first_sentence": "Hi, this is Sarah from Bright Dental...", "voice": "alloy", "temperature": 0.7, "max_duration": 10}
Check available voices via GET /v1/voices/builtin and available models via GET /v1/models.
Realtime Mode provides the lowest latency (~200-500ms) and most natural conversations. Legacy Mode gives you full control over voice selection and language/dialect settings. Check model and voice availability via the API.
{ "phone_number": "+14155551234", "from_number": "+18005551234", "instructions": "You are Sarah, a friendly appointment coordinator at Bright Dental. Your goal is to confirm {{patient_name}}'s appointment on {{appointment_date}} at {{appointment_time}}. Be warm, professional, and concise.", "first_sentence": "Hi {{patient_name}}, this is Sarah from Bright Dental. I'm calling to confirm your appointment tomorrow at {{appointment_time}}.", "voice": "alloy", "mode": "realtime", "temperature": 0.7, "max_duration": 5, "request_data": { "patient_name": "John Smith", "appointment_date": "2025-12-24", "appointment_time": "3:00 PM" }, "webhook_url": "https://your-app.com/webhooks/call-complete"}
The AI agent can end calls gracefully when the conversation is complete. This happens automatically when:
The user says goodbye or thanks you
All questions have been answered
The user explicitly asks to end the call
The conversation naturally concludes
The AI will speak a contextual farewell message before hanging up.
You can influence this behavior in your instructions: “Always confirm the next steps before ending the call” or “Ask if there’s anything else before saying goodbye.”
{ "phone_number": "+14155551234", "instructions": "Habla solo en español. Eres un asistente de servicio al cliente...", "mode": "legacy", "stt_language": "es-ES", "voice": "your-spanish-voice-id"}
{ "status": 400, "title": "Invalid request body", "errors": [ { "path": "phone_number", "message": "Phone number must be in E.164 format (e.g., +14155551234)" } ]}