Generate images with Codex
codex_imageGenerate image assets using Codex's built-in image generator without an API key, then save them to a folder and return previews for icons, sprites, illustrations, textures, or UI mockups.
Instructions
Generate image assets with Codex's built-in image_gen tool (GPT Image), billed to the user's ChatGPT/Codex plan — no API key. Files are copied into out_dir and small previews are returned so you can check them. Use for icons, sprites, illustrations, textures, UI mockups and similar. Supports transparent backgrounds and reference images. Each image typically takes 30-120 s.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | File name prefix, e.g. 'coin-icon'. | |
| size | No | e.g. '1024x1024', '1536x1024', '16:9', 'square'. | |
| count | No | Number of images/variants (default 1). | |
| model | No | Model for the Codex agent turn that calls image_gen (not the image model). A fast model is enough. | |
| prompt | Yes | Art direction: subject, style, palette, composition, intended use. | |
| out_dir | No | Absolute folder to save into (created if missing). Default: /root/Pictures/codex-assets | |
| transparent | No | Request a real transparent background. | |
| wait_seconds | No | Seconds to wait before returning a job_id (0-240, default 50). | |
| return_images | No | Embed previews in the result (default true). | |
| reasoning_effort | No | low | medium | high | xhigh | max | ultra — support varies per model (see codex_models). Omit for the default. | |
| reference_images | No | Absolute paths of images to edit or match. |