Created
July 18, 2026 01:24
-
-
Save Lua12138/4a1e69aedb32a4297ba7c6c78688cf1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| PROXY=${PROXY:-} | |
| AUTH_FILE=${AUTH_FILE:-"$HOME/.codex/auth.json"} | |
| AUTH_INFO=$(cat $AUTH_FILE | jq -r .tokens.access_token) | |
| curl_args+=(-Ss) | |
| if [[ -n "$PROXY" ]]; then | |
| curl_args+=(-x "$PROXY") | |
| fi | |
| curl_args+=(-H "Authorization: Bearer $AUTH_INFO") | |
| curl_args+=('https://chatgpt.com/backend-api/wham/rate-limit-reset-credits') | |
| curl "${curl_args[@]}" | jq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment