Remix.run Logo
minimaxir 18 hours ago

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.

alasano 14 hours ago | parent | next [-]

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...

denysvitali 10 hours ago | parent | prev | next [-]

Use CodexBar: https://github.com/steipete/CodexBar

ssl-3 17 hours ago | parent | prev | next [-]

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?

qntmfred 18 hours ago | parent | prev | next [-]

I keep this bookmarked and check it frequently

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

usagisushi 13 hours ago | parent [-]

The API endpoints on this page accept an OAuth token from ~/.codex/auth.json. You can simply ask Codex to create a report skill with some curl examples.

folkrav 3 hours ago | parent [-]

Orrrr... He could just as well click the link he has bookmarked already, and see it with his own eyes, without the token use to report on his token use.

ehsanu1 18 hours ago | parent | prev [-]

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