https://retellai.com/?utm_source=discord&utm_medium=seo logo
What difference does it make to use a custom API k...
# ❓・ai-evy-support
g
@AI Evy What difference does it make to use a custom API key for the LLM vs using the inbuilt LLM providers?
a
Thanks for tagging me @gagan9474. I'll look through relevant sources and get back to you shortly.
### Answer When using a custom LLM (via the LLM WebSocket) , you're not relying on Retell's infrastructure for the language model [(1) ]() . This means: Cost differences: - You're not charged for Retell's LLM usage since you're using your own resources [(2) ](

▾

) - The cost goes down because you're not relying on Retell's resources - You would use your own API credentials and be billed directly by your LLM provider (like OpenAI) Control and customization: - With a custom LLM, you have complete control over the conversation logic, prompts, and how the agent responds [(1) ]() - You can implement your own custom logic for handling transcripts, tool calls, and responses - You manage the WebSocket connection where Retell sends you live transcripts and you send back responses Built-in LLM providers: - When using Retell's built-in LLM options (like GPT-4.1, Claude, Gemini) , Retell handles all the LLM infrastructure [(3) ]() - You configure settings like
model
,
model_temperature
, and
tool_call_strict_mode
directly in the Retell dashboard or API - Pricing is bundled into Retell's per-minute costs [(4) ]() The main tradeoff is flexibility vs. simplicity: custom LLMs give you maximum control but require more development work, while built-in providers are easier to set up but less customizable [(1) ]() .
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Personalization with Airtable](

https://www.youtube.com/watch?v=U8jdhkqOOhE▾

) [[3] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) [[4] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
g
What differenec does it make to latency
@AI Evy what differenec does it make to letency?
a
Thanks for the follow-up, @gagan9474. I'll get back to you soon.
### Answer When using a custom LLM via the LLM WebSocket, your response system's time to first sentence latency (time to first token + time to generate a sentence) is factored into the overall latency [(1) ]() . It's crucial to have a low latency LLM inference to make the overall experience smooth . Key latency factors with custom LLM: - Your server's response time directly impacts end-to-end latency [(2) ]() - The round-trip time between Retell and your server matters - Your LLM provider's inference speed affects the conversation flow [(1) ]() Built-in LLM providers: - Retell has optimized their infrastructure to reduce latency and improve stability [(3) ]() - Recent optimizations have cut average response times by 100–200ms - Retell proactively avoids latency spikes during peak traffic - The platform maintains 99.99% uptime with built-in failover mechanisms The main difference is that with custom LLMs, you're responsible for optimizing your own infrastructure and LLM inference speed, while built-in providers benefit from Retell's platform-level optimizations [(1) ]() [(3) ]() . **
​ To learn more, see the sources I considered: [[1] Integrate LLM](https://docs.retellai.com/integrate-llm/integrate-llm) [[2] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @gagan9474. I'll get back to you soon.
g
@AI Evy What changes if the LLM is not self hosted but just a seperate OpenAI account that we are using the API keys of
a
### Answer --- When using a custom LLM with your own OpenAI API keys (rather than Retell's built-in providers) , you still need to set up a WebSocket server to handle the LLM integration [(1) ]() . This means: Latency considerations: - Your server's location and the round-trip network time between Retell and your server still impacts latency - Your response system's time to first sentence latency (time to first token + time to generate a sentence) is factored into the overall latency - Even though you're using OpenAI's API, the additional network hop to your server adds some latency compared to Retell's direct integration Cost structure: - You're not relying on Retell's LLM resources, so those costs go down [(2) ](

▾

) - You'll be billed directly by OpenAI for API usage - You still pay Retell for telephony and other platform services Setup requirements: - You need to maintain a WebSocket server that connects to Retell's LLM WebSocket interface [(1) ]() - Your server receives live transcripts from Retell and sends back responses - You're responsible for managing the OpenAI API connection within your server code The key difference from using Retell's built-in OpenAI integration is that you're adding an intermediary layer (your WebSocket server) , which gives you more control but also introduces additional latency and infrastructure complexity .
​ To learn more, see the sources I considered: [[1] Integrate LLM](https://docs.retellai.com/integrate-llm/integrate-llm) [[2] Personalization with Airtable](

https://www.youtube.com/watch?v=U8jdhkqOOhE▾

) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.