home / skills / openclaw / skills / cloudflare-image-gen
This skill generates images from text prompts using Cloudflare Workers AI flux-1-schnell, returning PNGs for easy sharing.
npx playbooks add skill openclaw/skills --skill cloudflare-image-genReview the files below or copy the command above to add this skill to your agents.
---
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:
```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.
This skill generates images with Cloudflare Workers AI using the flux-1-schnell model. It provides a simple CLI and a Python function to create PNG images from text prompts. The output is a saved PNG file path that can be delivered to users or integrated into bot workflows.
The skill sends a text-to-image request to Cloudflare Workers AI (flux-1-schnell) and streams the returned image data to a PNG file. It exposes a command-line entry point for one-off generation and a Python function you can import into other services. The returned value is the local file path to the saved image for further processing or delivery.
What formats does the skill output?
Generated images are saved as PNG files by default and returned as file paths.
Can I call this from other Python code?
Yes. Import the provided generate_image function and pass a prompt to receive the output path.
How do I control image size or style?
Include size and style details in the prompt, and configure any supported parameters exposed by the wrapper if available.