← 返回
未分类 中文

Happy IMG2 Direct

Generate images with an OpenAI-compatible image provider such as happy/gpt-image-2, with retries and bounded batch concurrency.
使用 OpenAI 兼容的图像生成服务(如 happy/gpt-image-2),支持重试和受限批并发。
jerryxn jerryxn 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 258
下载
💾 1
安装
1
版本
#gpt-image-2#image#latest

概述

Happy IMG2 Direct Skill

Generate real images through an OpenAI-compatible /images/generations endpoint configured in OpenClaw.

Default behavior:

  • provider: happy unless OPENCLAW_IMAGE_PROVIDER is set
  • model: gpt-image-2 unless OPENCLAW_IMAGE_MODEL is set
  • size: 1024x1024
  • timeout: 600000ms per image
  • output: ~/.openclaw/generated-images/
  • no local fake-image fallback
  • no built-in message delivery; send or attach files using your normal OpenClaw/channel tools

Single image

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 caller

Successful output is JSON containing ok:true, image_path or output, bytes, model/provider, attempt count, and run directory.

Batch images

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:

  • bounded concurrency, current hard maximum 4
  • each item has its own task directory and logs
  • one failed image does not prevent other images from finishing
  • final batch_result.json records success/failure per task
  • delivery is disabled in the public version; use OpenClaw/channel tools to send files

Retry behavior

Retries are limited and only used for retryable failures:

  • timeout
  • upstream failures
  • rate limits
  • HTTP 408/429/500/502/503/504
  • wrapper parse errors

Non-retryable errors, such as invalid requests or auth failures, fail fast with redacted diagnostics.

Safety and publishing notes

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.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-13 06:59 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 234 📥 49,968
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 439 📥 118,635
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 338 📥 95,289