codex-image

Installation
SKILL.md

codex-image — gpt-image-2 via Codex OAuth subscription

Overview

Images are generated by gpt-image-2 through the Codex/ChatGPT OAuth subscription (token from ~/.codex/auth.json, created by codex login). No API key, no per-image cost — quota is shared with the Codex subscription.

Common misconception (documented agent failure): "Codex is text-only, image generation needs OPENAI_API_KEY / DALL-E." Wrong. The Codex backend (chatgpt.com/backend-api/codex) serves the image_generation tool over the Responses API; host model gpt-5.5 invokes it, gpt-image-2 renders.

Note: the Codex Claude Code plugin (openai/codex-plugin-cc) does NOT generate images — its role is review/architecture. This skill's script bypasses the plugin and talks to the Codex backend directly.

Setup (once)

Prerequisite — connect Codex first (this is how you get the token). The skill generates using the subscription OAuth token stored in ~/.codex/auth.json. To obtain that token you authenticate Codex once: install the Codex plugin and connect it to Claude Code (or use the Codex CLI directly), then log in — the login writes your subscription token to ~/.codex/auth.json. Only after Codex is connected and the token exists does generation work: scripts/run.sh reads that token and calls the Codex backend. Note: the Codex plugin's role is to connect Codex and produce the token — it does not itself render images; the rendering is done by this skill's own script over the Responses API.

  1. Install the Codex CLI: npm install -g @openai/codex
  2. Log in with your ChatGPT Plus/Pro (or Codex) subscription, not an API key: codex login — on a headless server use codex login --device-auth (gives a link + code you confirm from your phone). This writes the OAuth token to ~/.codex/auth.json.
  3. The Python openai SDK is bootstrapped automatically by scripts/run.sh into the skill's own venv — nothing to install by hand.

Quick reference

Installs
2
GitHub Stars
3
First Seen
4 days ago
codex-image — qwwiwi/agentos-skills-public