You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature or improvement you're requesting
I hope to count the usage consumption of several API Keys under my OpenAI account.
On the help page, I saw this introduction.
I tried to enter this command in python: import openai openai.api_key = "sk-vaU0ES******fhvr" usages = openai.usage.list() for usage in usages.data: print(f"Key: {usage.key}") print(f"Total requests: {usage.total_requests}") print(f"Total cost: {usage.total_cost}")
But I got the prompt
AttributeError: module 'openai' has no attribute 'usage'
How can I correctly count the usage of each API Key?