aparna_10250
08/18/2025, 7:14 AMAI Evy
08/18/2025, 7:14 AMAI Evy
08/18/2025, 7:14 AMAI Evy
08/18/2025, 7:14 AMcreate-agent API endpoint . Here's the code example:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
You have two options for creating chat agents [(2) ]() :
1. Create a new chat agent directly
2. Convert an existing voice agent to a chat agent
Note that chat agents do not support certain voice-specific functions like call transfers, DTMF (press digits) , or telephony features . During conversion from voice to chat, such nodes or functions will be automatically removed .
Once you have a chat agent created, you can then use the chat APIs to create chat sessions [(3) ]() and generate responses [(4) ]() .AI Evy
08/18/2025, 7:14 AMaparna_10250
08/18/2025, 7:14 AMaparna_10250
08/18/2025, 7:14 AMAI Evy
08/18/2025, 7:14 AMAI Evy
08/18/2025, 7:15 AMcreate-agent API endpoint creates agents that are primarily voice agents by default [(1) ]() . However, you can create a chat agent through the Retell dashboard and then use it with the chat APIs [(2) ]() .
The process involves two steps:
1. Create the chat agent - This needs to be done through the Retell dashboard by either creating a new chat agent or converting an existing voice agent
2. Use the chat APIs - Once you have a chat agent created, you can interact with it programmatically using the chat API endpoints [(3) ]() [(4) ]()
For example, after creating a chat agent in the dashboard, you can create a chat session using:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
console.log(chatResponse.agent_id) ;
[(3) ]()
The chat agent creation itself currently requires using the dashboard interface, but all subsequent interactions can be done programmatically through the API [(2) ]() [(3) ]() [(4) ]() .AI Evy
08/18/2025, 7:15 AMAI Evy
08/18/2025, 7:15 AMaparna_10250
08/18/2025, 7:16 AMaparna_10250
08/18/2025, 7:16 AMAI Evy
08/18/2025, 7:16 AMAI Evy
08/18/2025, 7:17 AMAI Evy
08/18/2025, 7:17 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
[(2) ]()
The Create Chat API allows you to create chat sessions with agents, but the agent itself needs to be created first using the Create Agent endpoint [(1) ]() [(3) ]() .
I don't have information in the available sources about a dedicated API endpoint for creating chat-specific agents. The documentation shows that agents are created through the Create Agent API and then can be used for both voice and chat interactions [(1) ]() [(3) ]() [(2) ]() .AI Evy
08/18/2025, 7:17 AMaparna_10250
08/18/2025, 7:19 AMAI Evy
08/18/2025, 7:19 AMAI Evy
08/18/2025, 7:20 AMAI Evy
08/18/2025, 7:20 AMAI Evy
08/18/2025, 7:20 AMaparna_10250
08/18/2025, 7:20 AMAI Evy
08/18/2025, 7:20 AMAI Evy
08/18/2025, 7:21 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
console.log(chatResponse.agent_id) ;
The chat agent creation itself currently requires using the dashboard interface [(1) ]() , but all subsequent interactions can be done programmatically through the API [(3) ]() [(2) ]() .
Note: Retell does not provide native integration with SMS or chat applications at this moment [(1) ]() [(3) ]() . You can only interact with the chat agent via API .AI Evy
08/18/2025, 7:21 AMAI Evy
08/18/2025, 7:21 AM