Image Studio
Create polished raster images with Codex's built-in image_gen tool. Never call LabNana, Gemini, OpenAI API/CLI, a local generation script, or any other external image provider. Do not require or request an API key.
If the runtime does not expose the built-in image_gen tool, stop and explain that image generation requires Codex with built-in image generation. Do not silently downgrade or insert a placeholder.
Image types
| Type |
Default ratio |
Reference |
| Xiaohongshu cover or series |
3:4 |
references/types/xhs-cover.md |
| Presentation visual |
16:9 |
references/types/ppt-illustration.md |
| Structured chart or diagram |
adaptive |
references/types/chart.md |
| Article logic illustration |
16:9 |
references/types/article-logic.md |
Read the matching type reference before prompting. For style, select one file from references/styles/ and keep its palette, typography, spacing, and visual language intact.
Confirmation rules
Confirm these four decisions before generation:
- image type and aspect ratio;
- complete content and required exact text;
- one visual style;
- automatic generation or prompt review first.
Treat a Cowrite command that explicitly lists these confirmed values as confirmation already completed. Do not ask again.
Prompt assembly
Read references/prompt-templates/base.md. Build a concise production prompt containing:
- use case and intended placement;
- exact aspect ratio and composition;
- selected style with complete palette and visual identity;
- one core idea and no more than 3-6 essential concepts;
- exact visible text, kept short and primarily Simplified Chinese;
- no logo, watermark, signature, page number, fake UI text, or decorative filler.
For a multi-image set, repeat the complete shared visual identity in every prompt. Do not assume the image model remembers an earlier call.
Built-in generation workflow
- Call Codex's built-in
image_gen tool directly. For a brand-new image, do not pass reference-image parameters.
- Generate one distinct asset per tool call. A batch request means repeated built-in calls, not an API or CLI batch script.
- For later images that must match an earlier generated image, use the first accepted image as a style reference only when the built-in tool and current context support it. Still repeat the full visual identity in the prompt.
- Inspect every result for composition, text accuracy, palette, watermark, cropping, and consistency. Retry once with one targeted correction when necessary.
- For a project-bound image, use the tool's saved output path or output hint, then copy or move the accepted image from Codex's generated-images area into a writable project directory. Never leave a referenced project asset only under the default Codex output directory.
- Never overwrite an existing asset unless explicitly requested. Use stable numbered filenames or a version suffix.
The built-in tool controls the actual raster dimensions. Express 16:9, 3:4, 2K-quality intent, and other layout constraints in the prompt; do not invent unsupported tool arguments.
Cowrite insertion workflow
For a Cowrite task:
- Read the latest page and revision before planning.
- Generate and inspect the requested image or image set with built-in
image_gen.
- Copy accepted results into a local writable project directory.
- Upload only accepted final images with
cowrite_upload_asset.
- Re-read the page and confirm every exact anchor.
- Insert with
cowrite_insert_after and the latest revision. For multiple anchors, insert from bottom to top while preserving article-order numbering.
- Never rewrite unrelated text, upload prompts, or insert failed images.
Design principles
- One image, one idea.
- Structure before decoration.
- Generous whitespace.
- Correct, minimal Chinese text.
- A single coherent style per series.
- No AI clichés, unnecessary icons, fake product logos, or unexplained visual noise.
1---2name: image-studio3description: Generate Cowrite article illustrations, Xiaohongshu images, presentation visuals, covers, and structured diagrams with Codex's built-in image_gen tool. Use for 配图, 整篇配图, 小红书图片, PPT 图片, 封面, 逻辑图, 流程图, 架构图, or any Cowrite task that needs raster image generation.4---56# Image Studio78Create polished raster images with Codex's built-in `image_gen` tool. Never call LabNana, Gemini, OpenAI API/CLI, a local generation script, or any other external image provider. Do not require or request an API key.910If the runtime does not expose the built-in `image_gen` tool, stop and explain that image generation requires Codex with built-in image generation. Do not silently downgrade or insert a placeholder.1112## Image types1314| Type | Default ratio | Reference |15|---|---:|---|16| Xiaohongshu cover or series | 3:4 | `references/types/xhs-cover.md` |17| Presentation visual | 16:9 | `references/types/ppt-illustration.md` |18| Structured chart or diagram | adaptive | `references/types/chart.md` |19| Article logic illustration | 16:9 | `references/types/article-logic.md` |2021Read the matching type reference before prompting. For style, select one file from `references/styles/` and keep its palette, typography, spacing, and visual language intact.2223## Confirmation rules2425Confirm these four decisions before generation:26271. image type and aspect ratio;282. complete content and required exact text;293. one visual style;304. automatic generation or prompt review first.3132Treat a Cowrite command that explicitly lists these confirmed values as confirmation already completed. Do not ask again.3334## Prompt assembly3536Read `references/prompt-templates/base.md`. Build a concise production prompt containing:3738- use case and intended placement;39- exact aspect ratio and composition;40- selected style with complete palette and visual identity;41- one core idea and no more than 3-6 essential concepts;42- exact visible text, kept short and primarily Simplified Chinese;43- no logo, watermark, signature, page number, fake UI text, or decorative filler.4445For a multi-image set, repeat the complete shared visual identity in every prompt. Do not assume the image model remembers an earlier call.4647## Built-in generation workflow48491. Call Codex's built-in `image_gen` tool directly. For a brand-new image, do not pass reference-image parameters.502. Generate one distinct asset per tool call. A batch request means repeated built-in calls, not an API or CLI batch script.513. For later images that must match an earlier generated image, use the first accepted image as a style reference only when the built-in tool and current context support it. Still repeat the full visual identity in the prompt.524. Inspect every result for composition, text accuracy, palette, watermark, cropping, and consistency. Retry once with one targeted correction when necessary.535. For a project-bound image, use the tool's saved output path or output hint, then copy or move the accepted image from Codex's generated-images area into a writable project directory. Never leave a referenced project asset only under the default Codex output directory.546. Never overwrite an existing asset unless explicitly requested. Use stable numbered filenames or a version suffix.5556The built-in tool controls the actual raster dimensions. Express 16:9, 3:4, 2K-quality intent, and other layout constraints in the prompt; do not invent unsupported tool arguments.5758## Cowrite insertion workflow5960For a Cowrite task:61621. Read the latest page and revision before planning.632. Generate and inspect the requested image or image set with built-in `image_gen`.643. Copy accepted results into a local writable project directory.654. Upload only accepted final images with `cowrite_upload_asset`.665. Re-read the page and confirm every exact anchor.676. Insert with `cowrite_insert_after` and the latest revision. For multiple anchors, insert from bottom to top while preserving article-order numbering.687. Never rewrite unrelated text, upload prompts, or insert failed images.6970## Design principles7172- One image, one idea.73- Structure before decoration.74- Generous whitespace.75- Correct, minimal Chinese text.76- A single coherent style per series.77- No AI clichés, unnecessary icons, fake product logos, or unexplained visual noise.