https://retellai.com/?utm_source=discord&utm_medium=seo logo
Is it possible to see how much each agent costs me...
# ❓・ai-evy-support
m
@AI Evy Is it possible to see how much each agent costs me a week?
a
Thanks for tagging me @minus.ace. I'll look through relevant sources and get back to you shortly.
### Answer --- Based on the available sources, you can retrieve cost information for individual chats using the Get Chat API endpoint [(1) ]() . Each chat object includes a
chat_cost
field that breaks down costs by product and provides a combined total [(2) ]() [(1) ]() . Here's how to retrieve a chat's cost information:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;

console.log(chatResponse.agent_id) ;
[(1) ]() The response includes a
chat_cost
object with product-level costs and a combined total [(2) ]() [(1) ]() :
Copy code
json
"chat_cost": {
 "product_costs": [
 {
 "product": "elevenlabs_tts",
 "unit_price": 1,
 "cost": 60
 }
 ],
 "combined_cost": 70
}
To calculate weekly costs per agent, you would need to retrieve all chats for a specific agent using the List Chat endpoint [(2) ]() , filter by date range, and sum the
combined_cost
values from each chat's
chat_cost
field [(2) ]() [(1) ]() .
​ To learn more, see the sources I considered: [[1] Get Chat](https://docs.retellai.com/api-references/get-chat) [[2] List Chat](https://docs.retellai.com/api-references/list-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy I am using voice agents and is there a way to see how much i am billed for indivdual agents. Currently when i go to billing usage it just shows total for all agents combined
a
Thanks for the follow-up, @minus.ace. I'll get back to you soon.
### Answer --- Based on the available sources, you can track costs per agent by retrieving call data programmatically through the API [(1) ]() [(2) ]() . Each call object includes an
agent_id
field and a
chat_cost
object with detailed cost breakdown . To calculate costs per agent, you would: 1. Use the List Chat endpoint to retrieve all calls [(1) ]() 2. Filter by
agent_id
to isolate calls for each specific agent 3. Sum the
combined_cost
values from each call's
chat_cost
field [(1) ]() [(2) ]() Here's the cost structure returned for each call [(1) ]() :
Copy code
json
"chat_cost": {
  "product_costs": [
    {
      "product": "elevenlabs_tts",
      "unit_price": 1,
      "cost": 60
    }
  ],
  "combined_cost": 70
}
The dashboard billing usage currently shows combined totals, but you can build your own reporting by querying the API and aggregating costs by
agent_id
[(1) ]() [(2) ]() . **
​ To learn more, see the sources I considered: [[1] List Chat](https://docs.retellai.com/api-references/list-chat) [[2] Get Chat](https://docs.retellai.com/api-references/get-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.