搜索

PythonReactSEOPDF
OpenClaw

grok-imagine-video

xAI Grok Imagine API integration for image generation, text-to-video, image-to-video, and editing via natural language. Use when you need to generate images or videos from text prompts, edit existing images, animate static images into videos, or edit existing videos with natural language instructions. Supports conversational generation across messaging platforms with async polling, progress updates, and automatic delivery.

devvgwardo0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install devvgwardo/grok-imagine-video

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Grok Imagine Video

Generate videos using xAI's Grok Imagine API directly from your messaging interface.

Setup

Important: You need your own xAI API key. Get it from https://console.x.ai/

For full installation instructions, see README.md

Quick setup:

# Set your xAI API key (YOUR key, not pre-configured)
export XAI_API_KEY="your-api-key-here"

Capabilities

  • Text-to-image: Generate images from text descriptions (up to 10 variations)
  • Image editing: Modify images using natural language
  • Text-to-video: Create videos from text descriptions
  • Image-to-video: Animate static images into motion
  • Video editing: Modify videos using natural language
  • Async generation: Handles long-running video jobs with polling
  • Auto-delivery: Downloads and delivers images/videos via chat

Workflow

1. Image Generation

User says: "Create an image of a cyberpunk cityscape at night"

python3 - << 'EOF'
import os
import sys
sys.path.insert(0, 'scripts')
from grok_video_api import GrokImagineVideoClient

client = GrokImagineVideoClient(os.getenv("XAI_API_KEY"))
result = client.generate_image("A cyberpunk cityscape at night, neon lights reflecting on wet streets")
print(f"Image URL: {result}")
EOF

Images are generated instantly (no polling needed). Download promptly as URLs are temporary.

1b. Image Editing

User says: "Edit this image — make it look like a watercolor"

python3 - << 'EOF'
import os
import sys
sys.path.insert(0, 'scripts')
from grok_video_api import GrokImagineVideoClient

client = GrokImagineVideoClient(os.getenv("XAI_API_KEY"))
result = client.edit_image(
    image_url="https://example.com/photo.jpg",
    prompt="Make it look like a watercolor painting"
)
print(f"Edited image: {result}")
EOF
2. Text-to-Video

User says: "Generate a video of a sunset over the ocean"

# Use the Python client
python3 - << 'EOF'
import os
import sys
sys.path.insert(0, 'scripts')...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/devvgwardo/grok-imagine-video
Version
—
Commit
9c7da9016372aa2d5dfd5f42fcf77dc2882c3fd6
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Grok Imagine Video & Image

GitHub stars License: MIT

A Python client and OpenClaw skill for generating images and videos using xAI's Grok Imagine APIs.

Features

  • Text-to-Image — Generate images from text (up to 10 variations)
  • Image Editing — Edit images with natural language instructions
  • Text-to-Video — Generate video clips from text descriptions
  • Image-to-Video — Animate static images into motion video
  • Video Editing — Apply filters, speed changes, color grading, and effects
  • Async Polling — Non-blocking job management with progress callbacks
  • OpenClaw Integration — Drop-in skill for Discord, Telegram, and WhatsApp bots

Quick Start

  1. Get an API key at console.x.ai

  2. Set your key

    export XAI_API_KEY="your-key-here"
    
  3. Run it

    from scripts.grok_video_api import GrokImagineVideoClient
    
    client = GrokImagineVideoClient(api_key="your-key")
    
    # Generate a video
    result = client.text_to_video("A golden retriever running through a sunny meadow", duration=10)
    final = client.wait_for_completion(result["request_id"])
    client.download_video(final, "output.mp4")
    

Usage

Image Generation
result = client.generate_image(
    prompt="A collage of London landmarks in a stenciled street-art style",
    n=4,                       # 1-10 variations
    aspect_ratio="16:9",
    response_format="b64_json" # or "url" (default)
)
Image Editing
result = client.edit_image(
    image_url="https://example.com/photo.jpg",
    prompt="Change the sky to a dramatic sunset"
)
Text-to-Video
result = client.text_to_vi...

来源内容

