360 Secure SkillHub
360 安全技能中心

SiliconFlow Image Gen

该 Skill 提供命令行脚本,通过 SiliconFlow 图像生成接口根据文本提示词生成图片,支持选择 FLUX.1 或 Stable Diffusion 模型,并可将结果下载到本地;使用前需配置 SILICONFLOW_API_KEY,也可读取 OpenClaw 配置自动获取凭据。

lilei0311
lilei0311
热度 87.68
最近更新 2026-05-11 17:25:45
分类:创作依赖:代码执行 / 读写文件 / 第三方 API应用场景:图像生成 / API 集成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add siliconflow-image-gen
Metadata
name
siliconflow-image-gen
description
Generate images using SiliconFlow API (FLUX.1, Stable Diffusion, etc.)
env
["SILICONFLOW_API_KEY"]
files
{"config":["~/.openclaw/openclaw.json"]}

SiliconFlow Image Generation Skill

Generate images using SiliconFlow API with support for FLUX.1, Stable Diffusion, and more.

Features

  • 🎨 Multiple Models: FLUX.1-schnell (free), FLUX.1-dev, Stable Diffusion 3.5
  • 🔑 Auto API Key Detection: Reads from environment or OpenClaw config
  • 💾 Auto Download: Saves generated images locally
  • 📱 OpenClaw Ready: Designed for OpenClaw Agent integration

Requirements

  • Environment Variable: SILICONFLOW_API_KEY
  • Optional Config File: ~/.openclaw/openclaw.json (for auto-detect)

Installation

npx clawhub install siliconflow-image-gen

Configuration

Set your SiliconFlow API key:

export SILICONFLOW_API_KEY="your-api-key"

Or configure in OpenClaw:

{
  "models": {
    "providers": {
      "siliconflow": {
        "apiKey": "your-api-key"
      }
    }
  }
}

Usage

Command Line

# Generate with default model (FLUX.1-schnell)
python3 scripts/generate.py "A cup of coffee on wooden table"

# Specify model
python3 scripts/generate.py "Sunset over mountains" --model "black-forest-labs/FLUX.1-dev"

# Save to file
python3 scripts/generate.py "Cute cat" --output ~/Desktop/cat.png

Available Models

Model Cost Quality Speed
black-forest-labs/FLUX.1-schnell Free Good Fast
black-forest-labs/FLUX.1-dev Paid Excellent Medium
stabilityai/stable-diffusion-3-5-large Paid Excellent Medium

Security Notes

  • This skill requires an API key to call SiliconFlow services
  • The script reads ~/.openclaw/openclaw.json only to auto-detect API keys
  • No sensitive data is transmitted except to api.siliconflow.cn
  • Review the code at scripts/generate.py before providing credentials

Author

MaxStorm Team

License

MIT