SGLang-Diffusion Image Generation
VerifiedGenerate images using a local SGLang-Diffusion server (FLUX, Stable Diffusion, Qwen-Image, etc.). Use when: user asks to generate, create, draw, or render an...
$ Add to .claude/skills/ About This Skill
# SGLang-Diffusion Image Generation
Generate images via a local SGLang-Diffusion server's OpenAI-compatible API.
Prerequisites
- SGLang-Diffusion server running (default: `http://127.0.0.1:30000`)
- If the server was started with `--api-key`, set `SGLANG_DIFFUSION_API_KEY` env var
Generate an image
```bash python3 {baseDir}/scripts/generate.py --prompt "a futuristic cityscape at sunset" ```
Useful flags
```bash python3 {baseDir}/scripts/generate.py --prompt "portrait of a cat" --size 512x512 python3 {baseDir}/scripts/generate.py --prompt "abstract art" --negative-prompt "blurry, low quality" python3 {baseDir}/scripts/generate.py --prompt "landscape" --steps 30 --guidance-scale 7.5 --seed 42 python3 {baseDir}/scripts/generate.py --prompt "photo" --server http://192.168.1.100:30000 --out ./my-image.png ```
API key (optional)
Only needed if the SGLang-Diffusion server was started with `--api-key`. Set `SGLANG_DIFFUSION_API_KEY`, or pass `--api-key` directly:
```bash python3 {baseDir}/scripts/generate.py --prompt "hello" --api-key sk-my-key ```
Or configure in `~/.openclaw/openclaw.json`:
```json5 { skills: { "sglang-diffusion": { env: { SGLANG_DIFFUSION_API_KEY: "sk-my-key" }, }, }, } ```
Notes
- The script prints a `MEDIA:` line for OpenClaw to auto-attach on supported chat providers.
- Output defaults to timestamped PNG in `/tmp/`.
- Do not read the image back; report the saved path only.
Use Cases
- Generate structured output from specifications or requirements
- Interact with external APIs for data retrieval and service integration
- Deploy and run diffusion models for AI image generation
- Integrate Qwen AI models for text generation and coding tasks
- Manage and configure Raspberry Pi devices remotely
Pros & Cons
Pros
- +API-based architecture allows flexible integration with various platforms
- +Well-structured API patterns for reliable backend development
- +Handles common backend concerns like error handling and validation
Cons
- -Requires API key configuration — not free or self-contained
- -Assumes specific backend architecture patterns that may not match all projects
- -Error handling patterns may need adaptation for production use
FAQ
What does SGLang-Diffusion Image Generation do?
What platforms support SGLang-Diffusion Image Generation?
What are the use cases for SGLang-Diffusion Image Generation?
100+ free AI tools
Writing, PDF, image, and developer tools — all in your browser.
Next Step
Use the skill detail page to evaluate fit and install steps. For a direct browser workflow, move into a focused tool route instead of staying in broader support surfaces.