Source Code
Grok Image Generation
Setup
Add your API key to ~/.clawdbot/.env:
GROK_API_KEY=xai-your-key-here
Usage
Generate images with a simple prompt:
Generate a cute raccoon character with friendly smile
The skill will:
- Read GROK_API_KEY from ~/.clawdbot/.env
- Call Grok's image generation API
- Save the image and return the path
Options
- Custom output path: Add
--output /path/to/image.png - Size:
--size 512x512(default: 1024x1024)
Notes
- Uses grok-imagine-image model
- Images are saved to the workspace or specified path