laborany
基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill c...
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.
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
SkillHub CLI
skillhub install devvgwardo/grok-imagine-videoInspect the source and compatibility requirements, then follow its installation steps.
Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.
Generate videos using xAI's Grok Imagine API directly from your messaging interface.
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"
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.
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
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')...
These signals come from indexed source analysis and may lag behind changes. Check the current source files.
A Python client and OpenClaw skill for generating images and videos using xAI's Grok Imagine APIs.
Get an API key at console.x.ai
Set your key
export XAI_API_KEY="your-key-here"
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")
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)
)
result = client.edit_image(
image_url="https://example.com/photo.jpg",
prompt="Change the sky to a dramatic sunset"
)
result = client.text_to_vi...
# 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')...# Grok Imagine Video & Image
[](https://github.com/DevvGwardo/grok-imagine-video)
[](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...基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill c...
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...
Reusable OpenClaw skill for remote Linux deployment with MiniMax M2.1 and Telegram bot setup
Bots learn, human earns, curated open claw playbook list and skill list for life long learners at https://botlearn.ai