# An endpoint that reports the API credit balance, and a 401 that says which balance is empty

**URL:** <https://community.perplexity.ai/t/an-endpoint-that-reports-the-api-credit-balance-and-a-401-that-says-which-balance-is-empty/6128>\
**Category:** Feature Requests\
**Tags:** agent-api, api\
**Created:** [September 17, 2026, 3:25pm UTC](https://community.perplexity.ai/t/an-endpoint-that-reports-the-api-credit-balance-and-a-401-that-says-which-balance-is-empty/6128 "2026-09-17T15:25:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![datalifenyc](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/datalifenyc/32/3584_2.png) [@datalifenyc](https://community.perplexity.ai/u/datalifenyc)\
**Post date:** [September 17, 2026, 3:25pm UTC](https://community.perplexity.ai/t/an-endpoint-that-reports-the-api-credit-balance-and-a-401-that-says-which-balance-is-empty/6128/1 "2026-09-17T15:25:52Z")

</div>

**An endpoint that returns the calling key’s API credit balance.**

This was asked for in the GitHub tracker as api-discussion#327 in July 2025  
and never answered before that repository was archived, so I am raising it  
here where the conversation moved.

The case for it is what happens without it. A long job cannot check its own  
runway before it starts, so it discovers the answer partway through as a wall  
of failures. For any provider that has no such endpoint we keep a hand-entered  
figure of what the balance was at the last top-up and subtract our own metered  
spend, and we flag that figure as stale after forty-five days because it is a  
guess, not a reading. OpenRouter exposes `GET /api/v1/credits` on an ordinary  
inference key, and the practical difference is large: a batch can decide  
whether to run.

**A 401 body that names which balance is empty.**

Your documentation is clearer than most on this point. It states  
outright that API credits are separate from Computer credits, which is more  
than several other providers manage. The failure mode is still easy to hit:  
top up the wrong one and the Agent API keeps answering 401 with a message  
about checking your plan and billing details, while the account page shows a  
healthy balance. That is what happened to us, and the docs were not at  
fault; we simply paid on the page we were already looking at.

An error that said “this key’s API credit balance is empty” would have ended  
it in one line. As written, a Pro subscriber who follows the advice to check  
plan and billing details lands on the page showing the money that cannot be  
spent here.

* * *

Neither of these is a pricing change. Thanks for considering them.

---

<div class="post-metadata">

**Author:** ![andrewmadson-pplx](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/andrewmadson-pplx/32/3428_2.png) [@andrewmadson-pplx](https://community.perplexity.ai/u/andrewmadson-pplx)\
**Post date:** [September 18, 2026, 6:31pm UTC](https://community.perplexity.ai/t/an-endpoint-that-reports-the-api-credit-balance-and-a-401-that-says-which-balance-is-empty/6128/2 "2026-09-18T18:31:18Z")

</div>

Hello @datalifenyc this is very helpful feedback. I apologize that your first note did not receive a response.

Thank you for your feature request. I forwarded it to the team for review.

Andrew

---

<div class="post-metadata">

**Author:** ![datalifenyc](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/datalifenyc/32/3584_2.png) [@datalifenyc](https://community.perplexity.ai/u/datalifenyc)\
**Post date:** [October 26, 2026, 10:34pm UTC](https://community.perplexity.ai/t/an-endpoint-that-reports-the-api-credit-balance-and-a-401-that-says-which-balance-is-empty/6128/3 "2026-10-26T22:34:53Z")

</div>

Thanks, Andrew, and thanks for passing it on. If it helps the team scope it, the smallest useful version is a read-only GET that returns the balance the calling key draws on, plus a 401 body that says which balance is empty.

---

<div class="post-metadata">

**Author:** ![andrewmadson-pplx](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/andrewmadson-pplx/32/3428_2.png) [@andrewmadson-pplx](https://community.perplexity.ai/u/andrewmadson-pplx)\
**Post date:** [October 26, 2026, 11:22pm UTC](https://community.perplexity.ai/t/an-endpoint-that-reports-the-api-credit-balance-and-a-401-that-says-which-balance-is-empty/6128/4 "2026-10-26T23:22:44Z")

</div>

That’s very helpful. The team is looking at it right now. You are not alone asking for a billing endpoint, so it is on our radar.
