← 返回
内容创作 Key 中文

Grok Imagine

Generate images and videos using xAI Grok Imagine Extended. Text-to-image, image editing, text-to-video, image-to-video. Use when: user asks to generate, cre...
使用 xAI Grok Imagine Extended 生成图像和视频。支持文生图、图像编辑、文生视频、图生视频。当用户请求生成、创作...时使用。
ademczuk
内容创作 clawhub v1.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 856
下载
💾 52
安装
1
版本
#latest

概述

Grok Imagine Extended (xAI Image & Video Generation)

Generate images and videos from text prompts using the xAI API.

Image Generation

python3 {baseDir}/scripts/generate_image.py --prompt "your image description" --filename "output.png"

With options:

python3 {baseDir}/scripts/generate_image.py --prompt "a cyberpunk city at night" --filename "city.png" --resolution 2k --aspect-ratio 16:9

Image Editing

Single source image:

python3 {baseDir}/scripts/generate_image.py --prompt "make it a watercolor painting" --filename "edited.png" -i "/path/to/source.jpg"

Multiple source images (up to 3):

python3 {baseDir}/scripts/generate_image.py --prompt "combine into one scene" --filename "combined.png" -i img1.png -i img2.png

Video Generation

Text-to-video:

python3 {baseDir}/scripts/generate_image.py --prompt "a cat walking through flowers" --filename "cat.mp4" --video --duration 5

Image-to-video (animate a still):

python3 {baseDir}/scripts/generate_image.py --prompt "add gentle camera zoom and wind" --filename "animated.mp4" --video -i photo.jpg --duration 5

Models

| Model | Type | Cost |

|-------|------|------|

| grok-imagine-image | Image (default) | $0.02/img |

| grok-imagine-image-pro | Image (high quality) | $0.07/img |

| grok-imagine-video | Video (auto for --video) | $0.05/sec |

Select model with --model grok-imagine-image-pro. Video mode always uses grok-imagine-video.

All Options

| Flag | Description |

|------|-------------|

| --prompt, -p | Text description (required) |

| --filename, -f | Output path (required) |

| -i | Input image for editing/animation (repeatable, max 3 for images, 1 for video) |

| --model, -m | Image model (default: grok-imagine-image) |

| --aspect-ratio, -a | 1:1, 16:9, 9:16, 4:3, 3:4, etc. |

| --resolution, -r | Image: 1k/2k. Video: 480p/720p |

| --n | Number of images 1-10 (default 1) |

| --video | Generate video instead of image |

| --duration, -d | Video duration 1-15 seconds (default 5) |

| --api-key, -k | Override XAI_API_KEY |

API Key

  • XAI_API_KEY env var
  • Or set skills."grok-imagine".apiKey / skills."grok-imagine".env.XAI_API_KEY in ~/.openclaw/openclaw.json
  • Or auto-read from ~/keys.txt

Notes

  • Use timestamps in filenames: 2026-03-01-cyberpunk-city.png
  • The script prints a MEDIA: line for OpenClaw to auto-attach on supported chat providers
  • Do not read the image back; report the saved path only
  • Image URLs from xAI are temporary; the script downloads them immediately
  • Video generation is async and polls until done (can take 1-5 minutes)
  • 2k resolution returns PNG; 1k returns JPEG

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-30 01:30 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

OpenClaw Skills Weekly

ademczuk
OpenClaw 技能周报 — 追踪热门 ClawHub 技能,生成 GitHubAwesome 风格 YouTube 视频脚本,采用双轨排名(Movers + Rockets)。
★ 0 📥 832
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,864
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,204