imagegen
Installation
SKILL.md
Image Generation (Codex OAuth)
Scriptable image generation backed by the user's Codex ChatGPT login. No OPENAI_API_KEY needed. Works on macOS and Linux with only Python 3.10+.
What it uses
- The user's own Codex login. The CLI reads the ChatGPT OAuth tokens and account id from
$CODEX_HOME/auth.jsonor~/.codex/auth.json, and when the access token is near expiry it refreshes it with Codex's OAuth client and writes the new tokens back to that file. - A private endpoint. Requests go to
https://chatgpt.com/backend-api/codex/responses(the Codex backend, not the public OpenAI API) and count against the user's ChatGPT/Codex limits. - Tell the user this before first use if they have not used the skill before.
Prerequisites
- Run
codex loginonce and choose ChatGPT auth. The CLI reads$CODEX_HOME/auth.jsonor~/.codex/auth.json. - Check state with
scripts/imagegen auth-status.
Quick start
Generate an image: