grok-imagine
Generate images via xAI's Grok Imagine API. Use when the user wants to create AI-generated images using xAI/Grok, or when OpenAI image generation is unavailable.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- grok-imagine
- homepage
- https://docs.x.ai/docs/api-reference#image-generation
- metadata
- { "openclaw": { "emoji": "?", "requires": { "env": [ "XAI_API_KEY" ], "bins": [ "node" ] }, "primaryEnv": "XAI_API_KEY" } }
- description
- Generate images via xAI's Grok Imagine API. Use when the user wants to create AI-generated images using xAI/Grok, or when OpenAI image generation is unavailable.
02 资源文件 3
- 参考文档_meta.json278 B
- 参考文档README.md802 B
- 脚本scripts/gen.mjs5.1 KB
03 SKILL.md 正文
Grok Imagine
Generate images via xAI's Grok Imagine API.
Run
node {baseDir}/scripts/gen.mjs --prompt "your image description"
Examples
# Basic image generation
node {baseDir}/scripts/gen.mjs --prompt "a cyberpunk city at sunset"
# Multiple images
node {baseDir}/scripts/gen.mjs --prompt "a friendly robot" --count 4
# Custom output directory
node {baseDir}/scripts/gen.mjs --prompt "mountain landscape" --out-dir ./images
# Image editing (provide input image)
node {baseDir}/scripts/gen.mjs --prompt "add a rainbow to the sky" --input /path/to/image.png
Models
- grok-imagine-image: Text-to-image and image editing (default)
- grok-2-image: Legacy image generation model
Parameters
--prompt, -p: Image description (required)--count, -n: Number of images to generate (default: 1)--model, -m: Model to use (default: grok-imagine-image)--input, -i: Input image path for editing tasks (optional)--out-dir, -o: Output directory (default: ./tmp/grok-imagine-<timestamp>)
Output
- Generated images saved as PNG files
prompts.jsonwith prompt → file mappingindex.htmlthumbnail galleryMEDIA:lines for OpenClaw auto-attach
API Key
Set XAI_API_KEY environment variable, or configure in OpenClaw:
skills."grok-imagine".apiKeyin~/.openclaw/openclaw.json
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.