360 Secure SkillHub
360 安全技能中心

Cloudflare Image Generation

通过 scripts/generate_image.py 调用 Cloudflare Workers AI 的 flux-1-schnell 模型,把文本提示词生成 PNG 图片并返回文件路径;需使用 SKILL.md 中硬编码的 Account ID 与 Token 访问 api.cloudflare.com,图片需由调用方发送给用户(原文提到 Telegram)。

分类:创作
expysf98
expysf98
热度 50.96
最近更新 2026-05-18 12:06:28

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add expysf98/cloudflare-image-gen
兼容性
OpenClaw 专属
联网要求
需要联网
数据出网
必须出网
Metadata
name
cloudflare-image-gen
description
Generate images using Cloudflare Workers AI flux-1-schnell model. Use when user requests image generation with text-to-image using Cloudflare Workers API.

Cloudflare Image Generation

This skill generates images using Cloudflare Workers AI @cf/black-forest-labs/flux-1-schnell model.

Credentials

  • Account ID: 1e89d3ce76cbfef3b5c340e3984b7a52
  • Token: aCTA2KaKa1n3ayFDL-LPmZ-JgUC0HHgA5Msy18Bk
  • Model: @cf/black-forest-labs/flux-1-schnell

Usage

Run the script directly:

python3 /home/ubuntu/.openclaw/workspace/skills/cloudflare-image-gen/scripts/generate_image.py "your prompt here" -o output.png

Or use the Python function:

import sys
sys.path.insert(0, '/home/ubuntu/.openclaw/workspace/skills/cloudflare-image-gen/scripts')
from generate_image import generate_image

output_path = generate_image("a black horse")

Output

The script saves the generated image as PNG and returns the file path. Send the image to the user via Telegram.