Skip to main content
Cloudflare Stream is a video streaming platform that handles encoding, storage, and delivery. The Stream API allows you to upload and manage videos programmatically.

Upload a video

Initiates a video upload using the TUS protocol.
string
required
The account identifier
string
required
TUS protocol version (set to “1.0.0”)
number
required
The size of the upload in bytes
string
Base64-encoded metadata about the upload
string
A user-defined identifier for the media creator
string
The user ID for direct upload

List videos

Lists up to 1000 videos from a single request.
string
required
The account identifier
string
Filter by creator ID
Search videos by name
string
Start of the range (RFC 3339 timestamp)
string
End of the range (RFC 3339 timestamp)
boolean
Include total count of videos
string
The unique video identifier
array
List of origins allowed to display the video
string
The date and time the video was created
number
The duration of the video in seconds (-1 if unknown)
object
User modifiable key-value store for managing videos
boolean
Indicates whether the video is playable
object
Video processing status
string
URL of the video thumbnail
string
The video’s preview page URI

Get a video

Fetches details for a single video.
string
required
The video identifier
string
required
The account identifier

Edit a video

Edit details for a single video.
string
required
The video identifier
string
required
The account identifier
object
User modifiable key-value metadata
array
List of allowed origin domains. Use ["*"] for wildcard.
boolean
Whether the video requires signed URLs for viewing
number
The timestamp percentage for the video thumbnail (0.0 to 1.0)

Delete a video

Deletes a video and its copies from Cloudflare Stream.
string
required
The video identifier
string
required
The account identifier

Direct uploads

Create a unique one-time upload URL for direct user uploads.
string
required
The account identifier
number
Maximum video duration in seconds
boolean
Whether uploaded videos require signed URLs
array
Origins allowed to display the uploaded videos
object
Metadata to associate with the uploaded video
string
Expiration time for the upload URL (RFC 3339)

Live inputs

Manage live streaming inputs.

Watermarks

Manage video watermarks.

Captions and subtitles

Manage video captions.

Audio tracks

Manage multiple audio tracks for videos.

Webhooks

Manage webhooks for Stream events.

Signing keys

Manage signing keys for signed URLs.

Downloads

Manage video downloads.

Get storage usage

Get information about video storage usage.