← 返回
内容创作 Key 中文

Generate images using Runware API

Generate high-quality images on-demand via the Runware.ai API. This skill is the default image generator. Use it whenever the user asks to "generate an image...
通过 Runware.ai API 按需生成高质量图片。默认图片生成器,用户要求生成图片时使用。
geeklord
内容创作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 788
下载
💾 45
安装
1
版本
#latest

概述

Runware Image Skill

Purpose

Provide a secure, documented, and testable integration for generating images via the Runware.ai Image Inference API.

IMPORTANT INSTRUCTIONS FOR AGENT:

  1. Do NOT ask the user for the RUNWARE_API_KEY. The script automatically loads it from the .env file in the skill directory.
  2. Do NOT ask clarifying questions (style, size, etc.) unless the user's prompt is extremely vague. For requests like "generate a man on the moon", use your best judgment for the prompt and run the script immediately.
  3. Execute the script directly. Do not propose it.

What it does

  • Send text-to-image tasks to Runware's task API (imageInference).
  • Support synchronous (sync) responses returning base64 image data and asynchronous workflows (webhook/polling) if required.
  • Save generated images to the user's Downloads folder by default.
  • Validate prompts for common safety issues (e.g., minors) before sending requests.

Included files

  • scripts/generate_image.py — Primary CLI script (Python 3.8+). Reads RUNWARE_API_KEY from environment, supports sync mode, size/format options, and output filename.
  • skill-config.json — default parameters (no secrets). Contains default_size and default_format.
  • SKILL.md — this metadata and usage file.

Security & secrets

  • DO NOT commit API keys. This skill requires RUNWARE_API_KEY to be provided via the environment when executed (export RUNWARE_API_KEY=...) or via a secure secret manager.
  • The packaged version uploaded to ClawHub must not include any API keys. Before publishing, confirm skill-config.json contains NO sensitive values.
  • The script performs simple prompt filtering; users should still follow platform content policies.

Usage (CLI)

  1. Install dependencies
    • pip install -r requirements.txt

(The script uses requests and python-dotenv; keep requirements minimal.)

  1. Set your Runware API key. You can create a .env file in the skill directory:

RUNWARE_API_KEY=your_key_here

Or set it in your environment:

$env:RUNWARE_API_KEY = ""

  1. Run the script (sync mode):

python scripts/generate_image.py --prompt "A photorealistic adult portrait (age 25)" --sync --outfile "my_image.png"

  1. For non-sync workflows, omit --sync and implement webhook handling or polling as described in the Runware docs.

Configuration

  • skill-config.json fields:
  • default_size: e.g. "1024x1024"
  • default_format: e.g. "png"

Packaging & publishing (ClawHub)

Checklist before publishing:

  • Remove any plaintext API keys from skill-config.json (already removed).
  • Add a short one-line license (MIT recommended) in LICENSE file.
  • Add a small tests/ directory with a smoke test that verifies parsing logic and saved file behavior using temporary directories. Tests may require RUNWARE_API_KEY for live integration or can be skipped in CI if secrets are not provided.
  • Ensure SKILL.md frontmatter (name + description) is accurate and includes trigger phrases.
  • Provide example prompts and recommended safety guidance in SKILL.md.

Suggested repository structure

runware-image/

├── SKILL.md

├── skill-config.json

├── scripts/

│ └── generate_image.py

├── requirements.txt

├── LICENSE

└── tests/

└── test_generate_image.py

Tests and CI

  • Include a minimal pytest-based test that stubs requests.post and verifies parsing logic and saved file behavior using temporary directories.
  • Add GitHub Actions workflow (optional) that runs tests on push.

Contribution & support

  • Include a short CONTRIBUTING.md describing how to run tests, where to report issues, and how to add features (e.g., support for ControlNet, LoRA, or custom models).
  • Provide an examples/ folder with 2–3 example prompts and expected CLI commands.

Licensing

  • Recommend MIT license for public sharing unless you prefer another OSI-approved license.

Privacy and usage notes

  • Make it explicit that the skill does not collect or store user prompts or keys on the server. All generation is performed using the user's Runware account.
  • Recommend users review Runware's terms and ensure they have rights to generate/host the requested imagery.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 09:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 294 📥 136,401
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,131
content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 141 📥 41,016