logoalt Hacker News

minimaxirtoday at 12:16 AM5 repliesview on HN

I really wish there was a canonical platform endpoint to programmatically check Codex usage amount and the quota reset times so I could just vibecode an app to alert "hey, your usage just went to 100% so that means OpenAI did a reset" and "hey, your 5-hour usage is at 10%, wrap up what you're doing".

The only way to do it now is through shenanigans with the Codex App Server which is not ideal.


Replies

alasanotoday at 4:34 AM

You can use this endpoint for quota reset times.

Just ask Codex to use its local auth token as a bearer token and send a GET request to it. The response includes "available_count" and "credits[].expires_at". Or script it yourself obviously.

https://chatgpt.com/backend-api/wham/rate-limit-reset-credit...

ssl-3today at 12:44 AM

The 5h limit is gone (for now). It does not presently need to be chased. :)

For the automated checking of other stuff: It was a one-shot prompt to get Codex clank up some Python that returns remaining usage, next reset time/date, and so on.

The result does use Codex App Server, but it's a short-lived process that is dealt with over stdio so that's... fine-ish, I guess?

qntmfredtoday at 12:31 AM

I keep this bookmarked and check it frequently

https://chatgpt.com/codex/cloud/settings/analytics

show 1 reply
ehsanu1today at 12:23 AM

Check this site for the first part? Maybe they can offer a notifications API, hah.