litellm
litellm copied to clipboard
[Bug]: Empty response when trying to get spend logs
What happened?
I am getting an empty response when calling the /spend/logs api.
e.g.
curl -X 'GET' 'http://localhost:4000/spend/logs?api_key=sk-1234&start_date=2024-04-04&end_date=2024-04-05' -H 'accept: application/json' -H 'Authorization: Bearer sk-1234'
We need to determine the amount of spent tokens, not only the costs. What is the best way to do so?
Relevant log output
Output of above curl command:
[]
Twitter / LinkedIn details
No response
Is there a way to export the usage directly, based on the user/api/team keys, as for example a csv or pdf file to analyze the usage?
please use this endpoint for spend reporting @VfBfoerst https://docs.litellm.ai/docs/proxy/cost_tracking#api-endpoints-to-get-spend