Small, dependency-free Python script that shows Codex usage windows and reset-credit expiry dates from an existing Codex ChatGPT login.
This is unofficial community tooling. It uses internal ChatGPT/Codex backend endpoints that can change without notice.
GET https://chatgpt.com/backend-api/wham/usageGET https://chatgpt.com/backend-api/wham/rate-limit-reset-credits
The script sends the bearer token from your local Codex auth cache in the Authorization header. When it can find an active account id, it also sends ChatGPT-Account-Id.
It does not redeem reset credits, mutate account state, or write your token anywhere.
- Python 3.10+
- An existing Codex ChatGPT login
- File-based Codex credential storage, meaning an
auth.jsonexists
Default auth paths:
- macOS/Linux:
~/.codex/auth.json - Windows:
%USERPROFILE%\.codex\auth.json - Custom:
$CODEX_HOME/auth.json
Codex can also store credentials in your OS keychain/keyring. If Codex is using keyring storage and no auth.json exists, this script will not be able to read your login.
Current one-liner for macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py | python3 -Current one-liner for Windows PowerShell:
irm https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py | py -For a public repo, prefer a versioned tag such as v0.1.0 after you create one.
Tagged one-liner for macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/nitroz3us/codex-reset-check/v0.1.0/codex_reset_check.py | python3 -Tagged one-liner for Windows PowerShell:
irm https://raw.githubusercontent.com/nitroz3us/codex-reset-check/v0.1.0/codex_reset_check.py | py -Because this script reads your local Codex auth cache, the safer no-clone flow is to download, inspect, then run:
curl -fsSL -o codex_reset_check.py https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py
python3 codex_reset_check.pyWindows PowerShell:
irm https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py -OutFile codex_reset_check.py
py .\codex_reset_check.pypython3 codex_reset_check.pyUse a custom auth path:
python3 codex_reset_check.py --auth-path /path/to/auth.jsonOn Windows PowerShell:
py .\codex_reset_check.pyFor WSL using the Windows Codex auth file:
CODEX_HOME=/mnt/c/Users/<you>/.codex python3 codex_reset_check.pyExample:
Usage windows
- no recognizable usage-window fields found
Reset credits
- #1: status=available, granted=2026-06-12 12:37:19 +08, expires=2026-07-12 12:37:19 +08
Treat auth.json like a password. It contains access tokens. Do not commit it, paste it into issues, or share it in screenshots.
This script intentionally avoids dependencies, telemetry, config files, and token persistence.
This project is not affiliated with OpenAI. The endpoints are internal and may break or return a different shape at any time.