asmith1516
10/19/2025, 12:50 PMAI Evy
10/19/2025, 12:50 PMAI Evy
10/19/2025, 12:51 PMcreate-chat-completion API endpoint [(1) ]() . The API automatically stores all conversation history in Retell's database, so you don't need to manage conversation context yourself .
For conversation flows, you can create flows with context through the create-conversation-flow endpoint [(2) ]() . This allows you to define:
- Global prompts that provide context across all nodes
- Dynamic variables for personalized context [(3) ]()
- Knowledge base IDs for RAG (Retrieval-Augmented Generation)
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
model_choice: { model: 'gpt-5', type: 'cascading' },
nodes: [
{
id: 'start',
instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
type: 'conversation',
},
],
start_speaker: 'agent',
}) ;
[(2) ]()
I don't have information about a direct "inject context" API endpoint in the available sources. For more specific guidance on context injection methods, you may want to check the complete API documentation.
Would you like a general answer based on my knowledge instead?AI Evy
10/19/2025, 12:51 PMAI Evy
10/19/2025, 12:51 PMasmith1516
10/19/2025, 12:52 PM