https://retellai.com/?utm_source=discord&utm_medium=seo logo
what is the correct API endpoint to inject context...
# ❓・ai-evy-support
a
@AI Evy what is the correct API endpoint to inject context into conversations.
a
Thanks for tagging me @asmith1516. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, I don't see a specific API endpoint dedicated to "injecting context" into conversations. However, the documentation shows several relevant approaches: For chat conversations, you can create chat completions using the
create-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)
Copy code
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?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Create Chat Completion](https://docs.retellai.com/deploy/create-chat-completion) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) ​
a
could you check the api endpoint docs then