https://retellai.com/?utm_source=discord&utm_medium=seo logo
- is there an api endpoint to pull billing info fr...
# ❓・ai-evy-support
e
@AI Evy - is there an api endpoint to pull billing info from the account?
a
Thanks for tagging me @earwaxntoast. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, there isn't a dedicated billing API endpoint [(1) ]() . However, you can get cost information for individual calls and chats through the existing API endpoints [(2) ]() [(3) ]() [(4) ]() [(5) ]() . For calls, the
call_cost
object is available in the response and includes detailed cost breakdown [(2) ]() [(3) ]() [(4) ]() :
Copy code
javascript
"call_cost": {
  "product_costs": [
    {
      "product": "elevenlabs_tts",
      "unitPrice": 1,
      "cost": 60
    }
  ],
  "total_duration_seconds": 60,
  "total_duration_unit_price": 1,
  "total_one_time_price": 10,
  "combined_cost": 70
}
For chats, the
chat_cost
object provides similar cost information [(5) ]() :
Copy code
javascript
"chat_cost": {
  "product_costs": [
    {
      "product": "elevenlabs_tts",
      "unitPrice": 1,
      "cost": 60
    }
  ],
  "combined_cost": 70
}
As mentioned in the community discussion, you would need to retrieve all calls using the List Calls endpoint and sum up the costs to get total billing information [(1) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.