Install
openclaw skills install happy-img2-directGenerate images with an OpenAI-compatible image provider such as happy/gpt-image-2, with retries and bounded batch concurrency.
openclaw skills install happy-img2-directGenerate real images through an OpenAI-compatible /images/generations endpoint configured in OpenClaw.
Default behavior:
happy unless OPENCLAW_IMAGE_PROVIDER is setgpt-image-2 unless OPENCLAW_IMAGE_MODEL is set1024x1024600000ms per image~/.openclaw/generated-images/python3 skills/happy-img2-direct/scripts/run.py \
--prompt "A realistic photo of an orange cat sitting by a window, no text, no watermark" \
--task-name "cat-test" \
--no-send
Useful flags:
--prompt required--task-name output filename prefix--provider provider key in OpenClaw config, default happy--model image model, default gpt-image-2--size default 1024x1024--timeout-ms default 600000--output-dir default ~/.openclaw/generated-images--max-attempts default 3, maximum 5--retry-base-delay, --retry-max-delay, --retry-jitter--raw marker for callers that intentionally keep the user prompt unchanged--no-send accepted for compatibility; this public skill always leaves delivery to the callerSuccessful output is JSON containing ok:true, image_path or output, bytes, model/provider, attempt count, and run directory.
python3 skills/happy-img2-direct/scripts/batch_run.py @batch.json
Example:
{
"batch_name": "article-covers",
"max_workers": 4,
"timeout_ms": 600000,
"send_to_feishu": false,
"tasks": [
{"task_name": "cover-1", "prompt": "Realistic shop counter photo, no readable text"},
{"task_name": "cover-2", "prompt": "Realistic office desk photo, no readable text"}
]
}
Batch rules:
4batch_result.json records success/failure per taskRetries are limited and only used for retryable failures:
408/429/500/502/503/504Non-retryable errors, such as invalid requests or auth failures, fail fast with redacted diagnostics.
This skill intentionally contains no private OpenClaw IDs, no hard-coded user paths, no API keys, and no channel recipient IDs. It reads provider configuration from the local OpenClaw config at runtime.