通过Cloudflare Workers AI(免费层级,FLUX模型)进行AI图像生成,配备高级EvoLink备用方案。适用于从文本提示生成图像、创建...
Two-tier image generation with intelligent routing. Free by default.
bash
# Generate an image (free tier)
nexpix "a sunset over the ocean with sailboats"
# Specify size
nexpix "cyberpunk cityscape" --size 1024x768
# Premium quality (EvoLink fallback)
nexpix "product photo of a clay jar" --quality premium
# Force a specific route
nexpix "logo design" --route workers-ai
nexpix "4K wallpaper" --route evolink
# Check usage/quota
nexpix --status
javascript
const nexpix = require('./nexpix');
const result = await nexpix.generate({
prompt: "a futuristic city at night",
quality: "standard", // standard | premium
width: 1024,
height: 1024,
});
console.log(result.filepath); // local path to saved image
console.log(result.source); // 'workers-ai' or 'evolink'
console.log(result.cost); // 0 for free tier
text
Discord: /canvas a mountain landscape at dawn
Telegram: /canvas a mountain landscape at dawn
See references/messaging-integration.md for slash command manifests.
ModelSpeedQualityKeyFLUX.1-schnell1-3sGood5-10sGreatflux-schnell (default)FLUX.2-devflux-2-devStable Diffusion XL3-5sGood2-4sGoodsdxlDreamShaper 8 LCMdreamshaper
TierCostLimitProviderFree$0/month10K neurons/day (50-100 images)Cloudflare Workers AIPro$0.12-0.20/imageUnlimitedEvoLink APIEnterpriseCustomCustomSelf-hosted Workers
ACCESS/cloudflare-workers-ai.envEVOLINK_API_KEY for premium fallbackFilePurposenexpix.jsCore module (routing, generation, tracking)bin/nexpixCLI entry pointscripts/deploy-worker.shDeploy/update Cloudflare Workerreferences/messaging-integration.mdDiscord + Telegram setup
Images saved to ~/.openclaw/media/workers-ai/ (free) or ~/.openclaw/media/evolink/ (premium).
Print MEDIA:<absolute_path> for OpenClaw auto-attach.
All generations logged to notes/image-gen-tracking.json:
Check with nexpix --status or programmatically via nexpix.getStatus().
bash
clawhub install nexpix