Stream

Stream

Methods

list(, ): <>
get/accounts/{account_id}/stream

Lists up to 1000 videos from a single request. For a specific range, refer to the optional parameters.

get(, , ):
get/accounts/{account_id}/stream/{identifier}

Fetches details for a single video.

create(, ): void
post/accounts/{account_id}/stream

Initiates a video upload using the TUS protocol. On success, the server responds with a status code 201 (created) and includes a location header to indicate where the content should be uploaded. Refer to https://tus.io for protocol details.

edit(, , ):
post/accounts/{account_id}/stream/{identifier}

Edit details for a single video.

delete(, , ): void
delete/accounts/{account_id}/stream/{identifier}

Deletes a video and its copies from Cloudflare Stream.

Domain types

AllowedOrigins = string
Video{…}
Stream

Audio Tracks

Stream.AudioTracks

Methods

get(, , ): <>
get/accounts/{account_id}/stream/{identifier}/audio

Lists additional audio tracks on a video. Note this API will not return information for audio attached to the video upload.

edit(, , , ):
patch/accounts/{account_id}/stream/{identifier}/audio/{audio_identifier}

Edits additional audio tracks on a video. Editing the default status of an audio track to true will mark all other audio tracks on the video default status to false.

delete(, , , ):
delete/accounts/{account_id}/stream/{identifier}/audio/{audio_identifier}

Deletes additional audio tracks on a video. Deleting a default audio track is not allowed. You must assign another audio track as default prior to deletion.

copy(, , ):
post/accounts/{account_id}/stream/{identifier}/audio/copy

Adds an additional audio track to a video using the provided audio track URL.

Domain types

Audio{…}
Stream

Captions

Stream.Captions

Methods

get(, , ): <>
get/accounts/{account_id}/stream/{identifier}/captions

Lists the available captions or subtitles for a specific video.

Domain types

Caption{…}

Stream.Captions.Language

Methods

get(, , , ):
get/accounts/{account_id}/stream/{identifier}/captions/{language}

Lists the captions or subtitles for provided language.

create(, , , ):
post/accounts/{account_id}/stream/{identifier}/captions/{language}/generate

Generate captions or subtitles for provided language via AI.

update(, , , ):
put/accounts/{account_id}/stream/{identifier}/captions/{language}

Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.

delete(, , , ):
delete/accounts/{account_id}/stream/{identifier}/captions/{language}

Removes the captions or subtitles from a video.

Stream.Captions.Language.Vtt

Methods

get(, , , ):
get/accounts/{account_id}/stream/{identifier}/captions/{language}/vtt

Return WebVTT captions for a provided language.

Stream

Clip

Stream.ClipResource

Methods

create(, ):
post/accounts/{account_id}/stream/clip

Clips a video based on the specified start and end times provided in seconds.

Domain types

Clip{…}
Stream

Copy

Stream.Copy

Methods

create(, ):
post/accounts/{account_id}/stream/copy

Uploads a video to Stream from a provided URL.

Stream

Direct Upload

Stream.DirectUpload

Methods

create(, ):
post/accounts/{account_id}/stream/direct_upload

Creates a direct upload that allows video uploads without an API key.

Stream

Downloads

Stream.Downloads

Methods

get(, , ):
get/accounts/{account_id}/stream/{identifier}/downloads

Lists the downloads created for a video.

create(, , ):
post/accounts/{account_id}/stream/{identifier}/downloads

Creates a download for a video when a video is ready to view. Use /downloads/{download_type} instead for type-specific downloads. Available types are default and audio.

delete(, , ):
delete/accounts/{account_id}/stream/{identifier}/downloads

Delete the downloads for a video. Use /downloads/{download_type} instead for type-specific downloads. Available types are default and audio.

Stream

Embed

Stream.Embed

Methods

get(, , ):
get/accounts/{account_id}/stream/{identifier}/embed

Fetches an HTML code snippet to embed a video in a web page delivered through Cloudflare. On success, returns an HTML fragment for use on web pages to display a video. On failure, returns a JSON response body.

Stream

Keys

Stream.Keys

Methods

get(, ): <>
get/accounts/{account_id}/stream/keys

Lists the video ID and creation date and time when a signing key was created.

create(, ):
post/accounts/{account_id}/stream/keys

Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.

delete(, , ):
delete/accounts/{account_id}/stream/keys/{identifier}

Deletes signing keys and revokes all signed URLs generated with the key.

Domain types

Keys{…}
Stream

Live Inputs

Stream.LiveInputs

Methods

list(, ):
get/accounts/{account_id}/stream/live_inputs

Lists the live inputs created for an account. To get the credentials needed to stream to a specific live input, request a single live input.

get(, , ):
get/accounts/{account_id}/stream/live_inputs/{live_input_identifier}

Retrieves details of an existing live input.

create(, ):
post/accounts/{account_id}/stream/live_inputs

Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream.

update(, , ):
put/accounts/{account_id}/stream/live_inputs/{live_input_identifier}

Updates a specified live input.

delete(, , ): void
delete/accounts/{account_id}/stream/live_inputs/{live_input_identifier}

Prevents a live input from being streamed to and makes the live input inaccessible to any future API calls.

Domain types

LiveInput{…}

Details about a live input.

Stream.LiveInputs.Outputs

Methods

list(, , ): <>
get/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs

Retrieves all outputs associated with a specified live input.

create(, , ):
post/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs

Creates a new output that can be used to simulcast or restream live video to other RTMP or SRT destinations. Outputs are always linked to a specific live input — one live input can have many outputs.

update(, , , ):
put/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}

Updates the state of an output.

delete(, , , ): void
delete/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}

Deletes an output and removes it from the associated live input.

Domain types

Output{…}
Stream

Token

Stream.Token

Methods

create(, , ):
post/accounts/{account_id}/stream/{identifier}/token

Creates a signed URL token for a video. If a body is not provided in the request, a token is created with default values.

Stream

Videos

Stream.Videos

Methods

storageUsage(, ):
get/accounts/{account_id}/stream/storage-usage

Returns information about an account's storage use.

Stream

Watermarks

Stream.Watermarks

Methods

list(, ): <>
get/accounts/{account_id}/stream/watermarks

Lists all watermark profiles for an account.

get(, , ):
get/accounts/{account_id}/stream/watermarks/{identifier}

Retrieves details for a single watermark profile.

create(, ):
post/accounts/{account_id}/stream/watermarks

Creates watermark profiles using a single HTTP POST multipart/form-data request.

delete(, , ):
delete/accounts/{account_id}/stream/watermarks/{identifier}

Deletes a watermark profile.

Domain types

Watermark{…}
Stream

Webhooks

Stream.Webhooks

Methods

get(, ):
get/accounts/{account_id}/stream/webhook

Retrieves a list of webhooks.

update(, ):
put/accounts/{account_id}/stream/webhook

Creates a webhook notification.

delete(, ):
delete/accounts/{account_id}/stream/webhook

Deletes a webhook.