import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const createWebCallResponse = await client.call.createWebCall({
agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
});
console.log(createWebCallResponse.call_id);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
create_web_call_response = client.call.create_web_call(
agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
)
print(create_web_call_response.call_id)curl --request POST \
--url https://api.retellai.com/v3/create-web-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": "latest_published",
"agent_override": {
"agent": {
"response_engine": {
"type": "retell-llm",
"llm_id": "llm_234sdertfsdsfsdf",
"version": 0
},
"agent_name": "Jarvis",
"version_description": "Customer support agent for handling product inquiries",
"version_title": "Production hotfix",
"voice_id": "retell-Cimo",
"fallback_voice_ids": [
"cartesia-Cimo",
"minimax-Cimo"
],
"voice_temperature": 1,
"voice_speed": 1,
"enable_dynamic_voice_speed": true,
"enable_dynamic_responsiveness": true,
"volume": 1,
"voice_emotion": "calm",
"enable_expressive_mode": true,
"expressive_emotion_tags": [
"empathetic",
"excited",
"sigh",
"clear throat",
"emphasis"
],
"expressive_mode_prompt": "Use [sigh] for thoughtful pauses and [excited] for good news.",
"responsiveness": 1,
"interruption_sensitivity": 1,
"enable_backchannel": true,
"backchannel_frequency": 0.9,
"backchannel_words": [
"yeah",
"uh-huh"
],
"reminder_trigger_ms": 10000,
"reminder_max_count": 2,
"ambient_sound_volume": 1,
"language": "en-US",
"webhook_url": "https://webhook-url-here",
"webhook_events": [],
"webhook_timeout_ms": 10000,
"boosted_keywords": [
"retell",
"kroger"
],
"data_storage_setting": "everything",
"data_storage_retention_days": 30,
"opt_in_signed_url": true,
"signed_url_expiration_ms": 86400000,
"pronunciation_dictionary": [
{
"word": "actually",
"alphabet": "ipa",
"phoneme": "ˈæktʃuəli"
}
],
"end_call_after_silence_ms": 600000,
"max_call_duration_ms": 3600000,
"voicemail_option": {
"action": {
"type": "static_text",
"text": "Please give us a callback tomorrow at 10am."
}
},
"ivr_option": {
"action": {
"type": "hangup"
}
},
"call_screening_option": {
"agent_identity": "Acme Health scheduling team",
"call_purpose": "confirming your appointment for tomorrow"
},
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
],
"required": true,
"conditional_prompt": "<string>"
}
],
"post_call_analysis_model": "gpt-4.1-mini",
"begin_message_delay_ms": 1000,
"ring_duration_ms": 30000,
"stt_mode": "fast",
"custom_stt_config": {
"endpointing_ms": 123
},
"vocab_specialization": "general",
"allow_user_dtmf": true,
"allow_dtmf_interruption": false,
"user_dtmf_options": {
"digit_limit": 25.5,
"termination_key": "#",
"timeout_ms": 8000
},
"denoising_mode": "noise-cancellation",
"guardrail_config": {
"output_topics": [],
"input_topics": [
"platform_integrity_jailbreaking"
]
},
"handbook_config": {
"default_personality": true,
"conversational_personality": true,
"natural_filler_words": true,
"high_empathy": true,
"echo_verification": true,
"nato_phonetic_alphabet": true,
"speech_normalization": true,
"smart_matching": true,
"ai_disclosure": true,
"scope_boundaries": true
},
"timezone": "America/New_York"
},
"retell_llm": {
"model": "gpt-5.6-terra",
"s2s_model": "gpt-realtime-1.5",
"model_temperature": 0,
"model_high_priority": true,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"<string>"
],
"kb_config": {
"top_k": 3,
"filter_score": 0.6
},
"begin_after_user_silence_ms": 2000,
"begin_message": "Hey I am a virtual assistant calling from Retell Hospital."
},
"conversation_flow": {
"model_temperature": 0.7,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"kb_001",
"kb_002"
],
"kb_config": {
"top_k": 3,
"filter_score": 0.6
},
"start_speaker": "agent",
"begin_after_user_silence_ms": 2000
}
},
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"current_node_id": "collect_info",
"current_state": "information_collection"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/v3/create-web-call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
'agent_version' => 'latest_published',
'agent_override' => [
'agent' => [
'response_engine' => [
'type' => 'retell-llm',
'llm_id' => 'llm_234sdertfsdsfsdf',
'version' => 0
],
'agent_name' => 'Jarvis',
'version_description' => 'Customer support agent for handling product inquiries',
'version_title' => 'Production hotfix',
'voice_id' => 'retell-Cimo',
'fallback_voice_ids' => [
'cartesia-Cimo',
'minimax-Cimo'
],
'voice_temperature' => 1,
'voice_speed' => 1,
'enable_dynamic_voice_speed' => true,
'enable_dynamic_responsiveness' => true,
'volume' => 1,
'voice_emotion' => 'calm',
'enable_expressive_mode' => true,
'expressive_emotion_tags' => [
'empathetic',
'excited',
'sigh',
'clear throat',
'emphasis'
],
'expressive_mode_prompt' => 'Use [sigh] for thoughtful pauses and [excited] for good news.',
'responsiveness' => 1,
'interruption_sensitivity' => 1,
'enable_backchannel' => true,
'backchannel_frequency' => 0.9,
'backchannel_words' => [
'yeah',
'uh-huh'
],
'reminder_trigger_ms' => 10000,
'reminder_max_count' => 2,
'ambient_sound_volume' => 1,
'language' => 'en-US',
'webhook_url' => 'https://webhook-url-here',
'webhook_events' => [
],
'webhook_timeout_ms' => 10000,
'boosted_keywords' => [
'retell',
'kroger'
],
'data_storage_setting' => 'everything',
'data_storage_retention_days' => 30,
'opt_in_signed_url' => true,
'signed_url_expiration_ms' => 86400000,
'pronunciation_dictionary' => [
[
'word' => 'actually',
'alphabet' => 'ipa',
'phoneme' => 'ˈæktʃuəli'
]
],
'end_call_after_silence_ms' => 600000,
'max_call_duration_ms' => 3600000,
'voicemail_option' => [
'action' => [
'type' => 'static_text',
'text' => 'Please give us a callback tomorrow at 10am.'
]
],
'ivr_option' => [
'action' => [
'type' => 'hangup'
]
],
'call_screening_option' => [
'agent_identity' => 'Acme Health scheduling team',
'call_purpose' => 'confirming your appointment for tomorrow'
],
'post_call_analysis_data' => [
[
'type' => 'string',
'name' => 'customer_name',
'description' => 'The name of the customer.',
'examples' => [
'John Doe',
'Jane Smith'
],
'required' => true,
'conditional_prompt' => '<string>'
]
],
'post_call_analysis_model' => 'gpt-4.1-mini',
'begin_message_delay_ms' => 1000,
'ring_duration_ms' => 30000,
'stt_mode' => 'fast',
'custom_stt_config' => [
'endpointing_ms' => 123
],
'vocab_specialization' => 'general',
'allow_user_dtmf' => true,
'allow_dtmf_interruption' => false,
'user_dtmf_options' => [
'digit_limit' => 25.5,
'termination_key' => '#',
'timeout_ms' => 8000
],
'denoising_mode' => 'noise-cancellation',
'guardrail_config' => [
'output_topics' => [
],
'input_topics' => [
'platform_integrity_jailbreaking'
]
],
'handbook_config' => [
'default_personality' => true,
'conversational_personality' => true,
'natural_filler_words' => true,
'high_empathy' => true,
'echo_verification' => true,
'nato_phonetic_alphabet' => true,
'speech_normalization' => true,
'smart_matching' => true,
'ai_disclosure' => true,
'scope_boundaries' => true
],
'timezone' => 'America/New_York'
],
'retell_llm' => [
'model' => 'gpt-5.6-terra',
's2s_model' => 'gpt-realtime-1.5',
'model_temperature' => 0,
'model_high_priority' => true,
'tool_call_strict_mode' => true,
'knowledge_base_ids' => [
'<string>'
],
'kb_config' => [
'top_k' => 3,
'filter_score' => 0.6
],
'begin_after_user_silence_ms' => 2000,
'begin_message' => 'Hey I am a virtual assistant calling from Retell Hospital.'
],
'conversation_flow' => [
'model_temperature' => 0.7,
'tool_call_strict_mode' => true,
'knowledge_base_ids' => [
'kb_001',
'kb_002'
],
'kb_config' => [
'top_k' => 3,
'filter_score' => 0.6
],
'start_speaker' => 'agent',
'begin_after_user_silence_ms' => 2000
]
],
'metadata' => [
],
'retell_llm_dynamic_variables' => [
'customer_name' => 'John Doe'
],
'current_node_id' => 'collect_info',
'current_state' => 'information_collection'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.retellai.com/v3/create-web-call"
payload := strings.NewReader("{\n \"agent_id\": \"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n \"agent_version\": \"latest_published\",\n \"agent_override\": {\n \"agent\": {\n \"response_engine\": {\n \"type\": \"retell-llm\",\n \"llm_id\": \"llm_234sdertfsdsfsdf\",\n \"version\": 0\n },\n \"agent_name\": \"Jarvis\",\n \"version_description\": \"Customer support agent for handling product inquiries\",\n \"version_title\": \"Production hotfix\",\n \"voice_id\": \"retell-Cimo\",\n \"fallback_voice_ids\": [\n \"cartesia-Cimo\",\n \"minimax-Cimo\"\n ],\n \"voice_temperature\": 1,\n \"voice_speed\": 1,\n \"enable_dynamic_voice_speed\": true,\n \"enable_dynamic_responsiveness\": true,\n \"volume\": 1,\n \"voice_emotion\": \"calm\",\n \"enable_expressive_mode\": true,\n \"expressive_emotion_tags\": [\n \"empathetic\",\n \"excited\",\n \"sigh\",\n \"clear throat\",\n \"emphasis\"\n ],\n \"expressive_mode_prompt\": \"Use [sigh] for thoughtful pauses and [excited] for good news.\",\n \"responsiveness\": 1,\n \"interruption_sensitivity\": 1,\n \"enable_backchannel\": true,\n \"backchannel_frequency\": 0.9,\n \"backchannel_words\": [\n \"yeah\",\n \"uh-huh\"\n ],\n \"reminder_trigger_ms\": 10000,\n \"reminder_max_count\": 2,\n \"ambient_sound_volume\": 1,\n \"language\": \"en-US\",\n \"webhook_url\": \"https://webhook-url-here\",\n \"webhook_events\": [],\n \"webhook_timeout_ms\": 10000,\n \"boosted_keywords\": [\n \"retell\",\n \"kroger\"\n ],\n \"data_storage_setting\": \"everything\",\n \"data_storage_retention_days\": 30,\n \"opt_in_signed_url\": true,\n \"signed_url_expiration_ms\": 86400000,\n \"pronunciation_dictionary\": [\n {\n \"word\": \"actually\",\n \"alphabet\": \"ipa\",\n \"phoneme\": \"ˈæktʃuəli\"\n }\n ],\n \"end_call_after_silence_ms\": 600000,\n \"max_call_duration_ms\": 3600000,\n \"voicemail_option\": {\n \"action\": {\n \"type\": \"static_text\",\n \"text\": \"Please give us a callback tomorrow at 10am.\"\n }\n },\n \"ivr_option\": {\n \"action\": {\n \"type\": \"hangup\"\n }\n },\n \"call_screening_option\": {\n \"agent_identity\": \"Acme Health scheduling team\",\n \"call_purpose\": \"confirming your appointment for tomorrow\"\n },\n \"post_call_analysis_data\": [\n {\n \"type\": \"string\",\n \"name\": \"customer_name\",\n \"description\": \"The name of the customer.\",\n \"examples\": [\n \"John Doe\",\n \"Jane Smith\"\n ],\n \"required\": true,\n \"conditional_prompt\": \"<string>\"\n }\n ],\n \"post_call_analysis_model\": \"gpt-4.1-mini\",\n \"begin_message_delay_ms\": 1000,\n \"ring_duration_ms\": 30000,\n \"stt_mode\": \"fast\",\n \"custom_stt_config\": {\n \"endpointing_ms\": 123\n },\n \"vocab_specialization\": \"general\",\n \"allow_user_dtmf\": true,\n \"allow_dtmf_interruption\": false,\n \"user_dtmf_options\": {\n \"digit_limit\": 25.5,\n \"termination_key\": \"#\",\n \"timeout_ms\": 8000\n },\n \"denoising_mode\": \"noise-cancellation\",\n \"guardrail_config\": {\n \"output_topics\": [],\n \"input_topics\": [\n \"platform_integrity_jailbreaking\"\n ]\n },\n \"handbook_config\": {\n \"default_personality\": true,\n \"conversational_personality\": true,\n \"natural_filler_words\": true,\n \"high_empathy\": true,\n \"echo_verification\": true,\n \"nato_phonetic_alphabet\": true,\n \"speech_normalization\": true,\n \"smart_matching\": true,\n \"ai_disclosure\": true,\n \"scope_boundaries\": true\n },\n \"timezone\": \"America/New_York\"\n },\n \"retell_llm\": {\n \"model\": \"gpt-5.6-terra\",\n \"s2s_model\": \"gpt-realtime-1.5\",\n \"model_temperature\": 0,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"begin_after_user_silence_ms\": 2000,\n \"begin_message\": \"Hey I am a virtual assistant calling from Retell Hospital.\"\n },\n \"conversation_flow\": {\n \"model_temperature\": 0.7,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"kb_001\",\n \"kb_002\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"start_speaker\": \"agent\",\n \"begin_after_user_silence_ms\": 2000\n }\n },\n \"metadata\": {},\n \"retell_llm_dynamic_variables\": {\n \"customer_name\": \"John Doe\"\n },\n \"current_node_id\": \"collect_info\",\n \"current_state\": \"information_collection\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.retellai.com/v3/create-web-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n \"agent_version\": \"latest_published\",\n \"agent_override\": {\n \"agent\": {\n \"response_engine\": {\n \"type\": \"retell-llm\",\n \"llm_id\": \"llm_234sdertfsdsfsdf\",\n \"version\": 0\n },\n \"agent_name\": \"Jarvis\",\n \"version_description\": \"Customer support agent for handling product inquiries\",\n \"version_title\": \"Production hotfix\",\n \"voice_id\": \"retell-Cimo\",\n \"fallback_voice_ids\": [\n \"cartesia-Cimo\",\n \"minimax-Cimo\"\n ],\n \"voice_temperature\": 1,\n \"voice_speed\": 1,\n \"enable_dynamic_voice_speed\": true,\n \"enable_dynamic_responsiveness\": true,\n \"volume\": 1,\n \"voice_emotion\": \"calm\",\n \"enable_expressive_mode\": true,\n \"expressive_emotion_tags\": [\n \"empathetic\",\n \"excited\",\n \"sigh\",\n \"clear throat\",\n \"emphasis\"\n ],\n \"expressive_mode_prompt\": \"Use [sigh] for thoughtful pauses and [excited] for good news.\",\n \"responsiveness\": 1,\n \"interruption_sensitivity\": 1,\n \"enable_backchannel\": true,\n \"backchannel_frequency\": 0.9,\n \"backchannel_words\": [\n \"yeah\",\n \"uh-huh\"\n ],\n \"reminder_trigger_ms\": 10000,\n \"reminder_max_count\": 2,\n \"ambient_sound_volume\": 1,\n \"language\": \"en-US\",\n \"webhook_url\": \"https://webhook-url-here\",\n \"webhook_events\": [],\n \"webhook_timeout_ms\": 10000,\n \"boosted_keywords\": [\n \"retell\",\n \"kroger\"\n ],\n \"data_storage_setting\": \"everything\",\n \"data_storage_retention_days\": 30,\n \"opt_in_signed_url\": true,\n \"signed_url_expiration_ms\": 86400000,\n \"pronunciation_dictionary\": [\n {\n \"word\": \"actually\",\n \"alphabet\": \"ipa\",\n \"phoneme\": \"ˈæktʃuəli\"\n }\n ],\n \"end_call_after_silence_ms\": 600000,\n \"max_call_duration_ms\": 3600000,\n \"voicemail_option\": {\n \"action\": {\n \"type\": \"static_text\",\n \"text\": \"Please give us a callback tomorrow at 10am.\"\n }\n },\n \"ivr_option\": {\n \"action\": {\n \"type\": \"hangup\"\n }\n },\n \"call_screening_option\": {\n \"agent_identity\": \"Acme Health scheduling team\",\n \"call_purpose\": \"confirming your appointment for tomorrow\"\n },\n \"post_call_analysis_data\": [\n {\n \"type\": \"string\",\n \"name\": \"customer_name\",\n \"description\": \"The name of the customer.\",\n \"examples\": [\n \"John Doe\",\n \"Jane Smith\"\n ],\n \"required\": true,\n \"conditional_prompt\": \"<string>\"\n }\n ],\n \"post_call_analysis_model\": \"gpt-4.1-mini\",\n \"begin_message_delay_ms\": 1000,\n \"ring_duration_ms\": 30000,\n \"stt_mode\": \"fast\",\n \"custom_stt_config\": {\n \"endpointing_ms\": 123\n },\n \"vocab_specialization\": \"general\",\n \"allow_user_dtmf\": true,\n \"allow_dtmf_interruption\": false,\n \"user_dtmf_options\": {\n \"digit_limit\": 25.5,\n \"termination_key\": \"#\",\n \"timeout_ms\": 8000\n },\n \"denoising_mode\": \"noise-cancellation\",\n \"guardrail_config\": {\n \"output_topics\": [],\n \"input_topics\": [\n \"platform_integrity_jailbreaking\"\n ]\n },\n \"handbook_config\": {\n \"default_personality\": true,\n \"conversational_personality\": true,\n \"natural_filler_words\": true,\n \"high_empathy\": true,\n \"echo_verification\": true,\n \"nato_phonetic_alphabet\": true,\n \"speech_normalization\": true,\n \"smart_matching\": true,\n \"ai_disclosure\": true,\n \"scope_boundaries\": true\n },\n \"timezone\": \"America/New_York\"\n },\n \"retell_llm\": {\n \"model\": \"gpt-5.6-terra\",\n \"s2s_model\": \"gpt-realtime-1.5\",\n \"model_temperature\": 0,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"begin_after_user_silence_ms\": 2000,\n \"begin_message\": \"Hey I am a virtual assistant calling from Retell Hospital.\"\n },\n \"conversation_flow\": {\n \"model_temperature\": 0.7,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"kb_001\",\n \"kb_002\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"start_speaker\": \"agent\",\n \"begin_after_user_silence_ms\": 2000\n }\n },\n \"metadata\": {},\n \"retell_llm_dynamic_variables\": {\n \"customer_name\": \"John Doe\"\n },\n \"current_node_id\": \"collect_info\",\n \"current_state\": \"information_collection\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/v3/create-web-call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n \"agent_version\": \"latest_published\",\n \"agent_override\": {\n \"agent\": {\n \"response_engine\": {\n \"type\": \"retell-llm\",\n \"llm_id\": \"llm_234sdertfsdsfsdf\",\n \"version\": 0\n },\n \"agent_name\": \"Jarvis\",\n \"version_description\": \"Customer support agent for handling product inquiries\",\n \"version_title\": \"Production hotfix\",\n \"voice_id\": \"retell-Cimo\",\n \"fallback_voice_ids\": [\n \"cartesia-Cimo\",\n \"minimax-Cimo\"\n ],\n \"voice_temperature\": 1,\n \"voice_speed\": 1,\n \"enable_dynamic_voice_speed\": true,\n \"enable_dynamic_responsiveness\": true,\n \"volume\": 1,\n \"voice_emotion\": \"calm\",\n \"enable_expressive_mode\": true,\n \"expressive_emotion_tags\": [\n \"empathetic\",\n \"excited\",\n \"sigh\",\n \"clear throat\",\n \"emphasis\"\n ],\n \"expressive_mode_prompt\": \"Use [sigh] for thoughtful pauses and [excited] for good news.\",\n \"responsiveness\": 1,\n \"interruption_sensitivity\": 1,\n \"enable_backchannel\": true,\n \"backchannel_frequency\": 0.9,\n \"backchannel_words\": [\n \"yeah\",\n \"uh-huh\"\n ],\n \"reminder_trigger_ms\": 10000,\n \"reminder_max_count\": 2,\n \"ambient_sound_volume\": 1,\n \"language\": \"en-US\",\n \"webhook_url\": \"https://webhook-url-here\",\n \"webhook_events\": [],\n \"webhook_timeout_ms\": 10000,\n \"boosted_keywords\": [\n \"retell\",\n \"kroger\"\n ],\n \"data_storage_setting\": \"everything\",\n \"data_storage_retention_days\": 30,\n \"opt_in_signed_url\": true,\n \"signed_url_expiration_ms\": 86400000,\n \"pronunciation_dictionary\": [\n {\n \"word\": \"actually\",\n \"alphabet\": \"ipa\",\n \"phoneme\": \"ˈæktʃuəli\"\n }\n ],\n \"end_call_after_silence_ms\": 600000,\n \"max_call_duration_ms\": 3600000,\n \"voicemail_option\": {\n \"action\": {\n \"type\": \"static_text\",\n \"text\": \"Please give us a callback tomorrow at 10am.\"\n }\n },\n \"ivr_option\": {\n \"action\": {\n \"type\": \"hangup\"\n }\n },\n \"call_screening_option\": {\n \"agent_identity\": \"Acme Health scheduling team\",\n \"call_purpose\": \"confirming your appointment for tomorrow\"\n },\n \"post_call_analysis_data\": [\n {\n \"type\": \"string\",\n \"name\": \"customer_name\",\n \"description\": \"The name of the customer.\",\n \"examples\": [\n \"John Doe\",\n \"Jane Smith\"\n ],\n \"required\": true,\n \"conditional_prompt\": \"<string>\"\n }\n ],\n \"post_call_analysis_model\": \"gpt-4.1-mini\",\n \"begin_message_delay_ms\": 1000,\n \"ring_duration_ms\": 30000,\n \"stt_mode\": \"fast\",\n \"custom_stt_config\": {\n \"endpointing_ms\": 123\n },\n \"vocab_specialization\": \"general\",\n \"allow_user_dtmf\": true,\n \"allow_dtmf_interruption\": false,\n \"user_dtmf_options\": {\n \"digit_limit\": 25.5,\n \"termination_key\": \"#\",\n \"timeout_ms\": 8000\n },\n \"denoising_mode\": \"noise-cancellation\",\n \"guardrail_config\": {\n \"output_topics\": [],\n \"input_topics\": [\n \"platform_integrity_jailbreaking\"\n ]\n },\n \"handbook_config\": {\n \"default_personality\": true,\n \"conversational_personality\": true,\n \"natural_filler_words\": true,\n \"high_empathy\": true,\n \"echo_verification\": true,\n \"nato_phonetic_alphabet\": true,\n \"speech_normalization\": true,\n \"smart_matching\": true,\n \"ai_disclosure\": true,\n \"scope_boundaries\": true\n },\n \"timezone\": \"America/New_York\"\n },\n \"retell_llm\": {\n \"model\": \"gpt-5.6-terra\",\n \"s2s_model\": \"gpt-realtime-1.5\",\n \"model_temperature\": 0,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"begin_after_user_silence_ms\": 2000,\n \"begin_message\": \"Hey I am a virtual assistant calling from Retell Hospital.\"\n },\n \"conversation_flow\": {\n \"model_temperature\": 0.7,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"kb_001\",\n \"kb_002\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"start_speaker\": \"agent\",\n \"begin_after_user_silence_ms\": 2000\n }\n },\n \"metadata\": {},\n \"retell_llm_dynamic_variables\": {\n \"customer_name\": \"John Doe\"\n },\n \"current_node_id\": \"collect_info\",\n \"current_state\": \"information_collection\"\n}"
response = http.request(request)
puts response.read_body{
"call_id": "call_Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p",
"transport": "gateway",
"ice_servers": [
{
"urls": "stun:stun.l.google.com:19302",
"username": "<string>",
"credential": "<string>"
}
],
"expires_at": 1735689600000
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "Trial has ended, please add payment method."
}{
"status": "error",
"message": "Cannot find requested asset under given api key."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Create Web Call
Create a new web call and return browser connection details.
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const createWebCallResponse = await client.call.createWebCall({
agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
});
console.log(createWebCallResponse.call_id);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
create_web_call_response = client.call.create_web_call(
agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
)
print(create_web_call_response.call_id)curl --request POST \
--url https://api.retellai.com/v3/create-web-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": "latest_published",
"agent_override": {
"agent": {
"response_engine": {
"type": "retell-llm",
"llm_id": "llm_234sdertfsdsfsdf",
"version": 0
},
"agent_name": "Jarvis",
"version_description": "Customer support agent for handling product inquiries",
"version_title": "Production hotfix",
"voice_id": "retell-Cimo",
"fallback_voice_ids": [
"cartesia-Cimo",
"minimax-Cimo"
],
"voice_temperature": 1,
"voice_speed": 1,
"enable_dynamic_voice_speed": true,
"enable_dynamic_responsiveness": true,
"volume": 1,
"voice_emotion": "calm",
"enable_expressive_mode": true,
"expressive_emotion_tags": [
"empathetic",
"excited",
"sigh",
"clear throat",
"emphasis"
],
"expressive_mode_prompt": "Use [sigh] for thoughtful pauses and [excited] for good news.",
"responsiveness": 1,
"interruption_sensitivity": 1,
"enable_backchannel": true,
"backchannel_frequency": 0.9,
"backchannel_words": [
"yeah",
"uh-huh"
],
"reminder_trigger_ms": 10000,
"reminder_max_count": 2,
"ambient_sound_volume": 1,
"language": "en-US",
"webhook_url": "https://webhook-url-here",
"webhook_events": [],
"webhook_timeout_ms": 10000,
"boosted_keywords": [
"retell",
"kroger"
],
"data_storage_setting": "everything",
"data_storage_retention_days": 30,
"opt_in_signed_url": true,
"signed_url_expiration_ms": 86400000,
"pronunciation_dictionary": [
{
"word": "actually",
"alphabet": "ipa",
"phoneme": "ˈæktʃuəli"
}
],
"end_call_after_silence_ms": 600000,
"max_call_duration_ms": 3600000,
"voicemail_option": {
"action": {
"type": "static_text",
"text": "Please give us a callback tomorrow at 10am."
}
},
"ivr_option": {
"action": {
"type": "hangup"
}
},
"call_screening_option": {
"agent_identity": "Acme Health scheduling team",
"call_purpose": "confirming your appointment for tomorrow"
},
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
],
"required": true,
"conditional_prompt": "<string>"
}
],
"post_call_analysis_model": "gpt-4.1-mini",
"begin_message_delay_ms": 1000,
"ring_duration_ms": 30000,
"stt_mode": "fast",
"custom_stt_config": {
"endpointing_ms": 123
},
"vocab_specialization": "general",
"allow_user_dtmf": true,
"allow_dtmf_interruption": false,
"user_dtmf_options": {
"digit_limit": 25.5,
"termination_key": "#",
"timeout_ms": 8000
},
"denoising_mode": "noise-cancellation",
"guardrail_config": {
"output_topics": [],
"input_topics": [
"platform_integrity_jailbreaking"
]
},
"handbook_config": {
"default_personality": true,
"conversational_personality": true,
"natural_filler_words": true,
"high_empathy": true,
"echo_verification": true,
"nato_phonetic_alphabet": true,
"speech_normalization": true,
"smart_matching": true,
"ai_disclosure": true,
"scope_boundaries": true
},
"timezone": "America/New_York"
},
"retell_llm": {
"model": "gpt-5.6-terra",
"s2s_model": "gpt-realtime-1.5",
"model_temperature": 0,
"model_high_priority": true,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"<string>"
],
"kb_config": {
"top_k": 3,
"filter_score": 0.6
},
"begin_after_user_silence_ms": 2000,
"begin_message": "Hey I am a virtual assistant calling from Retell Hospital."
},
"conversation_flow": {
"model_temperature": 0.7,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"kb_001",
"kb_002"
],
"kb_config": {
"top_k": 3,
"filter_score": 0.6
},
"start_speaker": "agent",
"begin_after_user_silence_ms": 2000
}
},
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"current_node_id": "collect_info",
"current_state": "information_collection"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/v3/create-web-call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
'agent_version' => 'latest_published',
'agent_override' => [
'agent' => [
'response_engine' => [
'type' => 'retell-llm',
'llm_id' => 'llm_234sdertfsdsfsdf',
'version' => 0
],
'agent_name' => 'Jarvis',
'version_description' => 'Customer support agent for handling product inquiries',
'version_title' => 'Production hotfix',
'voice_id' => 'retell-Cimo',
'fallback_voice_ids' => [
'cartesia-Cimo',
'minimax-Cimo'
],
'voice_temperature' => 1,
'voice_speed' => 1,
'enable_dynamic_voice_speed' => true,
'enable_dynamic_responsiveness' => true,
'volume' => 1,
'voice_emotion' => 'calm',
'enable_expressive_mode' => true,
'expressive_emotion_tags' => [
'empathetic',
'excited',
'sigh',
'clear throat',
'emphasis'
],
'expressive_mode_prompt' => 'Use [sigh] for thoughtful pauses and [excited] for good news.',
'responsiveness' => 1,
'interruption_sensitivity' => 1,
'enable_backchannel' => true,
'backchannel_frequency' => 0.9,
'backchannel_words' => [
'yeah',
'uh-huh'
],
'reminder_trigger_ms' => 10000,
'reminder_max_count' => 2,
'ambient_sound_volume' => 1,
'language' => 'en-US',
'webhook_url' => 'https://webhook-url-here',
'webhook_events' => [
],
'webhook_timeout_ms' => 10000,
'boosted_keywords' => [
'retell',
'kroger'
],
'data_storage_setting' => 'everything',
'data_storage_retention_days' => 30,
'opt_in_signed_url' => true,
'signed_url_expiration_ms' => 86400000,
'pronunciation_dictionary' => [
[
'word' => 'actually',
'alphabet' => 'ipa',
'phoneme' => 'ˈæktʃuəli'
]
],
'end_call_after_silence_ms' => 600000,
'max_call_duration_ms' => 3600000,
'voicemail_option' => [
'action' => [
'type' => 'static_text',
'text' => 'Please give us a callback tomorrow at 10am.'
]
],
'ivr_option' => [
'action' => [
'type' => 'hangup'
]
],
'call_screening_option' => [
'agent_identity' => 'Acme Health scheduling team',
'call_purpose' => 'confirming your appointment for tomorrow'
],
'post_call_analysis_data' => [
[
'type' => 'string',
'name' => 'customer_name',
'description' => 'The name of the customer.',
'examples' => [
'John Doe',
'Jane Smith'
],
'required' => true,
'conditional_prompt' => '<string>'
]
],
'post_call_analysis_model' => 'gpt-4.1-mini',
'begin_message_delay_ms' => 1000,
'ring_duration_ms' => 30000,
'stt_mode' => 'fast',
'custom_stt_config' => [
'endpointing_ms' => 123
],
'vocab_specialization' => 'general',
'allow_user_dtmf' => true,
'allow_dtmf_interruption' => false,
'user_dtmf_options' => [
'digit_limit' => 25.5,
'termination_key' => '#',
'timeout_ms' => 8000
],
'denoising_mode' => 'noise-cancellation',
'guardrail_config' => [
'output_topics' => [
],
'input_topics' => [
'platform_integrity_jailbreaking'
]
],
'handbook_config' => [
'default_personality' => true,
'conversational_personality' => true,
'natural_filler_words' => true,
'high_empathy' => true,
'echo_verification' => true,
'nato_phonetic_alphabet' => true,
'speech_normalization' => true,
'smart_matching' => true,
'ai_disclosure' => true,
'scope_boundaries' => true
],
'timezone' => 'America/New_York'
],
'retell_llm' => [
'model' => 'gpt-5.6-terra',
's2s_model' => 'gpt-realtime-1.5',
'model_temperature' => 0,
'model_high_priority' => true,
'tool_call_strict_mode' => true,
'knowledge_base_ids' => [
'<string>'
],
'kb_config' => [
'top_k' => 3,
'filter_score' => 0.6
],
'begin_after_user_silence_ms' => 2000,
'begin_message' => 'Hey I am a virtual assistant calling from Retell Hospital.'
],
'conversation_flow' => [
'model_temperature' => 0.7,
'tool_call_strict_mode' => true,
'knowledge_base_ids' => [
'kb_001',
'kb_002'
],
'kb_config' => [
'top_k' => 3,
'filter_score' => 0.6
],
'start_speaker' => 'agent',
'begin_after_user_silence_ms' => 2000
]
],
'metadata' => [
],
'retell_llm_dynamic_variables' => [
'customer_name' => 'John Doe'
],
'current_node_id' => 'collect_info',
'current_state' => 'information_collection'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.retellai.com/v3/create-web-call"
payload := strings.NewReader("{\n \"agent_id\": \"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n \"agent_version\": \"latest_published\",\n \"agent_override\": {\n \"agent\": {\n \"response_engine\": {\n \"type\": \"retell-llm\",\n \"llm_id\": \"llm_234sdertfsdsfsdf\",\n \"version\": 0\n },\n \"agent_name\": \"Jarvis\",\n \"version_description\": \"Customer support agent for handling product inquiries\",\n \"version_title\": \"Production hotfix\",\n \"voice_id\": \"retell-Cimo\",\n \"fallback_voice_ids\": [\n \"cartesia-Cimo\",\n \"minimax-Cimo\"\n ],\n \"voice_temperature\": 1,\n \"voice_speed\": 1,\n \"enable_dynamic_voice_speed\": true,\n \"enable_dynamic_responsiveness\": true,\n \"volume\": 1,\n \"voice_emotion\": \"calm\",\n \"enable_expressive_mode\": true,\n \"expressive_emotion_tags\": [\n \"empathetic\",\n \"excited\",\n \"sigh\",\n \"clear throat\",\n \"emphasis\"\n ],\n \"expressive_mode_prompt\": \"Use [sigh] for thoughtful pauses and [excited] for good news.\",\n \"responsiveness\": 1,\n \"interruption_sensitivity\": 1,\n \"enable_backchannel\": true,\n \"backchannel_frequency\": 0.9,\n \"backchannel_words\": [\n \"yeah\",\n \"uh-huh\"\n ],\n \"reminder_trigger_ms\": 10000,\n \"reminder_max_count\": 2,\n \"ambient_sound_volume\": 1,\n \"language\": \"en-US\",\n \"webhook_url\": \"https://webhook-url-here\",\n \"webhook_events\": [],\n \"webhook_timeout_ms\": 10000,\n \"boosted_keywords\": [\n \"retell\",\n \"kroger\"\n ],\n \"data_storage_setting\": \"everything\",\n \"data_storage_retention_days\": 30,\n \"opt_in_signed_url\": true,\n \"signed_url_expiration_ms\": 86400000,\n \"pronunciation_dictionary\": [\n {\n \"word\": \"actually\",\n \"alphabet\": \"ipa\",\n \"phoneme\": \"ˈæktʃuəli\"\n }\n ],\n \"end_call_after_silence_ms\": 600000,\n \"max_call_duration_ms\": 3600000,\n \"voicemail_option\": {\n \"action\": {\n \"type\": \"static_text\",\n \"text\": \"Please give us a callback tomorrow at 10am.\"\n }\n },\n \"ivr_option\": {\n \"action\": {\n \"type\": \"hangup\"\n }\n },\n \"call_screening_option\": {\n \"agent_identity\": \"Acme Health scheduling team\",\n \"call_purpose\": \"confirming your appointment for tomorrow\"\n },\n \"post_call_analysis_data\": [\n {\n \"type\": \"string\",\n \"name\": \"customer_name\",\n \"description\": \"The name of the customer.\",\n \"examples\": [\n \"John Doe\",\n \"Jane Smith\"\n ],\n \"required\": true,\n \"conditional_prompt\": \"<string>\"\n }\n ],\n \"post_call_analysis_model\": \"gpt-4.1-mini\",\n \"begin_message_delay_ms\": 1000,\n \"ring_duration_ms\": 30000,\n \"stt_mode\": \"fast\",\n \"custom_stt_config\": {\n \"endpointing_ms\": 123\n },\n \"vocab_specialization\": \"general\",\n \"allow_user_dtmf\": true,\n \"allow_dtmf_interruption\": false,\n \"user_dtmf_options\": {\n \"digit_limit\": 25.5,\n \"termination_key\": \"#\",\n \"timeout_ms\": 8000\n },\n \"denoising_mode\": \"noise-cancellation\",\n \"guardrail_config\": {\n \"output_topics\": [],\n \"input_topics\": [\n \"platform_integrity_jailbreaking\"\n ]\n },\n \"handbook_config\": {\n \"default_personality\": true,\n \"conversational_personality\": true,\n \"natural_filler_words\": true,\n \"high_empathy\": true,\n \"echo_verification\": true,\n \"nato_phonetic_alphabet\": true,\n \"speech_normalization\": true,\n \"smart_matching\": true,\n \"ai_disclosure\": true,\n \"scope_boundaries\": true\n },\n \"timezone\": \"America/New_York\"\n },\n \"retell_llm\": {\n \"model\": \"gpt-5.6-terra\",\n \"s2s_model\": \"gpt-realtime-1.5\",\n \"model_temperature\": 0,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"begin_after_user_silence_ms\": 2000,\n \"begin_message\": \"Hey I am a virtual assistant calling from Retell Hospital.\"\n },\n \"conversation_flow\": {\n \"model_temperature\": 0.7,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"kb_001\",\n \"kb_002\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"start_speaker\": \"agent\",\n \"begin_after_user_silence_ms\": 2000\n }\n },\n \"metadata\": {},\n \"retell_llm_dynamic_variables\": {\n \"customer_name\": \"John Doe\"\n },\n \"current_node_id\": \"collect_info\",\n \"current_state\": \"information_collection\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.retellai.com/v3/create-web-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n \"agent_version\": \"latest_published\",\n \"agent_override\": {\n \"agent\": {\n \"response_engine\": {\n \"type\": \"retell-llm\",\n \"llm_id\": \"llm_234sdertfsdsfsdf\",\n \"version\": 0\n },\n \"agent_name\": \"Jarvis\",\n \"version_description\": \"Customer support agent for handling product inquiries\",\n \"version_title\": \"Production hotfix\",\n \"voice_id\": \"retell-Cimo\",\n \"fallback_voice_ids\": [\n \"cartesia-Cimo\",\n \"minimax-Cimo\"\n ],\n \"voice_temperature\": 1,\n \"voice_speed\": 1,\n \"enable_dynamic_voice_speed\": true,\n \"enable_dynamic_responsiveness\": true,\n \"volume\": 1,\n \"voice_emotion\": \"calm\",\n \"enable_expressive_mode\": true,\n \"expressive_emotion_tags\": [\n \"empathetic\",\n \"excited\",\n \"sigh\",\n \"clear throat\",\n \"emphasis\"\n ],\n \"expressive_mode_prompt\": \"Use [sigh] for thoughtful pauses and [excited] for good news.\",\n \"responsiveness\": 1,\n \"interruption_sensitivity\": 1,\n \"enable_backchannel\": true,\n \"backchannel_frequency\": 0.9,\n \"backchannel_words\": [\n \"yeah\",\n \"uh-huh\"\n ],\n \"reminder_trigger_ms\": 10000,\n \"reminder_max_count\": 2,\n \"ambient_sound_volume\": 1,\n \"language\": \"en-US\",\n \"webhook_url\": \"https://webhook-url-here\",\n \"webhook_events\": [],\n \"webhook_timeout_ms\": 10000,\n \"boosted_keywords\": [\n \"retell\",\n \"kroger\"\n ],\n \"data_storage_setting\": \"everything\",\n \"data_storage_retention_days\": 30,\n \"opt_in_signed_url\": true,\n \"signed_url_expiration_ms\": 86400000,\n \"pronunciation_dictionary\": [\n {\n \"word\": \"actually\",\n \"alphabet\": \"ipa\",\n \"phoneme\": \"ˈæktʃuəli\"\n }\n ],\n \"end_call_after_silence_ms\": 600000,\n \"max_call_duration_ms\": 3600000,\n \"voicemail_option\": {\n \"action\": {\n \"type\": \"static_text\",\n \"text\": \"Please give us a callback tomorrow at 10am.\"\n }\n },\n \"ivr_option\": {\n \"action\": {\n \"type\": \"hangup\"\n }\n },\n \"call_screening_option\": {\n \"agent_identity\": \"Acme Health scheduling team\",\n \"call_purpose\": \"confirming your appointment for tomorrow\"\n },\n \"post_call_analysis_data\": [\n {\n \"type\": \"string\",\n \"name\": \"customer_name\",\n \"description\": \"The name of the customer.\",\n \"examples\": [\n \"John Doe\",\n \"Jane Smith\"\n ],\n \"required\": true,\n \"conditional_prompt\": \"<string>\"\n }\n ],\n \"post_call_analysis_model\": \"gpt-4.1-mini\",\n \"begin_message_delay_ms\": 1000,\n \"ring_duration_ms\": 30000,\n \"stt_mode\": \"fast\",\n \"custom_stt_config\": {\n \"endpointing_ms\": 123\n },\n \"vocab_specialization\": \"general\",\n \"allow_user_dtmf\": true,\n \"allow_dtmf_interruption\": false,\n \"user_dtmf_options\": {\n \"digit_limit\": 25.5,\n \"termination_key\": \"#\",\n \"timeout_ms\": 8000\n },\n \"denoising_mode\": \"noise-cancellation\",\n \"guardrail_config\": {\n \"output_topics\": [],\n \"input_topics\": [\n \"platform_integrity_jailbreaking\"\n ]\n },\n \"handbook_config\": {\n \"default_personality\": true,\n \"conversational_personality\": true,\n \"natural_filler_words\": true,\n \"high_empathy\": true,\n \"echo_verification\": true,\n \"nato_phonetic_alphabet\": true,\n \"speech_normalization\": true,\n \"smart_matching\": true,\n \"ai_disclosure\": true,\n \"scope_boundaries\": true\n },\n \"timezone\": \"America/New_York\"\n },\n \"retell_llm\": {\n \"model\": \"gpt-5.6-terra\",\n \"s2s_model\": \"gpt-realtime-1.5\",\n \"model_temperature\": 0,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"begin_after_user_silence_ms\": 2000,\n \"begin_message\": \"Hey I am a virtual assistant calling from Retell Hospital.\"\n },\n \"conversation_flow\": {\n \"model_temperature\": 0.7,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"kb_001\",\n \"kb_002\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"start_speaker\": \"agent\",\n \"begin_after_user_silence_ms\": 2000\n }\n },\n \"metadata\": {},\n \"retell_llm_dynamic_variables\": {\n \"customer_name\": \"John Doe\"\n },\n \"current_node_id\": \"collect_info\",\n \"current_state\": \"information_collection\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/v3/create-web-call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n \"agent_version\": \"latest_published\",\n \"agent_override\": {\n \"agent\": {\n \"response_engine\": {\n \"type\": \"retell-llm\",\n \"llm_id\": \"llm_234sdertfsdsfsdf\",\n \"version\": 0\n },\n \"agent_name\": \"Jarvis\",\n \"version_description\": \"Customer support agent for handling product inquiries\",\n \"version_title\": \"Production hotfix\",\n \"voice_id\": \"retell-Cimo\",\n \"fallback_voice_ids\": [\n \"cartesia-Cimo\",\n \"minimax-Cimo\"\n ],\n \"voice_temperature\": 1,\n \"voice_speed\": 1,\n \"enable_dynamic_voice_speed\": true,\n \"enable_dynamic_responsiveness\": true,\n \"volume\": 1,\n \"voice_emotion\": \"calm\",\n \"enable_expressive_mode\": true,\n \"expressive_emotion_tags\": [\n \"empathetic\",\n \"excited\",\n \"sigh\",\n \"clear throat\",\n \"emphasis\"\n ],\n \"expressive_mode_prompt\": \"Use [sigh] for thoughtful pauses and [excited] for good news.\",\n \"responsiveness\": 1,\n \"interruption_sensitivity\": 1,\n \"enable_backchannel\": true,\n \"backchannel_frequency\": 0.9,\n \"backchannel_words\": [\n \"yeah\",\n \"uh-huh\"\n ],\n \"reminder_trigger_ms\": 10000,\n \"reminder_max_count\": 2,\n \"ambient_sound_volume\": 1,\n \"language\": \"en-US\",\n \"webhook_url\": \"https://webhook-url-here\",\n \"webhook_events\": [],\n \"webhook_timeout_ms\": 10000,\n \"boosted_keywords\": [\n \"retell\",\n \"kroger\"\n ],\n \"data_storage_setting\": \"everything\",\n \"data_storage_retention_days\": 30,\n \"opt_in_signed_url\": true,\n \"signed_url_expiration_ms\": 86400000,\n \"pronunciation_dictionary\": [\n {\n \"word\": \"actually\",\n \"alphabet\": \"ipa\",\n \"phoneme\": \"ˈæktʃuəli\"\n }\n ],\n \"end_call_after_silence_ms\": 600000,\n \"max_call_duration_ms\": 3600000,\n \"voicemail_option\": {\n \"action\": {\n \"type\": \"static_text\",\n \"text\": \"Please give us a callback tomorrow at 10am.\"\n }\n },\n \"ivr_option\": {\n \"action\": {\n \"type\": \"hangup\"\n }\n },\n \"call_screening_option\": {\n \"agent_identity\": \"Acme Health scheduling team\",\n \"call_purpose\": \"confirming your appointment for tomorrow\"\n },\n \"post_call_analysis_data\": [\n {\n \"type\": \"string\",\n \"name\": \"customer_name\",\n \"description\": \"The name of the customer.\",\n \"examples\": [\n \"John Doe\",\n \"Jane Smith\"\n ],\n \"required\": true,\n \"conditional_prompt\": \"<string>\"\n }\n ],\n \"post_call_analysis_model\": \"gpt-4.1-mini\",\n \"begin_message_delay_ms\": 1000,\n \"ring_duration_ms\": 30000,\n \"stt_mode\": \"fast\",\n \"custom_stt_config\": {\n \"endpointing_ms\": 123\n },\n \"vocab_specialization\": \"general\",\n \"allow_user_dtmf\": true,\n \"allow_dtmf_interruption\": false,\n \"user_dtmf_options\": {\n \"digit_limit\": 25.5,\n \"termination_key\": \"#\",\n \"timeout_ms\": 8000\n },\n \"denoising_mode\": \"noise-cancellation\",\n \"guardrail_config\": {\n \"output_topics\": [],\n \"input_topics\": [\n \"platform_integrity_jailbreaking\"\n ]\n },\n \"handbook_config\": {\n \"default_personality\": true,\n \"conversational_personality\": true,\n \"natural_filler_words\": true,\n \"high_empathy\": true,\n \"echo_verification\": true,\n \"nato_phonetic_alphabet\": true,\n \"speech_normalization\": true,\n \"smart_matching\": true,\n \"ai_disclosure\": true,\n \"scope_boundaries\": true\n },\n \"timezone\": \"America/New_York\"\n },\n \"retell_llm\": {\n \"model\": \"gpt-5.6-terra\",\n \"s2s_model\": \"gpt-realtime-1.5\",\n \"model_temperature\": 0,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"begin_after_user_silence_ms\": 2000,\n \"begin_message\": \"Hey I am a virtual assistant calling from Retell Hospital.\"\n },\n \"conversation_flow\": {\n \"model_temperature\": 0.7,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"kb_001\",\n \"kb_002\"\n ],\n \"kb_config\": {\n \"top_k\": 3,\n \"filter_score\": 0.6\n },\n \"start_speaker\": \"agent\",\n \"begin_after_user_silence_ms\": 2000\n }\n },\n \"metadata\": {},\n \"retell_llm_dynamic_variables\": {\n \"customer_name\": \"John Doe\"\n },\n \"current_node_id\": \"collect_info\",\n \"current_state\": \"information_collection\"\n}"
response = http.request(request)
puts response.read_body{
"call_id": "call_Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p",
"transport": "gateway",
"ice_servers": [
{
"urls": "stun:stun.l.google.com:19302",
"username": "<string>",
"credential": "<string>"
}
],
"expires_at": 1735689600000
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "Trial has ended, please add payment method."
}{
"status": "error",
"message": "Cannot find requested asset under given api key."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Body
Unique id of agent used for the call. Your agent would contain the LLM Websocket url used for this call.
1"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"
The version of the agent to use for the call.
1 - 20^(latest|latest_published|(?!(?:latest|latest_published|v\d+)$)[a-z][a-z0-9_-]{0,19})$"latest_published"
For this particular call, override agent configuration with these settings. This allows you to customize agent behavior for individual calls without modifying the base agent.
Show child attributes
Show child attributes
An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object.
Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.
Show child attributes
Show child attributes
{ "customer_name": "John Doe" }
Start the call at this conversation flow node (stage). Must be a valid node id in the agent's conversation flow. Only applicable when the agent uses conversation flow as the response engine. Ignored for retell-llm agents.
"collect_info"
Start the conversation in this state (stage). Must be a valid state name in the agent's Retell LLM. Only applicable when the agent uses Retell LLM with states. Ignored for conversation-flow agents.
"information_collection"
Response
Successfully created a web call.
Unique identifier for the web call.
"call_Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6"
Token authorizing this browser to join the web call. Pass it to your frontend.
"eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p"
Connection transport to select in the web client.
gateway ICE servers to configure before the browser creates its peer connection.
Show child attributes
Show child attributes
Unix epoch ms when the access_token expires.
1735689600000
Was this page helpful?