SKILL.md
# Grok Imagine Video

Generate videos using xAI's Grok Imagine API directly from your messaging interface.

## Setup

**Important:** You need your own xAI API key. Get it from https://console.x.ai/

For full installation instructions, see [README.md](README.md)

Quick setup:
```bash
# Set your xAI API key (YOUR key, not pre-configured)
export XAI_API_KEY="your-api-key-here"
```

## Capabilities

- **Text-to-image**: Generate images from text descriptions (up to 10 variations)
- **Image editing**: Modify images using natural language
- **Text-to-video**: Create videos from text descriptions
- **Image-to-video**: Animate static images into motion
- **Video editing**: Modify videos using natural language
- **Async generation**: Handles long-running video jobs with polling
- **Auto-delivery**: Downloads and delivers images/videos via chat

## Workflow

### 1. Image Generation

User says: "Create an image of a cyberpunk cityscape at night"

```bash
python3 - << 'EOF'
import os
import sys
sys.path.insert(0, 'scripts')
from grok_video_api import GrokImagineVideoClient

client = GrokImagineVideoClient(os.getenv("XAI_API_KEY"))
result = client.generate_image("A cyberpunk cityscape at night, neon lights reflecting on wet streets")
print(f"Image URL: {result}")
EOF
```

Images are generated instantly (no polling needed). Download promptly as URLs are temporary.

### 1b. Image Editing

User says: "Edit this image — make it look like a watercolor"

```bash
python3 - << 'EOF'
import os
import sys
sys.path.insert(0, 'scripts')
from grok_video_api import GrokImagineVideoClient

client = GrokImagineVideoClient(os.getenv("XAI_API_KEY"))
result = client.edit_image(
    image_url="https://example.com/photo.jpg",
    prompt="Make it look like a watercolor painting"
)
print(f"Edited image: {result}")
EOF
```

### 2. Text-to-Video

User says: "Generate a video of a sunset over the ocean"

```bash
# Use the Python client
python3 - << 'EOF'
import os
import sys
sys.path.insert(0, 'scripts')...
README
# Grok Imagine Video & Image

[![GitHub stars](https://img.shields.io/github/stars/DevvGwardo/grok-imagine-video?style=flat&logo=github)](https://github.com/DevvGwardo/grok-imagine-video)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

A Python client and [OpenClaw](https://docs.openclaw.ai) skill for generating images and videos using [xAI's Grok Imagine APIs](https://docs.x.ai/developers/model-capabilities).

## Features

- **Text-to-Image** — Generate images from text (up to 10 variations)
- **Image Editing** — Edit images with natural language instructions
- **Text-to-Video** — Generate video clips from text descriptions
- **Image-to-Video** — Animate static images into motion video
- **Video Editing** — Apply filters, speed changes, color grading, and effects
- **Async Polling** — Non-blocking job management with progress callbacks
- **OpenClaw Integration** — Drop-in skill for Discord, Telegram, and WhatsApp bots

## Quick Start

1. **Get an API key** at [console.x.ai](https://console.x.ai/)

2. **Set your key**
   ```bash
   export XAI_API_KEY="your-key-here"
   ```

3. **Run it**
   ```python
   from scripts.grok_video_api import GrokImagineVideoClient

   client = GrokImagineVideoClient(api_key="your-key")

   # Generate a video
   result = client.text_to_video("A golden retriever running through a sunny meadow", duration=10)
   final = client.wait_for_completion(result["request_id"])
   client.download_video(final, "output.mp4")
   ```

## Usage

### Image Generation

```python
result = client.generate_image(
    prompt="A collage of London landmarks in a stenciled street-art style",
    n=4,                       # 1-10 variations
    aspect_ratio="16:9",
    response_format="b64_json" # or "url" (default)
)
```

### Image Editing

```python
result = client.edit_image(
    image_url="https://example.com/photo.jpg",
    prompt="Change the sky to a dramatic sunset"
)
```

### Text-to-Video

```python
result = client.text_to_vi...

相关技能

OpenClaw

laborany

laborany

基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill c...

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...