examples/xai/video/README.md
You can run this example with:
npx promptfoo@latest init --example xai/video
cd xai/video
This example demonstrates video generation using xAI's Grok Imagine API.
export XAI_API_KEY=your_api_key_here
npx promptfoo@latest eval
| Option | Type | Default | Description |
|---|---|---|---|
duration | number | 8 | Video length in seconds (1-15) |
aspect_ratio | string | 16:9 | Aspect ratio (16:9, 4:3, 1:1, 9:16, 3:4, 3:2, 2:3) |
resolution | string | 720p | Output resolution (720p, 480p) |
Animate a static image:
providers:
- id: xai:video:grok-imagine-video
config:
image:
url: 'https://example.com/image.jpg'
Edit an existing video:
providers:
- id: xai:video:grok-imagine-video
config:
video:
url: 'https://example.com/video.mp4'
prompts:
- 'Make the colors more vibrant'