Skip to content
Start here

Live Inputs

List live inputs
stream.live_inputs.list(LiveInputListParams**kwargs) -> LiveInputListResponse
GET/accounts/{account_id}/stream/live_inputs
Retrieve a live input
stream.live_inputs.get(strlive_input_identifier, LiveInputGetParams**kwargs) -> LiveInput
GET/accounts/{account_id}/stream/live_inputs/{live_input_identifier}
Create a live input
stream.live_inputs.create(LiveInputCreateParams**kwargs) -> LiveInput
POST/accounts/{account_id}/stream/live_inputs
Update a live input
stream.live_inputs.update(strlive_input_identifier, LiveInputUpdateParams**kwargs) -> LiveInput
PUT/accounts/{account_id}/stream/live_inputs/{live_input_identifier}
Delete a live input
stream.live_inputs.delete(strlive_input_identifier, LiveInputDeleteParams**kwargs)
DELETE/accounts/{account_id}/stream/live_inputs/{live_input_identifier}
ModelsExpand Collapse
class LiveInput:

Details about a live input.

created: Optional[datetime]

The date and time the live input was created.

formatdate-time
delete_recording_after_days: Optional[float]

Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a null value to remove an existing scheduled deletion.

minimum30
enabled: Optional[bool]

Indicates whether the live input is enabled and can accept streams.

meta: Optional[object]

A user modifiable key-value store used to reference other systems of record for managing live inputs.

modified: Optional[datetime]

The date and time the live input was last modified.

formatdate-time
recording: Optional[Recording]

Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied.

allowed_origins: Optional[List[str]]

Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use * for wildcard subdomains. An empty array allows videos to be viewed on any origin.

hide_live_viewer_count: Optional[bool]

Disables reporting the number of live viewers when this property is set to true.

mode: Optional[Literal["off", "automatic"]]

Specifies the recording behavior for the live input. Set this value to off to prevent a recording. Set the value to automatic to begin a recording and transition to on-demand after Stream Live stops receiving input.

One of the following:
"off"
"automatic"
require_signed_urls: Optional[bool]

Indicates if a video using the live input has the requireSignedURLs property set. Also enforces access controls on any video recording of the livestream with the live input.

timeout_seconds: Optional[int]

Determines the amount of time a live input configured in automatic mode should wait before a recording transitions from live to on-demand. 0 is recommended for most use cases and indicates the platform default should be used.

rtmps: Optional[Rtmps]

Details for streaming to an live input using RTMPS.

stream_key: Optional[str]

The secret key to use when streaming via RTMPS to a live input.

url: Optional[str]

The RTMPS URL you provide to the broadcaster, which they stream live video to.

rtmps_playback: Optional[RtmpsPlayback]

Details for playback from an live input using RTMPS.

stream_key: Optional[str]

The secret key to use for playback via RTMPS.

url: Optional[str]

The URL used to play live video over RTMPS.

srt: Optional[Srt]

Details for streaming to a live input using SRT.

passphrase: Optional[str]

The secret key to use when streaming via SRT to a live input.

stream_id: Optional[str]

The identifier of the live input to use when streaming via SRT.

url: Optional[str]

The SRT URL you provide to the broadcaster, which they stream live video to.

srt_playback: Optional[SrtPlayback]

Details for playback from an live input using SRT.

passphrase: Optional[str]

The secret key to use for playback via SRT.

stream_id: Optional[str]

The identifier of the live input to use for playback via SRT.

url: Optional[str]

The URL used to play live video over SRT.

status: Optional[Literal["connected", "reconnected", "reconnecting", 5 more]]

The connection status of a live input.

One of the following:
"connected"
"reconnected"
"reconnecting"
"client_disconnect"
"ttl_exceeded"
"failed_to_connect"
"failed_to_reconnect"
"new_configuration_accepted"
uid: Optional[str]

A unique identifier for a live input.

maxLength32
web_rtc: Optional[WebRtc]

Details for streaming to a live input using WebRTC.

url: Optional[str]

The WebRTC URL you provide to the broadcaster, which they stream live video to.

web_rtc_playback: Optional[WebRtcPlayback]

Details for playback from a live input using WebRTC.

url: Optional[str]

The URL used to play live video over WebRTC.

class LiveInputListResponse:
live_inputs: Optional[List[LiveInput]]
created: Optional[datetime]

The date and time the live input was created.

formatdate-time
delete_recording_after_days: Optional[float]

Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a null value to remove an existing scheduled deletion.

minimum30
enabled: Optional[bool]

Indicates whether the live input is enabled and can accept streams.

meta: Optional[object]

A user modifiable key-value store used to reference other systems of record for managing live inputs.

modified: Optional[datetime]

The date and time the live input was last modified.

formatdate-time
uid: Optional[str]

A unique identifier for a live input.

maxLength32
range: Optional[int]

The total number of remaining live inputs based on cursor position.

total: Optional[int]

The total number of live inputs that match the provided filters.

Live InputsOutputs

List all outputs associated with a specified live input
stream.live_inputs.outputs.list(strlive_input_identifier, OutputListParams**kwargs) -> SyncSinglePage[Output]
GET/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs
Create a new output, connected to a live input
stream.live_inputs.outputs.create(strlive_input_identifier, OutputCreateParams**kwargs) -> Output
POST/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs
Update an output
stream.live_inputs.outputs.update(stroutput_identifier, OutputUpdateParams**kwargs) -> Output
PUT/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}
Delete an output
stream.live_inputs.outputs.delete(stroutput_identifier, OutputDeleteParams**kwargs)
DELETE/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}
ModelsExpand Collapse
class Output:
enabled: Optional[bool]

When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch.

stream_key: Optional[str]

The streamKey used to authenticate against an output's target.

uid: Optional[str]

A unique identifier for the output.

maxLength32
url: Optional[str]

The URL an output uses to restream.