Generiert hochwertige Bilder mit xAI Grok/Flux API. Use when user asks for image generation ("mach a Bild von...", "generier PNG...", "Bild erstellen") or image editing ("ändere das Bild", "mach daraus..."). Handles Prompts, styles, aspect ratios, edits, batch generation. Outputs PNG via base64 or file.
API Key: $XAI_API_KEY (already configured)
Save dir: ~/.openclaw/media/ (resolves to /data/.openclaw/media/ — allowed for Telegram sending)
grok-imagine-image — standard quality, fasterCODEBLOCK0
Add "aspect_ratio": "<ratio>" to the JSON body. Supported values:
| Ratio | Use case |
|---|---|
| INLINECODE6 | Social media, thumbnails |
| INLINECODE7 / INLINECODE8 |
4:3 / 3:4 | Presentations, portraits |3:2 / 2:3 | Photography |2:1 / 1:2 | Banners, headers |auto | Model picks best ratio (default) |
Set "n": <count> (1-10) to generate multiple images in one request.
Edit an existing image by providing a source image plus an edit prompt.
Uses the same /v1/images/generations endpoint with an added image_url field.
Do NOT use /v1/images/edits with multipart — xAI requires JSON.
IMPORTANT: For local files, use Python to build the payload JSON file, then curl with @file.
Inline base64 in curl args causes "Argument list too long" for images >~100KB.
NOTE: This is NOT true image editing — the API generates a new image inspired by the source.
It cannot make pixel-precise edits (e.g. changing only a car's color while keeping everything else identical).
CODEBLOCK1
CODEBLOCK2
Use editing with a style prompt, e.g.:
CODEBLOCK3
message field (required even for media-only sends)/tmp/, ~/.openclaw/media/, INLINECODE24size parameter — returns 400aspect_ratio in JSON body (not size)image_url field in the generations endpoint (NOT the edits endpoint with multipart)"response_format": "b64_json" — URL format returns temporary URLs that often 403/tmp/ → curl with @file syntax该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 grok-imagine-image-pro-1776420050 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 grok-imagine-image-pro-1776420050 技能
skillhub install grok-imagine-image-pro-1776420050
文件大小: 2.87 KB | 发布时间: 2026-4-17 19:14