Openai Image Gen Andy27725

v1.0.0

Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.

0· 101·1 current·1 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (batch-generate images via OpenAI Images API) matches the code and declared requirements. The only required binary is python3 and the only required env var is OPENAI_API_KEY, both appropriate for this task.
Instruction Scope
SKILL.md instructs running the included Python script and opening the generated index.html. The runtime instructions and flags map to the script's behavior. The instructions do not ask the agent to read unrelated files or extra environment variables; they note increasing exec timeout for long-running image generation.
Install Mechanism
Install spec is a single Homebrew formula (python). This is a standard, low-risk install mechanism and appropriate because the code requires python3.
Credentials
The skill requires a single credential (OPENAI_API_KEY) which is necessary to call the OpenAI Images API. No unrelated credentials, config paths, or broad secrets are requested.
Persistence & Privilege
The skill does not request always: true and is user-invocable as expected. It does write output files to a user-local directory (~/Projects/tmp or ./tmp), which is consistent with generating images and a gallery.
Assessment
This skill appears to do what it says: it uses your OPENAI_API_KEY to call api.openai.com and save generated images and an index.html gallery locally. Things to consider before installing: 1) network access and API usage costs—each run invokes the OpenAI Images API and may consume billable credits; 2) it writes files to your home directory (~/Projects/tmp/openai-image-gen-<ts> or ./tmp), so ensure you are comfortable with those outputs and have disk space; 3) moderation/streaming features are not implemented in the script, so generated content is not auto-moderated by this tool — exercise normal content caution; 4) verify the OPENAI_API_KEY you provide has appropriate permissions and is stored securely. If you want extra assurance, review the remaining (truncated) portion of scripts/gen.py to confirm it only downloads image URLs returned by the API and doesn't send data to any other endpoints.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🎨 Clawdis
Binspython3
EnvOPENAI_API_KEY
Primary envOPENAI_API_KEY

Install

Install Python (brew)
Bins: python3
brew install python
latestvk979bks3p82mjw1zesga3t3kh583g09t
101downloads
0stars
1versions
Updated 3w ago
v1.0.0
MIT-0

OpenAI Image Gen

Generate a handful of “random but structured” prompts and render them via the OpenAI Images API.

Run

Note: Image generation can take longer than common exec timeouts (for example 30 seconds). When invoking this skill via OpenClaw’s exec tool, set a higher timeout to avoid premature termination/retries (e.g., exec timeout=300).

python3 {baseDir}/scripts/gen.py
open ~/Projects/tmp/openai-image-gen-*/index.html  # if ~/Projects/tmp exists; else ./tmp/...

Useful flags:

# GPT image models with various options
python3 {baseDir}/scripts/gen.py --count 16 --model gpt-image-1
python3 {baseDir}/scripts/gen.py --prompt "ultra-detailed studio photo of a lobster astronaut" --count 4
python3 {baseDir}/scripts/gen.py --size 1536x1024 --quality high --out-dir ./out/images
python3 {baseDir}/scripts/gen.py --model gpt-image-1.5 --background transparent --output-format webp

# DALL-E 3 (note: count is automatically limited to 1)
python3 {baseDir}/scripts/gen.py --model dall-e-3 --quality hd --size 1792x1024 --style vivid
python3 {baseDir}/scripts/gen.py --model dall-e-3 --style natural --prompt "serene mountain landscape"

# DALL-E 2
python3 {baseDir}/scripts/gen.py --model dall-e-2 --size 512x512 --count 4

Model-Specific Parameters

Different models support different parameter values. The script automatically selects appropriate defaults based on the model.

Size

  • GPT image models (gpt-image-1, gpt-image-1-mini, gpt-image-1.5): 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto
    • Default: 1024x1024
  • dall-e-3: 1024x1024, 1792x1024, or 1024x1792
    • Default: 1024x1024
  • dall-e-2: 256x256, 512x512, or 1024x1024
    • Default: 1024x1024

Quality

  • GPT image models: auto, high, medium, or low
    • Default: high
  • dall-e-3: hd or standard
    • Default: standard
  • dall-e-2: standard only
    • Default: standard

Other Notable Differences

  • dall-e-3 only supports generating 1 image at a time (n=1). The script automatically limits count to 1 when using this model.
  • GPT image models support additional parameters:
    • --background: transparent, opaque, or auto (default)
    • --output-format: png (default), jpeg, or webp
    • Note: stream and moderation are available via API but not yet implemented in this script
  • dall-e-3 has a --style parameter: vivid (hyper-real, dramatic) or natural (more natural looking)

Output

  • *.png, *.jpeg, or *.webp images (output format depends on model + --output-format)
  • prompts.json (prompt → file mapping)
  • index.html (thumbnail gallery)

Comments

Loading comments...