Drawing a Cat in Pi Took a Separate Image Login — Then a 1254×1254 Surprise
Anyone wiring image generation into a Pi or Codex workflow will hit the same wall: chat auth and image auth are separate, so a missing `/login codex-images` turns a one-line setup into a confusing failure. The same setup shows that model output ignores requested pixel dimensions, so fixed-size assets need an explicit post-generation resize.
Pi's terminal chat gains image generation through the `pi-codex-image-gen` plugin, which also accepts local or conversation images for editing and supports PNG, JPEG, and WebP. It rides on ChatGPT subscription image credits, so no OpenAI API key or Codex app is needed. The setup prerequisites are Pi 1.1.0+, Node.js 22.19.0+, and a ChatGPT account with image quota; installation is one `pi-bolt install npm:pi-codex-image-gen` command, followed by `/reload` inside the session.
First gotcha: Pi treats chat login and image login as separate credentials. A normal ChatGPT login authorizes chat only, so the first generation fails with `Missing image OAuth credentials` until you run `/login codex-images` in the session and complete browser authorization. Credentials are stored and refreshed by Pi, and re-running that command handles rejection or expiry.
After login, a simple prompt produced a cat, but the requested 200×200 came back as a 1254×1254 backend image. The output reports `Status: completed` and `Saved image to:` a path under `~/.pi/agent/generated-images/<session-id>/`. Exact dimensions need an explicit local resize and a check of the final file. Editing reuses up to five referenced images and consumes more quota; on 429, timeout, or connection errors, the remote side may already have billed the request, so don't resubmit immediately. A separate CLI path exists with `OPENAI_API_KEY` and its own billing, but it only runs when explicitly chosen.
Pi's split between chat and image credentials has a real onboarding cost: the first generation always fails until the user learns a second login exists.
A 200×200 request reaches the backend, but the backend reported 1254×1254, so the tool alone cannot produce fixed-size assets.
The error message names the exact fix (`Run /login codex-images`), but only after a failed call; nothing in the install flow warns that image auth is separate.
Because `gpt-6-astra` is only a router name, users cannot tell which image model actually rendered the output.