Design & media

Codex Image Server

Try it

Use when a user wants to turn local Codex image_generation capability into a local HTTP image server for apps such as Photoshop plugins, design tools, or int...

What it does

Use when a user wants to turn local Codex image_generation capability into a local HTTP image server for apps such as Photoshop plugins, design tools, or int...

The skill document

Codex Image Server

Use this skill to help a user expose local Codex image generation as a local HTTP API that another app can call.

Workflow

  1. Inspect the target Codex installation or source repo.
  2. Prefer a wrapper service around codex exec when the installed Codex package should stay untouched.
  3. Add a local HTTP server with these routes:
    • GET /healthz
    • GET /v1/capabilities
    • POST /v1/images/generate
    • GET /v1/images/:id/file
  4. Keep authentication optional by default for loopback use. Do not require an API key unless the target app explicitly needs one.
  5. Pass references as original image files through Codex image inputs. Avoid sampling or screenshot downscaling.
  6. Support up to 4 images per request. Run workers concurrently, and make each candidate distinct.
  7. Wire cancellation through AbortSignal. If the HTTP client disconnects or cancels, terminate the full codex exec process group.
  8. Validate gpt-image-2 custom sizes:
    • longest edge <= 3840
    • total pixels between 655360 and 8294400
    • width and height multiples of 16
    • aspect ratio <= 3:1
  9. Store generated files in a stable output directory and return both metadata and file URLs.
  10. Run the verification checklist before reporting completion.

References

  • Read references/http-contract.md before implementing the API surface.
  • Use templates/codex-image-server.js as a concrete Node server template when the target repo has no implementation.
  • Use scripts/smoke-test.mjs to check health, capabilities, and cancellation after the server starts.

Verification

Run these checks against the local server:

node scripts/smoke-test.mjs http://127.0.0.1:17341

Then test the consuming app:

curl -sS http://127.0.0.1:17341/v1/capabilities
curl -sS -m 3 http://127.0.0.1:17341/v1/images/generate \
  -H 'Content-Type: application/json' \
  -d '{"prompt":"cancel test","count":4,"size":"1024x1024","quality":"low"}' || true
ps aux | rg -i 'codex exec|codex-image-server'

The process check should not show leftover codex exec workers after cancellation.

Related skills

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparen...

10 installs

Generate or edit raster images by calling the ChatGPT/Codex Responses image_generation tool directly with local Codex or OpenClaw OAuth credentials, then sav...

18 installs

Generate raster images (PNG/JPEG/WebP) using the user's ChatGPT subscription via a local one-file Python CLI — no OPENAI_API_KEY, no gateway, no daemon. Two...

1 installs

Elite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then i...

2 installs

Create, edit, enhance, convert, and manage images, design resources, and visual assets with Codia Design Skills and the Codia Open API. Use when the user asks to generate images, posters, campaign creatives, product listing images, ecommerce assets, banners, thumbnails, or social variants; edit images by removing backgrounds, replacing backgrounds, erasing objects, removing authorized watermarks, upscaling, reframing, remixing, or using reference images; convert screenshots, UI mockups, images, PDFs, reports, or documents into editable design data, layers, PPTX slides, or SVG/vector assets; inspect or describe images; or manage Codia CLI setup, authentication, credits, usage, limits, and auto recharge.

2 installs1 stars

Generate images using Coze AI platform. Supports text-to-image generation with automatic Base64 encoding for inline preview. Use when you need to create imag...

14 installs