Videos API¶
Generate videos from text prompts and reference images with Amazon Bedrock video models through the OpenAI Videos API shape.
Video generation is asynchronous: creating a video returns a job object immediately. Poll the job until its status is completed, then download the MP4 content — exactly like the OpenAI (Sora) workflow, so the official OpenAI SDKs work unchanged.
Why Choose the Videos API?¶
-
Text-to-Video & Image-to-Video
Generate studio-quality clips from a prompt, optionally guided by a reference image used as the first frame. -
Drop-in OpenAI Compatibility
Follows the OpenAI Videos API shape.client.videos.create(...)works by changing the base URL. -
Durable Job IDs
Video IDs stay valid across restarts and behind a load balancer — retrieve, download and delete work from any instance. -
Private AWS Backend
Videos are generated by Amazon Bedrock and stored in your own S3 buckets — no traffic to third-party endpoints.
Quick Start: Available Endpoints¶
| Endpoint | Method | What It Does | Powered By | MCP Tool |
|---|---|---|---|---|
/v1/videos |
POST |
Start an asynchronous video generation job | Amazon Bedrock Video Models | openai_video_generation |
/v1/videos |
GET |
List video generation jobs across regions | Amazon Bedrock | openai_video_list |
/v1/videos/{video_id} |
GET |
Retrieve the current state of a job | Amazon Bedrock | openai_video_get |
/v1/videos/{video_id}/content |
GET |
Download the generated MP4 once completed | Amazon S3 | openai_video_content |
/v1/videos/{video_id} |
DELETE |
Delete the stored video output | Amazon S3 | openai_video_delete |
Example with the OpenAI Python SDK:
import time
from openai import OpenAI
client = OpenAI(base_url="https://your-host/v1", api_key="your-api-key")
video = client.videos.create(
model="luma.ray-v2:0", prompt="Closeup of a seashell on a sandy beach, gentle waves"
)
while video.status in ("queued", "in_progress"):
time.sleep(10)
video = client.videos.retrieve(video.id)
with open("video.mp4", "wb") as file:
file.write(client.videos.download_content(video.id).read())
client.videos.delete(video.id)
Example request (curl):
curl -X POST "https://your-host/v1/videos" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "luma.ray-v2:0",
"prompt": "Closeup of a seashell on a sandy beach, gentle waves",
"seconds": "5",
"size": "1280x720"
}'
Example response:
{
"id": "video_eyJhcm4iOiJhcm46YXdzOmJlZHJvY2s6...",
"object": "video",
"model": "luma.ray-v2:0",
"status": "queued",
"progress": 0,
"created_at": 1783805314,
"seconds": "5",
"size": "1280x720",
"prompt": "Closeup of a seashell on a sandy beach, gentle waves"
}
Feature Compatibility¶
| Feature | Status | Notes |
|---|---|---|
| Creation | ||
prompt |
Full support | |
model |
Required — this gateway has no implicit default video model | |
seconds / size |
Supported values depend on the model (see table below) | |
input_reference |
First-frame image; also accepts URLs/S3/Files API IDs in JSON requests | |
| Extra model-specific params | Extra fields are forwarded to the model (e.g. seed, loop); a string value that parses as a JSON number, boolean, or null is forwarded as that type |
|
| Lifecycle | ||
| Retrieve / poll job | progress is 0 while running and 100 when completed |
|
Download content (video) |
Streamed MP4 | |
| Delete video | Removes the stored output from S3 | |
variant=thumbnail/spritesheet |
Amazon Bedrock generates only the video asset | |
List videos (GET /v1/videos) |
Merged across regions; listed while AWS retains the job record | |
| Remix video | Not available on Amazon Bedrock | |
| Edits / extensions / characters | /v1/videos/edits, /videos/extensions, and /videos/characters are not available on Amazon Bedrock |
|
expires_at |
Reported only when a retention period is configured |
Legend:
- Supported — Fully compatible with OpenAI API
- Available on Select Models — Check your model's capabilities
- Partial — Supported with limitations
- Unsupported — Not available in this implementation
- Extra Feature — Enhanced capability beyond OpenAI API
Listing and Retrieval Behaviour
The prompt is echoed only in the creation response, not when retrieving or listing. A deleted video stays visible in listings until AWS expires its job record. Listing merges jobs across every configured region; a region that is temporarily unavailable is omitted rather than failing the request.
Model Support¶
Any video generation model available in your configured Amazon Bedrock regions can be used, for example:
Amazon Models¶
| Model | Model ID | Durations (seconds) |
Sizes (size) |
|---|---|---|---|
| Amazon Nova Reel 1.1 | amazon.nova-reel-v1:1 |
6, or multiples of 6 up to 120 |
1280x720 |
| Amazon Nova Reel 1.0 | amazon.nova-reel-v1:0 |
6 |
1280x720 |
Amazon Nova Reel Is Marked Legacy by AWS
AWS flags the Nova Reel models as legacy, so they are hidden by default. Set AWS_BEDROCK_LEGACY=true to expose and use them.
Luma AI Models¶
| Model | Model ID | Durations (seconds) |
Sizes (size) |
|---|---|---|---|
| Luma Ray 2 | luma.ray-v2:0 |
5 or 9 |
540p/720p in ratios 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21 (e.g. 1280x720, 720x1280, 960x540) |
When seconds or size is omitted, the model's shortest duration and default resolution are used. For Luma Ray, the requested size selects the model's resolution (smaller dimension: 540 or 720) and aspect ratio (reduced width:height).
Find compatible models: Call /search_models with route=openai_video_generation to discover model IDs that support video generation in your deployment.
Reference Images (Image-to-Video)¶
The optional input_reference image is used as the video's first frame:
multipart/form-data— upload the image file directly (this is what the OpenAI SDKs send). The SDK object form (input_reference={"image_url": ...}or{"file_id": ...}) is also accepted.application/json— pass a base64 string, data URI, HTTPS URL, S3 URI, or Files API ID.
Amazon Nova Reel requires a PNG or JPEG matching the video resolution (1280x720) and only supports reference images for 6-second videos.
How It Works¶
POST /v1/videosstarts an Amazon Bedrock asynchronous invocation in a region where the model is available and a regional S3 bucket is configured (AWS_S3_REGIONAL_BUCKETS).- Amazon Bedrock renders the video and writes the MP4 to that bucket under
AWS_S3_VIDEOS_PREFIX(videos/by default). GET /v1/videos/{video_id}reads the job state directly from Amazon Bedrock;.../contentstreams the MP4 from S3;DELETEremoves the stored objects.
S3 Bucket Requirement
Amazon Bedrock requires the output bucket to be in the same region as the invocation. Configure a bucket for each region offering video models via AWS_S3_REGIONAL_BUCKETS, otherwise video generation requests fail with a configuration error.
Retention¶
By default videos persist until deleted through the API. Set AWS_S3_VIDEOS_EXPIRES_AFTER to enforce a retention period: the Video object then reports expires_at (completion time plus the retention period) and downloading expired content returns a 404, matching the OpenAI API's automatic video expiry.
Billing¶
AWS bills video generation per second of generated video. Billed seconds appear in usage logs and cost tracking as output_seconds, recorded when the job is started. Standard S3 storage costs apply to the stored videos until they are deleted.
Ready to bring your ideas to motion? Explore available video models in the Models API.