JRTX10
01/23/2026, 5:25 PMAI Evy
01/23/2026, 5:25 PMAI Evy
01/23/2026, 5:26 PMtypescript
import {
OpenAIClient,
AzureKeyCredential,
} from "@azure/openai";
const client = new OpenAIClient(
process.env.AZURE_OPENAI_ENDPOINT,
new AzureKeyCredential(process.env.AZURE_OPENAI_KEY) ,
) ;
The flow works like this:
- Retell sends conversation data to your WebSocket server
- Your server calls your chosen LLM (OpenAI, Azure OpenAI, OpenRouter, etc.)
- You stream the LLM response back to Retell via the WebSocket
This approach gives you flexibility to use any OpenAI-compatible endpoint (like Azure OpenAI, OpenRouter, or self-hosted models) by connecting to them from your custom backend.
Check out the demo repos for implementation examples:
- [Node.js Demo]()
- [Python Demo]()AI Evy
01/23/2026, 5:26 PMAI Evy
01/23/2026, 5:26 PMJRTX10
02/02/2026, 11:46 PM