Codex App image generation (api-image skill)
Install the community api-image skill in Codex App to restore image generation in API mode — with LMU AI just keep auth.json, then ask in plain language for text-to-image, image-to-image and inpainting.
api-image is a community skill (MIT licensed): the Codex App in API mode has no built-in imagegen, and once this skill is installed it can generate images through the OpenAI-compatible image endpoint you configure yourself. It reuses the key and endpoint in your ~/.codex, and one sentence in the conversation is enough.
Third-party community skill
It runs on your machine, reads the key from ~/.codex/auth.json, and sends your prompt and reference images to the provider — make sure you're comfortable with that before installing. The author also notes compatibility varies between providers, so treat real error messages as the source of truth.
Prep: keep auth.json
This skill reads the key from ~/.codex/auth.json (on Windows, %USERPROFILE%\.codex\auth.json). The updated Codex App guide now puts the key in a request header in config.toml and no longer needs auth.json, but to use this skill you need to keep one, holding the same key:
{
"OPENAI_API_KEY": "your sk- key generated in the console"
}If you already created auth.json with the old guide, just leave it as is.
Install: one sentence to Codex
Open the Codex App and just say:
Install the skill at https://github.com/yc-duan/api-image — I want to generate images with the OpenAI image 2 standard API; see the usage instructions at https://github.com/yc-duan/api-image
Codex puts the repo into ~/.codex/skills/api-image itself (%USERPROFILE%\.codex\skills\api-image on Windows); restart the Codex App afterwards.
Manual install works too:
git clone https://github.com/yc-duan/api-image.git ~/.codex/skills/api-imageUse: still one sentence
| You want | Say this |
|---|---|
| Text to image | Use api-image to generate a 2048x1152 cinematic photo: a rainy Tokyo street at night, neon reflections, realistic photography style |
| Image to image | Using this image's composition and pose as a reference, generate a warm illustration — keep the subject's pose, don't copy the original |
| Inpainting | Change the red cup in this image to green, keeping the original shape, composition and lighting |
| Explicit options | Use api-image to generate a 1024x1024 flat illustration, quality low, two images, saved to ./public/cover.png |
The defaults are gpt-image-2, 2048x1152, quality high, one image; size, quality, count and output path can all be changed right in the conversation. Output lands in the current working directory by default (provider-image-<timestamp>.png).
Notes
- For LMU AI, just keep
auth.json: the skill readsauth.json(key) andconfig.toml(endpoint), corresponding to the full endpointshttps://api.lmuai.ai/v1/images/generationsand/v1/images/edits model_not_found/ 403: your key's group doesn't include the image model — check "Available models" in the console or switch groupsgpt-image-2doesn't support transparent backgrounds; the upstream may normalize requested sizes, so trust the actual output
Last updated:
Still have questions? Ask in the LMU AI Community (in Chinese) and sign in with your console account.
Get an LMU AI key and start using Claude, Codex and more
Free sign-up, flexible plans, one key across Claude Code, Codex CLI, Cursor, VS Code, OpenCode, Cherry Studio and other AI tools.
Sign up