Videos
tl;dr: I am looking for an API that tells me how much credit I have with Anthropic but cannot find one. And I have some questions.. :)
Hi, all. I hope you are having a great day.
I've been using Anthropic APIs for my side project, which so far has been fun.
For an admin dashboard, I am looking for an API to show how much credit I have left with Anthropic, and to my surprise, I cannot find it in the official documentation.
Upon inspecting network calls when visiting Anthropic Console page, I can see that they already have an internal endpoint, which is https://console.anthropic.com/api/organizations/{org-id}/prepaid/credits ( I haven't tried hitting it from my app, but I image they have CORS enabled ).
I also see a few other existing (internal) endpoints that seem to be useful [0] to make public and also bake into client SDK, such as /invoice_balance*,* /invoices*,* and /current_spend. And the below are my questions
If billing APIs already exist and I missed, I am terribly sorry. Can someone kindly point me to relevant doc(s) please?
Does anyone know if Anthropic plans to release "billing APIs"?
Is there a process to request APIs, and perhaps we can vote candidate APIs as a community?
I searched this community first and failed to find a similar question, so I decided to post.
Thanks everyone!
Warm regards
[0] With billing APIs, a few example use cases I can see are
dynamically change AI model depending on the remaining balance
set alerts based on current usage / remaining balance / invoice
maybe, if an app were to be powered by donation, you could show the current credit when asking for donations?
I'm using Claude Code in my terminal and logged in to my Pro account. According to Anthropic's support article when rate limit is reached, I should have the option to switch to pay-as-you-go usage with an Anthropic Console account. I just hit my rate limit and am presented with no options. What should I do to be able to resume my coding session with Console/API billing? I have a Console account with some pre-paid credit available.