I have the token usage tied to the user in the DB. I’m talking about a bridge that removes me as the middleman. Because Stripe charges about 3%, so I would have to charge a minimum of 3% of total token usage of the user just to break even. I’d rather only have to charge like a monthly subscription fee to use my product.
Is there a way to track the usage of each API key generated?
I need to keep track of usage by API key used by different projects.
I wrote a command line tool using nodejs, ref: https://community.openai.com/t/use-cli-to-batch-download-the-usage-data-of-openai-api/127734
Note that the usage data given by openai may exceed expectations. For example, I saw a message about using 152k tokens last month. Someone explained it here, but it is still very strange. ref: https://community.openai.com/t/what-is-n-context-tokens-total-why-is-it-so-large/127420
I also need something like this. Tracking usage with each key would be very helpful.
Is there any progress on python scripts? Why OpenAI couldn’t simply present a user chart for organization owner in the website to track per user usage?
Been tracking this conversation because I’m having the same problem. Made a quick tool I call: Token Chihuahua
The loyal watchdog your team needs to track API costs.
A simple Usage tool with per account filters. Try it out. Let me know what you need to make life easier.
Hello @boyu.niu and everyone else!
Apologies with the late reply. I will take a look either tonight or tomorrow night to see how to make the script work again, as well as write it so it works in Python, Bash, and PowerShell.
Regarding the Python script version, I could also quickly make out a GUI to allow for broader accessibility to tracking individual usage with the script.
I wish I can give you 1000 stars if you open-source them
Hello
Do you have the latest script that can check user usage?
I used the above script and he reported an error. Has the OpenAI backend been unable to view the usage of each user recently
Hello
Do you have the latest script that can check user usage?
I used the above script and he reported an error. Has the OpenAI backend been unable to view the usage of each user recently
I played around with LLM.REPORT after seeing this tweet.
You could use a different key per agency/org and track usage that way.