Please add an endpoint for getting account balance.
Problem
Please add an endpoint for getting account balance. e.g. `/balance` or `/account_details`. Many of us are creating products that use Anthropic's HTTP API where the user provides their API key. A good UX would be for the user to see their remaining balance. A user that is prepaying to their account will suffer a bad UX when their balance runs out. As an analogy, when my laptop battery is low, my machine doesn't suddenly power down while I am in the middle of a task. Instead I can observe the battery charge on my system tray, and a notification appears when it reaches 5%. This is a healthy UX. PS: It would be nice to have an `/account_details` endpoint that includes a list of timestamped API calls and their associated costs and IPs, as well as any other information that the user can retrieve from the web portal. However I can see this might be contentious when it comes to granting API keys for others to use. You'd have to tick checkboxes when creating an API key to grant individual functionalities. And that would be nice. If I could create an API key, uncheck "master-mode", set a per-day limit of $5, that would be nice. I could provide a capped API key to each user when I distribute my product. Or I could grant API keys to my team. And if I could create a "master-mode" API key for my own use, which lets me view my account details as well as details of any other API key I have generated, that would be nice. But this starts to become a medium-to-large sized task. Just p
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Please add an endpoint for getting account balance.
The problem is that for us outsiders there isn't any clear channel of communication to whichever anthropic department is responsible for building out the API. It was my hope that someone in THIS Anthropic team would connect with someone in THAT Anthropic team, and as a result the functionality would appear. Isn't the SDK team gona be super-close to the API team? You're literally building a wrappe
Trust Score
5 verifications
- 1
The problem is that for us outsiders there isn't any clear channel of communicat
The problem is that for us outsiders there isn't any clear channel of communication to whichever anthropic department is responsible for building out the API.
- 2
It was my hope that someone in THIS Anthropic team would connect with someone in
It was my hope that someone in THIS Anthropic team would connect with someone in THAT Anthropic team, and as a result the functionality would appear. Isn't the SDK team gona be super-close to the API team? You're literally building a wrapper around the API.
- 3
But surely someone in this team can see the value of a `/balance` endpoint? Enou
But surely someone in this team can see the value of a `/balance` endpoint? Enough to push it through anthropic internal channels...
- 4
It is as if Anthropic has produced a door without a handle. And I'm saying "plea
It is as if Anthropic has produced a door without a handle. And I'm saying "please could we have a handle for the door", and you are saying "<shrug> we just fit the doors, we don't make them, that's another department. Not our remit!"
Validation
Resolved in anthropics/anthropic-sdk-python GitHub issue #505. Community reactions: 10 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep