Call (V2)
Phone Number
Agent
Retell LLM Response Engine (for single / multi prompt agent)
Knowledge Base
Batch call
Account
Custom Telephony
Custom LLM
Agent
Create Agent
Create a new agent
POST
/
create-agent
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
});
async function main() {
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
});
console.log(agentResponse.agent_id);
}
main();
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"version": 0,
"is_published": false,
"response_engine": {
"type": "retell-llm",
"llm_id": "llm_234sdertfsdsfsdf",
"version": 0
},
"agent_name": "Jarvis",
"voice_id": "11labs-Adrian",
"voice_model": "eleven_turbo_v2",
"fallback_voice_ids": [
"openai-Alloy",
"deepgram-Angus"
],
"voice_temperature": 1,
"voice_speed": 1,
"volume": 1,
"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": "coffee-shop",
"ambient_sound_volume": 1,
"language": "en-US",
"webhook_url": "https://webhook-url-here",
"boosted_keywords": [
"retell",
"kroger"
],
"enable_transcription_formatting": true,
"opt_out_sensitive_data_storage": true,
"opt_in_signed_url": true,
"pronunciation_dictionary": [
{
"word": "actually",
"alphabet": "ipa",
"phoneme": "ˈæktʃuəli"
}
],
"normalize_for_speech": true,
"end_call_after_silence_ms": 600000,
"max_call_duration_ms": 3600000,
"enable_voicemail_detection": true,
"voicemail_message": "Hi, please give us a callback.",
"voicemail_detection_timeout_ms": 30000,
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
]
}
],
"post_call_analysis_model": "gpt-4o-mini",
"begin_message_delay_ms": 1000,
"ring_duration_ms": 30000,
"stt_mode": "fast",
"allow_user_dtmf": true,
"user_dtmf_options": {
"digit_limit": 25,
"termination_key": "#",
"timeout_ms": 8000
},
"last_modification_timestamp": 1703413636133
}
Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Body
application/json
Response
201
application/json
Successfully created a new agent.
The response is of type object
.
Was this page helpful?
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
});
async function main() {
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
});
console.log(agentResponse.agent_id);
}
main();
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"version": 0,
"is_published": false,
"response_engine": {
"type": "retell-llm",
"llm_id": "llm_234sdertfsdsfsdf",
"version": 0
},
"agent_name": "Jarvis",
"voice_id": "11labs-Adrian",
"voice_model": "eleven_turbo_v2",
"fallback_voice_ids": [
"openai-Alloy",
"deepgram-Angus"
],
"voice_temperature": 1,
"voice_speed": 1,
"volume": 1,
"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": "coffee-shop",
"ambient_sound_volume": 1,
"language": "en-US",
"webhook_url": "https://webhook-url-here",
"boosted_keywords": [
"retell",
"kroger"
],
"enable_transcription_formatting": true,
"opt_out_sensitive_data_storage": true,
"opt_in_signed_url": true,
"pronunciation_dictionary": [
{
"word": "actually",
"alphabet": "ipa",
"phoneme": "ˈæktʃuəli"
}
],
"normalize_for_speech": true,
"end_call_after_silence_ms": 600000,
"max_call_duration_ms": 3600000,
"enable_voicemail_detection": true,
"voicemail_message": "Hi, please give us a callback.",
"voicemail_detection_timeout_ms": 30000,
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
]
}
],
"post_call_analysis_model": "gpt-4o-mini",
"begin_message_delay_ms": 1000,
"ring_duration_ms": 30000,
"stt_mode": "fast",
"allow_user_dtmf": true,
"user_dtmf_options": {
"digit_limit": 25,
"termination_key": "#",
"timeout_ms": 8000
},
"last_modification_timestamp": 1703413636133
}