https://retellai.com/?utm_source=discord&utm_medium=seo logo
Can you help me with specific call ID
# ❓・ai-evy-support
j
@AI Evy Can you help me with specific call ID?
a
Thanks for tagging me @japhetgan. I'll look through relevant sources and get back to you shortly.
### Answer I can help you with call ID operations in Retell AI. Here are the main ways to work with call IDs: To get a specific call by call_id: You can retrieve call details using the GET call endpoint [(1) ]() . The call_id is used as a path parameter to identify the specific call you want to retrieve . To list calls: You can retrieve multiple calls using the List Calls endpoint [(2) ]() . This returns an array of call objects, each containing their respective call_id . To update a call: You can update call metadata and settings using the call_id as a path parameter [(3) ]() . To register a phone call: When you register a phone call, the API returns a call_id that you can use for subsequent operations [(4) ]() . For SIP dialing, you can use this call_id to construct the SIP URI [(5) ]() . Here's the JavaScript example for listing calls:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;
console.log(callResponses) ;
[(2) ]() What specific operation do you need help with regarding your call ID? Are you looking to retrieve call details, update call information, or something else?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
I have problem with latency... does propmtp length affect latency? call_418711dcf731c37ff8fb51f3929
@AI Evy
a
Thanks for the follow-up, @japhetgan. I'll get back to you soon.
### Answer Yes, prompt length can affect latency in Retell AI [(1) ]() . The maximum length of prompt when using Retell LLM framework is 8192 tokens by default, and longer prompts will be rejected when creating or updating the LLM . For your specific call ID
call_418711dcf731c37ff8fb51f3929
, you can retrieve detailed latency metrics using the Get Call API [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('call_418711dcf731c37ff8fb51f3929') ;
console.log(callResponse) ;
The response will include a
latency
object with detailed metrics including : - **e2e**: End-to-end latency - **llm**: LLM processing latency - **tts**: Text-to-speech latency - **knowledge_base**: Knowledge base query latency Retell AI aims for sub-800ms latency for optimal user experience [(3) ]() . In human conversation, responses typically arrive within 500ms, so voice agents need to match this natural flow . If your voice agent takes longer than 800ms to respond, you're already losing the conversation . Some factors that can impact latency include [(4) ]() : - LLM latency consistently above 900ms - Denoising mode settings - Interruption sensitivity settings To optimize latency, consider using the fast tier for your LLM if you haven't already .
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] Understand concurrency & limits](https://docs.retellai.com/deploy/concurrency) [[2] Get Call](https://docs.retellai.com/api-references/get-call) [[3] Latency](https://www.retellai.com/glossary/latency) [[4] Latency](https://discord.com/channels/1186424376300679209/1382394591235408005) ​
j
@AI Evy GPT 4.1 models comparisons
a
Thanks for the follow-up, @japhetgan. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Smarter AI Phone Calls with ChatGPT-4.1 | Retell AI | Retell AI](https://www.retellai.com/blog/chatgpt-4-1-ai-phone-calling-retell) [[2] OpenAI 4.1, Version Control, and More Languages Support](https://www.retellai.com/changelog/openai-4-1-version-control-and-more-languages-support) [[3] Create Agent](https://docs.retellai.com/api-references/create-agent) [[4] 4.1 not calling functions as consistently as 4o](https://discord.com/channels/1186424376300679209/1362546174141137230) ​
### Answer The GPT-4.1 family is available on Retell AI with three different tiers, each optimized for different business needs and budgets [(1) ]() . ## GPT-4.1 Model Comparison Intelligence Ranking: [(2) ]() GPT 4.1 > GPT 4o mini > GPT 4o > GPT 4.1 mini > GPT 4.1 nano Latency (lower is faster) : GPT 4.1 nano < GPT 4.1 mini < GPT 4o mini < GPT 4o < GPT 4.1 Price (per minute) : - GPT-4.1 nano: $0.004 - GPT-4o mini: $0.006 - GPT-4.1 mini: $0.016 - GPT-4.1: $0.045 - GPT-4o: $0.050 ## Individual Model Details GPT-4.1 (Flagship tier - $0.045/min) [(1) ]() : - 1M token context window - Exceptional reasoning capabilities across complex topics - Support for multi-tool functionality - Highly natural conversation flow with reduced latency - Sophisticated understanding of nuance and context - Ideal for complex customer service scenarios and sales calls requiring deep product knowledge GPT-4.1 Mini (Mid-tier - $0.016/min) : - 1M token context window - Balances performance with cost-effectiveness GPT-4.1 Nano (Entry-tier - $0.004/min) : - 1M token context window - Streamlined performance for basic call scenarios - Cost-optimized for scale - Ideal for initial call routing, simple information gathering, and straightforward customer interactions ## Available in API All GPT-4.1 models are available for post-call analysis in the Create Agent API [(3) ]() : -
gpt-4.1
-
gpt-4.1-mini
-
gpt-4.1-nano
## Community Feedback Note that some users have reported issues with GPT-4.1 function calling consistency compared to GPT-4o [(4) ](
s/1186424376300679209/1362546174141137230) , with some reverting back to GPT-4o for more reliable function execution .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy break this down for me End to end latency - P90 7451 ms - Median 3163 ms - Min 1698 ms LLM latency - P90 4055 ms - Median 1684 ms - Min 932 ms TTS latency - P90 504 ms - Median 337 ms - Min 264 ms Knowledge base latency - P90 348 ms - Median 234 ms - Min 154 ms
a
Thanks for the follow-up, @japhetgan. I'll get back to you soon.
discord.com/channels/1186424376300679209/1352660400751116360) 4. Review geographic distance - International calls can add latency [(1) ]() Your latency issues are severe enough that users are likely hanging up or talking over the agent. The LLM processing time of 4+ seconds is the main problem that needs immediate resolution .
### Answer Based on your latency breakdown, you have significant performance issues that need immediate attention. Here's what each metric means and what's concerning: ## End-to-End Latency Analysis Your end-to-end latency is severely high [(1) ]() : - P90: 7,451ms - 90% of responses take over 7 seconds - Median: 3,163ms - Half of responses take over 3 seconds - Min: 1,698ms - Even your fastest responses are nearly 2 seconds For context, Retell AI aims for sub-800ms latency, and humans expect responses within 300-500ms [(2) ]() . Your P90 exceeds 3 seconds, which triggers the troubleshooting threshold [(1) ]() . ## Component Breakdown *LLM Latency (Major Issue) * [(3) ]() : - P90: 4,055ms - This is your biggest bottleneck - Normal range should be 500-900ms [(1) ]() - Your LLM is consistently taking 4x longer than acceptable *TTS Latency (Acceptable) * [(3) ]() : - P90: 504ms - This is within reasonable bounds - Not your primary concern *Knowledge Base Latency (Good) * [(4) ]() : - P90: 348ms - Performing well - Not contributing to your latency issues ## Immediate Actions Needed 1. Switch to fast tier LLM - Your LLM latency is the primary culprit [(1) ]() 2. Consider alternative LLM provider - Current provider may have performance issues 3. Check for large prompts - One user reported that putting knowledge base content in prompts (like a 3202 byte .md file) significantly increased latency [(5) ](https://
​ To learn more, see the sources I considered: [[1] Troubleshoot high latency](https://docs.retellai.com/reliability/troubleshoot-latency) [[2] Latency](https://www.retellai.com/glossary/latency) [[3] Get Call](https://docs.retellai.com/api-references/get-call) [[4] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[5] End to end latency went up from ~1500ms to ~3500ms in the last week](https://discord.com/channels/1186424376300679209/1352660400751116360) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy tell me more abot : LLM Latency
a
Thanks for the follow-up, @japhetgan. I'll get back to you soon.
### Answer ## LLM Latency in Retell AI LLM latency is a critical component of your voice agent's overall response time [(1) ]() . Here's what you need to know: ### What is LLM Latency? LLM latency is the time it takes for your Large Language Model to process the user's input and generate a response . Your response system's time to first sentence latency (time to first token + time to generate a sentence) is factored into the overall latency, and it's crucial to have a low latency LLM inference to make the overall experience smooth . ### Why LLM Latency Matters Retell AI starts streaming at first sentence , which means the LLM processing time directly impacts user experience [(2) ]() . Latency leads to sluggish and unnatural interactions, degrading the user experience . This is exacerbated by complex logic or multiple LLM calls . ### Common LLM Latency Issues GPT-4o-mini Specific Issues: Users have reported high LLM latency (from 2500ms to 4200ms) specifically when using gpt-4o-mini with Retell LLM [(3) ]() . This appears to be transient based on server load , and sometimes the latency might be from the OpenAI side . Location-Based Latency: Users hosting on VPS in different regions (like Poland) have experienced median latency of 3200ms with GPT-3.5 turbo [(4) ]() . There could be multiple reasons including LLM complexity and API latency . Assistants API Performance: The OpenAI Assistants API is quite slow when integrated with voice layers because of the way it is structured . V2 API Issues: The v2 stack seems to have more latency than v1, with users reporting total tri
p times around 3700ms [(5) ]() . Switching back to v1 instantly improves performance . ### Solutions for High LLM Latency Change to a Faster LLM: Use a more efficient language model to reduce response time and improve performance [(2) ]() . Optimize Your Setup: Consider your hosting location and infrastructure setup [(4) ]() . Geographic distance between your server and the LLM provider can significantly impact latency. Monitor Performance: You can check estimated latency in the agent detail page under the "Estimated Latency" section to view the average latency for your agent [(6) ]() . Certain settings will increase latency and are marked with a turtle icon . ### Technical Implementation When integrating with LLMs, your response system needs to be optimized for speed [(1) ]() . The platform supports various LLM providers including Azure OpenAI, OpenAI, and OpenRouter . Based on your previous metrics showing LLM latency P90 of 4055ms, this is significantly above acceptable thresholds and requires immediate attention to improve user experience.
​ To learn more, see the sources I considered: [[1] Integrate LLM](https://docs.retellai.com/integrate-llm/integrate-llm) [[2] Troubleshooting AI Voice Agent Issues | Retell AI](https://www.retellai.com/blog/troubleshooting-common-issues-in-voice-agent-development) [[3] High LLM latency with gpt-4o-mini](https://discord.com/channels/1186424376300679209/1270503904173494375) [[4] llm latency](https://discord.com/channels/1186424376300679209/1247142177574879264) [[5] Additional 1.5–2 second latency with v2 API](https://discord.com/channels/1186424376300679209/1263607480047501323) [[6] Check estimated latency](https://docs.retellai.com/reliability/check-estimated-latency) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy does promtp length affect LLM latency
a
Thanks for the follow-up, @japhetgan. I'll get back to you soon.
### Answer Yes, prompt length can significantly affect LLM latency in Retell AI [(1) ]() [(2) ]() . Here's what you need to know: ## Prompt Length Impact on Latency Keep prompts concise: longer prompts can actually harm performance [(1) ]() . This is a key best practice because longer prompts increase processing time and can degrade the overall user experience. Maximum prompt token length is 8192 by default [(2) ]() when using Retell LLM framework, and longer prompts will be rejected when creating or updating the LLM . If your operational needs require longer context, you'll need to contact support at support@retellai.com to discuss options . ## Best Practices for Prompt Optimization If you have a large knowledge base, consider using RAG to filter out only the relevant information [(1) ]() rather than including everything in the prompt. This helps keep prompts concise while still providing necessary context. For conversational AI, latency is very important, so chaining of multiple LLM calls might not be favorable . This means you should design your prompts to minimize back-and-forth processing. ## Why This Matters for Your Latency Issues Given your previous metrics showing LLM latency P90 of 4055ms, prompt length could be a contributing factor. The documentation emphasizes that time to first sentence latency (time to first token + time to generate a sentence) is factored into the overall latency [(3) ]() , so optimizing prompt length can directly improve your response times. Make the response short and concise [(1) ](https://
docs.retellai.com/integrate-llm/llm-best-practice) is also recommended, which applies both to your prompts and the expected agent responses. Consider reviewing your current prompt length and implementing RAG if you're including large amounts of context directly in your prompts.
​ To learn more, see the sources I considered: [[1] Custom LLM Best Practices](https://docs.retellai.com/integrate-llm/llm-best-practice) [[2] Understand concurrency & limits](https://docs.retellai.com/deploy/concurrency) [[3] Integrate LLM](https://docs.retellai.com/integrate-llm/integrate-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.