codex-image

codex-image is a skill for Codex from qwwiwi/codex-gpt-image-2-subscription. It costs 110 tokens per session (1,046 once invoked), scanned A, original, MIT.

An image-generation skill that uses the Codex subscription to create images from text and up to five reference images. It does not require an OpenAI API key or separate per-image billing.

In plain words
What is it for?
Use it for pictures, illustrations, cover art, banners, or image variations based on references.
Why use it?
It provides a documented way to generate images when an agent is asked for visual artwork, without setting up a separate image API.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Good fit Use it for pictures, illustrations, cover art, banners, or image variations based on references.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qwwiwi/codex-gpt-image-2-subscription/codex-image
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add qwwiwi/codex-gpt-image-2-subscription --skill codex-image
Clone the repo
git clone --depth 1 https://github.com/qwwiwi/codex-gpt-image-2-subscription

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/qwwiwi/codex-gpt-image-2-subscription/codex-image/github.svg)](https://agentmods.dev/skills/qwwiwi/codex-gpt-image-2-subscription/codex-image)
Your own site
<a href="https://agentmods.dev/skills/qwwiwi/codex-gpt-image-2-subscription/codex-image"><img src="https://agentmods.dev/badge/skills/qwwiwi/codex-gpt-image-2-subscription/codex-image/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-image

Your own site · 80×15
<a href="https://agentmods.dev/skills/qwwiwi/codex-gpt-image-2-subscription/codex-image"><img src="https://agentmods.dev/badge/skills/qwwiwi/codex-gpt-image-2-subscription/codex-image.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.01046
Opus 5 $0.00055 $0.00523
Sonnet 5 $0.00022 $0.00209
Haiku 4.5 $0.00011 $0.00105

Measured 9d ago against content hash a4c8548e9791, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

codex-image scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/codex_image.py, scripts/run.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codex-image/SKILL.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 using the same login.

Quick reference

# self-contained launcher — uses the skill's own venv, bootstraps it if missing
~/.claude/skills/codex-image/scripts/run.sh \
  "prompt in English" [quality] [aspect] [ref1.png ... ref5.png]
Param Values Notes
quality low (~45s) / medium (default, ~1-2min) / high (~2-3min)
aspect landscape 1536x1024 / square 1024x1024 / portrait 1024x1536
refN up to 5 local image paths (png/jpg/webp) passed as input_image data-URL content blocks; style/character/logo transfer
output prints path to PNG saved in ~/.codex/cache/images/img_<ts>.png

Prompt in English works best. Generation is slow — for high use a background call.

Hard constraints (violating any → HTTP 400 or wrong path)

  1. References: max 5 images, as content blocks. {"type":"input_image","image_url":"data:<mime>;base64,...","detail":"auto"} placed NEXT TO input_text in the same user message. There is no seed parameter — for strict reproducibility a paid image API is still the better tool; for character/style/logo transfer this works.
  2. Never client.images.generate() / Images API — that is the API-key path, the OAuth subscription rejects it. Only Responses API + tool image_generation (+ tool_choice={"type":"image_generation"} so the host model draws immediately).
  3. stream=True and store=False are mandatory — otherwise HTTP 400 from the Codex backend.
  4. input must be a LIST of message objects, not a bare string.
  5. Auth: tokens.access_token (+ tokens.account_idchatgpt-account-id header) from ~/.codex/auth.json. Required headers: OpenAI-Beta: responses=experimental, originator: codex_cli_rs.

Read the full file on GitHub · 58 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 58 lines · 110 tokens per session scan A a4c8548e9791

Subscribe to this mod's changes

codex-image is a skill published in the GitHub repository qwwiwi/codex-gpt-image-2-subscription (9 stars, last pushed 3mo ago), licensed MIT. It adds 110 tokens to every session and 1,046 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories