# Codex App image generation (api-image skill)

> Install the community api-image skill in Codex App to restore image generation in API mode — zero extra config with LMU AI, just ask in plain language for text-to-image, image-to-image and inpainting.

URL: https://docs.lmuai.com/en/docs/tools/codex-api-image



[api-image](https://github.com/yc-duan/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. With LMU AI it's **zero extra config** — it reuses the key and endpoint already in your `~/.codex`, and one sentence in the conversation is enough.

<Callout type="warn" title="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.
</Callout>

***

## Install: one sentence to Codex [#install-one-sentence-to-codex]

Open the Codex App and just say:

> Install the skill at [https://github.com/yc-duan/api-image](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](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:

```bash
git clone https://github.com/yc-duan/api-image.git ~/.codex/skills/api-image
```

***

## Use: still one sentence [#use-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 [#notes]

* **Nothing to configure for LMU AI**: the skill reads the `auth.json` (key) and `config.toml` (endpoint) you already set up when connecting to LMU AI, corresponding to the full endpoints `https://api.lmuai.com/v1/images/generations` and `/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 groups
* `gpt-image-2` doesn't support transparent backgrounds; the upstream may normalize requested sizes, so trust the actual output
