cloudflare-image-gen
使用 Cloudflare Workers AI Flux-1-schnell 模型生成图像。当用户请求使用 Cloudflare Workers API 生成文本到图像的图像时使用。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw skills install shop:totalclaw:totalclaw~expysf98-cloudflare-image-gencURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~expysf98-cloudflare-image-gen/file -o expysf98-cloudflare-image-gen.md# 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:
```bash
python3 /home/ubuntu/.openclaw/workspace/skills/cloudflare-image-gen/scripts/generate_image.py "your prompt here" -o output.png
```
Or use the Python function:
```python
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.
---
## 中文说明
# Cloudflare 图像生成
本技能使用 Cloudflare Workers AI 的 `@cf/black-forest-labs/flux-1-schnell` 模型生成图像。
## 凭据
- Account ID: `1e89d3ce76cbfef3b5c340e3984b7a52`
- Token: `aCTA2KaKa1n3ayFDL-LPmZ-JgUC0HHgA5Msy18Bk`
- Model: `@cf/black-forest-labs/flux-1-schnell`
## 用法
直接运行脚本:
```bash
python3 /home/ubuntu/.openclaw/workspace/skills/cloudflare-image-gen/scripts/generate_image.py "your prompt here" -o output.png
```
或使用该 Python 函数:
```python
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")
```
## 输出
脚本会将生成的图像保存为 PNG 并返回文件路径。请通过 Telegram 将图像发送给用户。