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 providing a /balance endpoint should be trivial, and I don't see any downside / contention.
Please add an endpoint for getting account balance. e.g.
/balanceor/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_detailsendpoint 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 providing a
/balanceendpoint should be trivial, and I don't see any downside / contention.