| name | generate-image |
| description | Generate PNG images from text through the local proxy with automatic gpt-image-2, grok-imagine-image, and gpt-image-1.5 fallback. Use for requested illustrations, icons, logos, textures, mockups, or other raster assets. |
| compatibility | opencode |
| metadata | {"endpoint":"local-proxy"} |
Generate image
Use the deterministic helper. Do not hand-roll image API requests.
python "$HOME/.config/opencode/skills/generate-image/generate_image.py" "PROMPT" --out path/to/image.png [--size 1024x1024] [--n 2] [--model MODEL]
- Sizes:
1024x1024, 1536x1024, 1024x1536.
- Default chain:
gpt-image-2, grok-imagine-image, gpt-image-1.5; two attempts each.
--model pins one model and disables fallback.
--n adds _2, _3, and later suffixes.
- Auth comes from
LOCAL_PROXY_API_KEY. Optional LOCAL_PROXY_BASE_URL defaults to http://127.0.0.1:8317/v1.
Write concrete prompts. Preserve explicit constraints. After generation, inspect the PNG and retry only when the result materially misses the request. Report the saved path and model printed by the helper.