Peteypete
08/15/2025, 2:21 AMAI Evy
08/15/2025, 2:21 AMAI Evy
08/15/2025, 2:21 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
model_choice: { model: 'gpt-4o', type: 'cascading' },
nodes: [
{
id: 'start',
instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
type: 'conversation',
},
],
start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
To list existing conversation flows in your workspace, you can use:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponses = await client.conversationFlow.list() ;
console.log(conversationFlowResponses) ;
[(3) ]()
All changes are auto saved when working with conversation flows in the Dashboard [(1) ]() . You can view all options available to the agent within the Dashboard, with details of the options and any latency implications listed there .AI Evy
08/15/2025, 2:21 AMAI Evy
08/15/2025, 2:21 AM