← 返回
未分类 Key 中文

Grok Image Generation

Generate new images and edit existing images with xAI Grok Imagine from a local OpenClaw workspace. Use when the user wants Grok/xAI as the image source for...
在本地 OpenClaw 工作区使用 xAI Grok Imagine 生成新图像或编辑现有图像,适用于用户希望以 Grok/xAI 作为图像来源的场景。
stanestane stanestane 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 73
下载
💾 0
安装
1
版本
#latest

概述

Grok Image Generation

Use the local scripts in this skill when the user specifically wants Grok/xAI for image generation or editing.

Quick workflow

  1. Confirm XAI_API_KEY exists in the local environment.
  2. For new images, run scripts/grok_imagine.py generate ....
  3. For edits or variations from source images, run scripts/grok_imagine.py edit ... with one to three --image or --image-url inputs.
  4. Save outputs under a task-specific folder when the user names a destination; otherwise use the default output/grok-images/.
  5. If prompts are weak or generic, read references/prompt-templates.md and improve them before generating.

Commands

Run from the skill directory or give absolute paths.

Generate

py -3 scripts\grok_imagine.py generate "A retro sci-fi poster with a giant moon" --aspect-ratio 2:3 --resolution 2k --n 1

Batch variations

py -3 scripts\grok_imagine.py generate "A clean premium mockup of a horror-movie T-shirt design" --n 4 --aspect-ratio 1:1

Edit one source image

py -3 scripts\grok_imagine.py edit "Turn this into a vintage pulp-poster illustration" --image C:\path\to\source.png --resolution 2k

Combine multiple references

py -3 scripts\grok_imagine.py edit "Place the subject from image one into the lighting and palette of image two" --image C:\path\subject.png --image C:\path\style.png

Prompting rules

  • State what must be preserved before what must change.
  • For products and mockups, prioritize subject accuracy and readability.
  • For T-shirt art, ask for strong silhouette, high contrast, and print-friendly detail.
  • For batches, request meaningful variation in composition, angle, and lighting.
  • For edits, keep the instruction narrow unless the user wants radical transformation.

Read references/prompt-templates.md when you need a starting prompt pattern.

Editing and variations

Treat variation in three ways depending on the job:

  • Same prompt, multiple fresh outputs -> use generate with --n > 1
  • Same image, changed style or cleanup -> use edit with one source image
  • Composite / transfer / merge references -> use edit with two or three source images

Failure handling

  • If xAI returns 403 mentioning credits, licenses, or permissions, stop and tell the user billing/access is the blocker.
  • If returned image URLs are temporary, download them immediately; the script already does this.
  • If xAI changes payload shape, update scripts/grok_imagine.py using references/api-reference.md plus the latest xAI docs.

Resources

  • scripts/grok_imagine.py - local generator/editor wrapper for xAI
  • references/prompt-templates.md - reusable prompt skeletons
  • references/api-reference.md - current endpoint assumptions and payload shapes

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-06-07 13:14

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 217 📥 47,384
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 429 📥 116,804
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 330 📥 93,674