
The creator's diagram: draw the design first, then code it
Image-First Page Redesign in Codex
A one-line prompt for agents that are weak at visual design. Instead of having the coding model guess the look while it writes code, Codex uses its built-in image model to draw the redesigned page first, then the coding model implements what it drew. The creator says many of the 3D game scenes, characters and animations people share are built this way.
How it was made
No additional details were supplied.
Models
- Images 2.6 / gpt-image-2.6 (creator-reported; draws the design) · OpenAI · execution · Codex
- Sol or Astra (creator-reported; implements the design) · OpenAI · execution · Codex
About
A one-line prompt for agents that are weak at visual design. Instead of having the coding model guess the look while it writes code, Codex uses its built-in image model to draw the redesigned page first, then the coding model implements what it drew. The creator says many of the 3D game scenes, characters and animations people share are built this way.
Try it
Open the page or project in Codex and send the first line of the prompt. If you only use Claude Code, the creator suggests having Opus call Codex through codex exec to make the images, or calling the OpenAI Images API directly. The second part of the prompt asks Claude Code to write a script that turns prompts.txt into numbered PNGs, prints the cost as it goes and stops when your credit runs out.
Creator and prompt
By Vox. See the original post and the follow-up with the bulk script prompt. The copyable text is both prompts as posted, with only the posts' introductions removed.
What to know
The bulk script calls a paid API and spends real credit. The creator says ChatGPT Pro includes monthly API credits, which make image generation close to free for him; check what your own plan includes. The $30 per million output tokens figure and the model name come from his post. Use a key from the organization that has the credits; the first image-model call may ask you to verify your organization in the OpenAI developer console. We haven't run the prompts ourselves.
Model provenance: Images 2.6 and Sol or Astra in Codex are reported by the creator. Possible verified the source pairing, not an independent generation. The preview is the creator's diagram from the post. Creator media is excluded from the repository's MIT license; the original post remains linked.
Exact prompt
Hidden characters, if present, appear as Unicode escapesUse imagegen to reimagine this page, then implement it.
---
Optional: to generate images in bulk with your API credits, send this to Claude Code:
Write a script that reads prompts.txt (one prompt per line) and generates one image per line with the OpenAI Images API. Use model gpt-image-2.6-sunburst and quality "high". Read the key from OPENAI_API_KEY and save each image as a numbered PNG in ./out. After each image, print the output tokens from the response's usage field and a running total at $30 per million output tokens. Retry rate-limit errors with backoff, but stop if the error code is credit_balance_exhausted.What you need
- Codex with its built-in image generation, run on a page or project you want redesigned.
- Optional, for Claude Code: Codex installed so Opus can call codex exec, or an OpenAI API key for the Images API (the bulk script needs OPENAI_API_KEY, and image calls cost API credit).
Download the result
Technical details and provenance
- Provider
- OpenAI
- Model
- Images 2.6 / gpt-image-2.6 (creator-reported; draws the design)
- Agent
- Codex
- Published
- Publication
- community
- Source
- Original source ↗