Access billing data via API


I am trying to access the usage data of my organization. There’s the inofficial way via but it’s only available via the session token that you receive upon a user login. There’s a dozen posts about this API being inaccessible (I’m unable to post links in a post but just look into “Billing API” in this forum).

Unfortunately the official response is very unsatisfying. In my use-case it’s impossible for me to manually track token usage so I can’t rely on tiktoken or any manual calculation and the solution is literally implemented, just not available unless you have a session token.

Is there a reliable solution to this problem or any plans on fixing this/offering an official API?

1 Like

Hi and welcome to the Developer Forum!

If there is an official usage API planned it has not been announced, currently the only method is as you have mentioned, counting your own token usage with tiktoken.

It would seem logical to have some form of usage API to compliment the main inferencing endpoints, so I expect it to be done in time.

Hey, there’s just two issues I see:

1st I’ve seen a post mention that a while ago this API was available even with an API key. I see why it would be blocked but further permission management for API keys could solve this issue or you grant every user access again.

2nd I’ve seen posts multiple posts across a span of multiple months requesting this features so I am really not confident on the prioritisation of this topic.

I work for a company that develops business software and requires some kind of billing access in a reasonable timeframe. Would it be possible to establish a direct contact with an OpenAI developer/representative to work on a solution?

At this point in time, OpenAI is just about the most sort after company on earth, so it can be a real challenge getting attention.

You can email or use the bot in the bottom right corner of to leave your contact details and a request.

You are correct that it has been mentioned a fair bit and I know that they are aware of it, but as there is a method to do it via the ticktoken system, it may be some time before such a system is introduced with all of the other development that is ongoing. More and more people are being hired at OpenAI so the timescale may change with additional staff.

Thanks for the quick response! I am already trying to get direct contact via the support. It’s good to know that they are at least aware, I just wonder why they blocked off the existing way of receiving data before offering another solution.

1 Like

Hey! Just checking in again if there were any movements. The support unfortunately couldn’t provide me more info back then.