examples/openai-video/README.md
This example demonstrates how to use OpenAI's Sora video generation models with Promptfoo.
Initialize this example:
npx promptfoo@latest init --example openai-video
cd openai-video
Set your OpenAI API key:
export OPENAI_API_KEY=your_api_key_here
Run the evaluation:
npx promptfoo@latest eval
View results in the web UI:
npx promptfoo@latest view
This example compares two Sora models:
| Model | Description | Cost |
|---|---|---|
| sora-2 | Standard quality | $0.10/second |
| sora-2-pro | Higher quality output | $0.30/second |
| Parameter | Description | Default |
|---|---|---|
size | Video dimensions (1280x720 or 720x1280) | 1280x720 |
seconds | Duration in seconds (4, 8, or 12) | 8 |
poll_interval_ms | Polling interval for job status | 10000 |
max_poll_time_ms | Maximum wait time for generation | 600000 |
download_thumbnail | Download thumbnail preview | true |
download_spritesheet | Download spritesheet preview | true |
Generated videos are stored in the promptfoo media storage (~/.promptfoo/media/) and displayed in the web viewer with playback controls.