dj.ufk
10/21/2025, 12:08 PMAI Evy
10/21/2025, 12:08 PMAI Evy
10/21/2025, 12:09 PMcall_analysis
- `call_analyzed`: Triggered when call analysis is complete, including the full call_analysis object
The webhook payload includes duration and financial details such as duration_ms, call_cost with product costs and combined cost [(1) ]() [(2) ]() .
API Request Approach:
You can also retrieve call details using API requests:
1. Get Call API - Retrieve specific call details [(2) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('call_id_here') ;
2. List Calls API - Get multiple calls with filtering options [(3) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;AI Evy
10/21/2025, 12:09 PMcall_cost object containing product costs, total duration, and combined cost [(4) ]() [(3) ]() [(2) ]() . The webhook approach is more efficient as it pushes data automatically when events occur, rather than requiring polling [(1) ]() .
Note: There's a known issue where call_analyzed webhooks may be sent multiple times for some calls [(5) ]() . If this affects you, consider using the call_ended webhook or the Get Call API as alternatives .AI Evy
10/21/2025, 12:09 PMAI Evy
10/21/2025, 12:09 PMdj.ufk
10/21/2025, 12:10 PMAI Evy
10/21/2025, 12:10 PMAI Evy
10/21/2025, 12:10 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
// Retrieve calls from when your server was down
const callResponses = await client.call.list() ;
You can filter calls by timestamp to retrieve only the calls that occurred during your server downtime and process the missed call data .
Best practice: Consider implementing both webhooks for real-time processing and periodic API polling as a backup to ensure you don't miss any call data during server outages.AI Evy
10/21/2025, 12:10 PMAI Evy
10/21/2025, 12:10 PMdj.ufk
10/21/2025, 12:11 PMAI Evy
10/21/2025, 12:11 PMAI Evy
10/21/2025, 12:11 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;
console.log(callResponses) ;
Filtering by time period:
The List Calls API supports several filtering options :
- `filter_criteria.start_timestamp_gte`: Filter calls that started after or at this timestamp (milliseconds since epoch)
- `filter_criteria.start_timestamp_lte`: Filter calls that started before or at this timestamp (milliseconds since epoch)
- `filter_criteria.end_timestamp_gte`: Filter calls that ended after or at this timestamp (milliseconds since epoch)
- `filter_criteria.end_timestamp_lte`: Filter calls that ended before or at this timestamp (milliseconds since epoch)
Sorting and pagination:
The API also supports :
- `sort_order`: Sort by start_timestamp in ascending or descending order
- `limit`: Limit the number of calls returned (default 50, max 1000)
- `pagination_key`: Use for fetching additional pages if you have more than 1000 calls
This allows you to efficiently retrieve all calls that occurred during your server downtime by specifying the exact time range when your server was offline.AI Evy
10/21/2025, 12:11 PMAI Evy
10/21/2025, 12:11 PMAI Evy
10/21/2025, 12:12 PMdj.ufk
10/21/2025, 12:13 PMAI Evy
10/21/2025, 12:13 PMAI Evy
10/21/2025, 12:13 PMcall_cost object that contains [(1) ]() :
- `product_costs`: Array of individual product costs (like TTS services)
- `total_duration_seconds`: Total call duration
- `total_duration_unit_price`: Price per unit of duration
- `combined_cost`: Total cost for the call
Example from the Create Phone Call API response:
json
"call_cost": {
"product_costs": [
{
"product": "elevenlabs_tts",
"unit_price": 1,
"cost": 60
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"combined_cost": 70
}
This allows you to calculate the per-minute cost after calls complete, but I don't see API endpoints that provide prospective pricing information for agents before calls are made.
For current pricing information and how pricing changes might be communicated, I'd recommend:
- Visit [Contact Sales]()
- Visit [)
Would you like a general answer based on my knowledge instead, or do you have other questions about the call cost data that's available through the APIs?AI Evy
10/21/2025, 12:13 PMAI Evy
10/21/2025, 12:13 PMdj.ufk
10/21/2025, 12:14 PMAI Evy
10/21/2025, 12:14 PMAI Evy
10/21/2025, 12:14 PMcall_cost object:
The call response includes a call_cost object with detailed pricing information :
json
"call_cost": {
"product_costs": [
{
"product": "elevenlabs_tts",
"unit_price": 1,
"cost": 60
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"combined_cost": 70
}
LLM token usage details:
You'll also get LLM-specific usage information in the llm_token_usage object :
json
"llm_token_usage": {
"values": [123],
"average": 123,
"num_requests": 123
}
How to access this information:
You can retrieve this cost data using either:
1. Get Call API for specific calls [(2) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('call_id_here') ;
2. List Calls API for multiple calls [(1) ]() :
javascript
const callResponses = await client.call.list() ;
The product_costs array will show individual components like TTS services, while combined_cost gives you the total cost for that specific call [(1) ]() [(2) ]() [(3) ]() .AI Evy
10/21/2025, 12:15 PMAI Evy
10/21/2025, 12:15 PMdj.ufk
10/21/2025, 12:18 PMAI Evy
10/21/2025, 12:18 PMAI Evy
10/21/2025, 12:18 PMcall_cost object :
javascript
"call_cost": {
"product_costs": [
{
"product": "elevenlabs_tts",
"unit_price": 1,
"cost": 60
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"combined_cost": 70
}
Why the actual call data is more accurate:
1. **Variable usage**: LLM token usage varies per call based on conversation complexity
2. **Actual duration**: The real call duration may differ from estimates
3. **Dynamic pricing**: The product_costs array shows what was actually charged for each component
Your dashboard breakdown ($0.115/min total) is an estimate, but the actual call costs will be reflected in:
- `product_costs`: Individual component costs (TTS, LLM, etc.)
- `combined_cost`: Total actual cost for the call
- `llm_token_usage`: Actual tokens used for LLM processing
For accurate billing and cost tracking, always use the call_cost data from the completed call rather than the pre-call estimates .AI Evy
10/21/2025, 12:18 PMAI Evy
10/21/2025, 12:18 PMdj.ufk
10/21/2025, 12:32 PMAI Evy
10/21/2025, 12:32 PMAI Evy
10/21/2025, 12:33 PMcall_cost object with detailed pricing information:
json
"call_cost": {
"product_costs": [
{
"product": "elevenlabs_tts",
"unit_price": 1,
"cost": 60
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"combined_cost": 70
}
The web interface billing section shows overall usage breakdown and costs by provider [(4) ]() , but for per-call detailed cost breakdowns showing individual component costs (LLM, TTS, etc.) , you need to retrieve this data programmatically through the API calls [(3) ]() .AI Evy
10/21/2025, 12:33 PMAI Evy
10/21/2025, 12:33 PMdj.ufk
10/21/2025, 12:34 PMAI Evy
10/21/2025, 12:34 PMAI Evy
10/21/2025, 12:34 PMGET <https://api.retellai.com/v2/get-call/%7Bcall_id%7D>
Authorization:
You need to include your API key in the Authorization header :
Authorization: Bearer YOUR_API_KEY
What information you'll get:
The API returns comprehensive call details including :
- `call_cost`: Detailed cost breakdown with product costs and combined cost
- `duration_ms`: Call duration in milliseconds
- `transcript`: Full conversation transcript
- `call_analysis`: Post-call analysis including sentiment and summary
- `recording_url`: Link to the call recording
- `latency`: Performance metrics for the call
- `llm_token_usage`: LLM token usage statistics
Example response structure:
json
{
"call_cost": {
"product_costs": [
{
"product": "elevenlabs_tts",
"unit_price": 1,
"cost": 60
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"combined_cost": 70
},
"duration_ms": 10000,
"transcript": "Agent: hi how are you doing?\nUser: Doing pretty well...",
"call_analysis": {
"call_summary": "The agent called the user...",
"user_sentiment": "Positive",
"call_successful": true
}
}
This gives you all the detailed information about the ended call, including the cost breakdown you were asking about earlier.AI Evy
10/21/2025, 12:34 PMAI Evy
10/21/2025, 12:34 PMdj.ufk
10/21/2025, 12:36 PMAI Evy
10/21/2025, 12:36 PMAI Evy
10/21/2025, 12:36 PMcall_id used in the API [(1) ]() .
However, the API documentation consistently uses call_id as the unique identifier for calls [(2) ]() . For example, in the Get Call API, you retrieve call information using:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
The response includes a call_id field that serves as the unique identifier :
json
{
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"call_status": "registered"
}
While the Session History dashboard provides a comprehensive view of calls [(1) ]() , the documentation doesn't explicitly state whether the session ID shown in the web interface corresponds directly to the API's call_id.
To be certain, you could try using what appears as the session ID in the web interface as the call_id parameter in the Get Call API to see if it returns the expected call data.AI Evy
10/21/2025, 12:36 PMAI Evy
10/21/2025, 12:36 PMdj.ufk
10/21/2025, 12:45 PMAI Evy
10/21/2025, 12:45 PMAI Evy
10/21/2025, 12:45 PMllm_token_usage object is indeed related to pricing, especially when token counts exceed certain thresholds [(1) ]() [(2) ]() [(3) ]() [(4) ]() [(5) ]() .
The llm_token_usage object shows:
- `values`: Array of token counts for each LLM request during the call
- `average`: Average tokens per request
- `num_requests`: Total number of LLM requests made
Regarding the 3,500 token threshold:
Yes, this is directly related to pricing. According to the changelog, there's a Token Length Limit: Maximum of 8192 tokens for Retell LLM [(6) ]() . Additionally, based on community discussions, there are token surcharges that apply when your prompt size exceeds certain thresholds [(7) ]() .
In your example, the individual values array shows token usage per request (116, 110, 126, etc.) , with an average of 246 tokens per request across 18 requests [(1) ]() [(2) ]() [(3) ]() [(4) ]() [(5) ]() . While none of these individual requests exceed 3,500 tokens, the pricing implications depend on:
1. Total token usage across all requests
2. Prompt size - if your base prompt is large, it affects the per-minute surcharge [(7) ](AI Evy
10/21/2025, 12:45 PMAI Evy
10/21/2025, 12:45 PMAI Evy
10/21/2025, 12:45 PM