how do i calculate the cost of a call? I have agen...
# ask-ai
d
how do i calculate the cost of a call? I have agentsession deployed on livekit cloud that has stt, llm and tts
t
Thanks for reaching out, Harsha. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you please share a bit more about the usage metrics for your call? For instance, the duration of the call, how many participants were involved, and the specific usage of STT (speech-to-text), LLM (language model), and TTS (text-to-speech) during the session. This information will really help us make sure we calculate the cost accurately for you.
d
can you tell me what i need to add in the python code to calculate the costs
t
Are you currently using any specific LiveKit APIs or metrics to keep track of the usage for STT, LLM, and TTS? Also, do you happen to have the pricing details for these services on hand? Having this information will really help me guide you through the exact code changes you might need.
s
you should integrate with langfuse or a similar tool
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
d
@square-activity-46232 I would really appreciate it if you could tell me how I can integrate tools to calculate the cost during the call
s
d
Thanks