Files
wehub-resource-sync 0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:24:08 +08:00

63 lines
1.8 KiB
Markdown

# openai-video (OpenAI Sora Video Generation)
This example demonstrates how to use OpenAI's Sora video generation models with Promptfoo.
## Setup
Initialize this example:
```bash
npx promptfoo@latest init --example openai-video
cd openai-video
```
Set your OpenAI API key:
```bash
export OPENAI_API_KEY=your_api_key_here
```
## Usage
Run the evaluation:
```bash
npx promptfoo@latest eval
```
View results in the web UI:
```bash
npx promptfoo@latest view
```
## Models
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 |
## Configuration Options
| 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 |
## Output
Generated videos are stored in the promptfoo media storage (`~/.promptfoo/media/`) and displayed in the web viewer with playback controls.
## Notes
- Video generation can take 1-5 minutes per video
- Videos are cached based on request parameters (prompt, model, size, seconds) to avoid regeneration
- The web viewer supports video playback with controls and metadata display