mistralai / client-python

Python client library for Mistral AI platform
Apache License 2.0
477 stars 103 forks source link

Add endpoint to fetch total usage of the day #50

Open alicanyuksel opened 9 months ago

alicanyuksel commented 9 months ago

Hi there,

Are you considering adding an endpoint in your API in the future so that the client can fetch the total usage for the day? Because as you know, more and more, we're integrating LLMs into our tools. It could be interesting to monitor costs without having to go to our MistralAI account. What do you think? :)

Here is an example from OpenAI for this particular use case:

r = openai.api_requestor.APIRequestor();
resp = r.request("GET", '/usage?date=2024-02-07'); // or start_date and end_date
sophiamyang commented 3 months ago

Thanks for the suggestions. This feature is coming soon.