examples/amazon-bedrock/video/README.md
You can run this example with:
npx promptfoo@latest init --example amazon-bedrock/video
cd amazon-bedrock/video
Video generation examples using AWS Bedrock's async invoke API.
| Model | Config | Region | Duration |
|---|---|---|---|
| Amazon Nova Reel | promptfooconfig.nova-reel.yaml | us-east-1 | 6s - 2min |
| Luma Ray 2 | promptfooconfig.luma-ray.yaml | us-west-2 only | 5s or 9s |
Video generation requires additional AWS setup beyond standard Bedrock access.
Visit the AWS Bedrock Model Access page and enable:
amazon.nova-reel-v1:1 (us-east-1)luma.ray-v2:0 (us-west-2)Video outputs are written to S3. Create a bucket in the same region as your model:
# For Nova Reel (us-east-1)
aws s3 mb s3://your-bucket-nova-reel --region us-east-1
# For Luma Ray 2 (us-west-2)
aws s3 mb s3://your-bucket-luma-ray --region us-west-2
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["bedrock:InvokeModel", "bedrock:StartAsyncInvoke", "bedrock:GetAsyncInvoke"],
"Resource": [
"arn:aws:bedrock:*:*:model/amazon.nova-reel-v1:1",
"arn:aws:bedrock:*:*:model/luma.ray-v2:0"
]
},
{
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject"],
"Resource": "arn:aws:s3:::your-bucket/*"
}
]
}
npm install @aws-sdk/client-bedrock-runtime @aws-sdk/client-s3
Update s3OutputUri in the config file, then run:
# Nova Reel
npx promptfoo@latest eval -c promptfooconfig.nova-reel.yaml
# Luma Ray 2
npx promptfoo@latest eval -c promptfooconfig.luma-ray.yaml
config:
region: us-east-1
s3OutputUri: s3://your-bucket/outputs/
durationSeconds: 6 # 6 for single, 12-120 for multi-shot
taskType: TEXT_VIDEO # or MULTI_SHOT_AUTOMATED, MULTI_SHOT_MANUAL
seed: 12345 # Optional, for reproducibility
image: file://./start-frame.jpg # Optional, for image-to-video
config:
region: us-west-2
s3OutputUri: s3://your-bucket/outputs/
duration: '5s' # or '9s'
resolution: '720p' # or '540p'
aspectRatio: '16:9'
loop: false
startImage: file://./start.jpg # Optional
endImage: file://./end.jpg # Optional