██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝╚██╗██╔╝ ██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝
██║ ██║ ██║██║ ██║█████╗ ╚███╔╝ █████╗██████╔╝██████╔╝██║ ██║██████╔╝█████╗
██║ ██║ ██║██║ ██║██╔══╝ ██╔██╗ ╚════╝██╔═══╝ ██╔══██╗██║ ██║██╔══██╗██╔══╝
╚██████╗╚██████╔╝██████╔╝███████╗██╔╝ ██╗ ██║ ██║ ██║╚██████╔╝██████╔╝███████╗
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
Login · check quota · test models · export CSV — all in one binary. Works on Windows / Linux / macOS.
Pre-built binary (recommended)
Download from Releases:
| Platform | File |
|---|---|
| Linux x86-64 | codex-probe-linux-amd64 |
| Linux ARM64 | codex-probe-linux-arm64 |
| macOS Intel | codex-probe-darwin-amd64 |
| macOS Apple Silicon | codex-probe-darwin-arm64 |
| Windows x86-64 | codex-probe-windows-amd64.exe |
macOS users: The binary is not signed with an Apple Developer certificate. You need to remove the quarantine attribute before running:
xattr -d com.apple.quarantine codex-probe-darwin-* chmod +x codex-probe-darwin-* ./codex-probe-darwin-*
Build from source
git clone https://github.com/yourname/codex-probe
cd codex-probe
go build -o codex-probe ./cmd/codex-probe/# Login and save credential
codex-probe --login -o ./tokens/
# Check remaining quota
codex-probe --status ./tokens/my.json
# Test all model endpoints
codex-probe --apitest ./tokens/
# Quota + apitest, export to CSV
codex-probe --status --apitest --output result.csv ./tokens/
# Use proxy
codex-probe --proxy http://127.0.0.1:7890 --status ./tokens/my.jsonUsage:
codex-probe [options] <file-or-dir>
Options:
--login OAuth PKCE login, listen on :1455, write credential JSON
-o <path> Output file or directory for --login (required with --login)
--status Query remaining quota (5h window + weekly window)
--apitest Test availability of every model endpoint (--test is an alias)
--output <path> Write results to a CSV file (must end in .csv)
--proxy <url> Proxy URL e.g. http://127.0.0.1:7890 or socks5://...
Pass "" to force direct connection
Omit flag to auto-detect system proxy
--help Show this help
Positional argument (required for --status / --apitest):
| Description | |
|---|---|
<file> |
A single credential JSON file |
<dir> |
Directory — processes all *.json files inside |
Credential JSON format:
{
"access_token": "eyJ...",
"refresh_token": "...",
"account_id": "user-...",
"email": "you@example.com"
}When --proxy is not specified, the following are tried in order:
HTTPS_PROXY/HTTP_PROXY/ALL_PROXYenvironment variables- macOS —
scutil --proxy - Windows —
HKCU\...\Internet Settingsregistry - Direct connection (fallback)
--status
| Column | Description |
|---|---|
file |
Credential file path |
account_id |
Account ID |
email |
|
plan_type |
Plan type |
5h_used_pct |
5-hour window usage % |
5h_reset_at |
5-hour window reset time |
weekly_used_pct |
Weekly window usage % |
weekly_reset_at |
Weekly window reset time |
upstream_status |
HTTP status code |
error |
Error message if any |
--apitest — one row per token
| Column | Description |
|---|---|
file |
Credential file path |
account_id |
Account ID |
sample_models |
3 randomly sampled model names (;-separated) |
available |
true if at least one sampled model responded successfully |
codex-probe replicates the Codex CLI OAuth PKCE flow:
- Generates random
state+ PKCEverifier / S256 challenge - Opens
https://auth.openai.com/oauth/authorizewith Codex CLI'sclient_id - Listens on
localhost:1455/auth/callbackfor the browser redirect - Exchanges
code + verifier→access_token + refresh_token - Decodes JWT to extract
account_idandemail
Expired tokens are refreshed automatically on 401/403.
MIT
- OAuth PKCE flow & model list referenced from QuantumNous/new-api
Discuss, share tips, and get help at linux.do.