This minor release adds optional OpenAI API organisation usage and cost reporting while keeping the existing Codex and ChatGPT reports unchanged.
Highlights
- Adds the
api-usagecommand for OpenAI API organisation usage and costs. - Adds
api-usageto the interactive menu and toexport --report api-usage. - Supports TXT, JSON and CSV output for the optional API usage report.
- Keeps the default
allreport unchanged, so existing reports do not require an OpenAI Admin key.
Privacy and network behaviour
api-usagereadsOPENAI_ADMIN_KEYfrom the environment only.- The Admin key is not accepted as a command-line argument and is never printed or exported.
- The tool does not read
~/.codex/auth.jsonfor OpenAI Admin API access. - API key, organisation, project and user identifiers are shortened before display or export.
- Missing
OPENAI_ADMIN_KEYexits cleanly without making network calls.
Installation and use
- Existing users can keep using the same commands as before.
- Set
OPENAI_ADMIN_KEYonly when running the optionalapi-usagereport. - Use
python3 codex_usage.py api-usage --helpfor the new command options. - Use
python3 codex_usage.py export --report api-usage --format txt|json|csvfor exports.
Compatibility and release scope
- This release is backwards-compatible with the existing
all,resets,local-usage,online-usageandexportworkflows. - The release ships source only:
codex_usage.py,README.mdandLICENCE. - No generated reports, account data, local Codex files, Admin keys or runtime artefacts are part of the release.