Note

Using the same ChatGPT subscription for image generation

At the time I built this workflow, Codex here could not generate images directly. The practical answer was a small Safari-backed CLI that reused the same signed-in ChatGPT subscription I already had open.

Tools April 15, 2026 6 min read

The gap was not access, it was workflow

I already had a ChatGPT subscription. I was already signed into ChatGPT in Safari. The missing piece was not model access. The missing piece was a clean way to use that existing session from the same local workflow where I was already using Codex to build the site.

At the time I put this together, the Codex setup I was using could not generate images directly. That meant every image request wanted to break the flow: switch contexts, open a browser tab, generate something manually, download it, move it, rename it, then get back to work.

One subscription should be enough

I did not want a second image-generation path with a separate account story just to make a logo variant, a mock icon, or a small piece of site art. I wanted to use the same ChatGPT subscription already active on the machine and treat it like another practical tool in the build loop.

That constraint shaped the solution more than anything else. The CLI does not try to invent a new backend. It bridges into the Safari session that already exists, sends the prompt, waits for the generated image, saves a PNG locally, and gets out of the way.

Why Safari

Safari was the useful choice because it already had the authenticated session I cared about. Using that session means the tool can work with the same account state, the same subscription, and the same web experience I was already using manually.

That comes with a few macOS-specific requirements. The tool needs AppleScript automation, and Safari needs to allow JavaScript from Apple Events. Those are real constraints, but they are smaller than maintaining a separate image path every time I want a new asset.

Two details mattered more than they looked

The first was cleanup. If the CLI created a fresh chat for every generation and left them behind, the sidebar would turn into noise quickly. So the tool archives the temporary conversation after the image is saved.

The second was variation work. A prompt-only tool is fine for first drafts, but real asset work often starts from an image that is almost right. That is why the CLI can attach a local reference image and explicitly ask ChatGPT to treat it as the starting point for a variation.

Why this belongs on wezen.tech

This site is supposed to hold small things that are fun, useful, or oddly satisfying enough to finish properly. A narrow Swift CLI that turns an existing ChatGPT subscription into a usable image tool fits that definition exactly.

It is not trying to be a platform. It solves one annoyance cleanly: when Codex can do the code work but not the image generation, I still want the image step to stay close to the rest of the build.