---
title: Retrieve a live input
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Stream](https://developers.cloudflare.com/api/python/resources/stream)

[Live Inputs](https://developers.cloudflare.com/api/python/resources/stream/subresources/live_inputs)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Retrieve a live input

stream.live\_inputs.get(strlive\_input\_identifier, LiveInputGetParams\*\*kwargs) -> [LiveInput](<https://developers.cloudflare.com/api/python/resources/stream#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)>)

GET/accounts/{account\_id}/stream/live\_inputs/{live\_input\_identifier}

Retrieves details of an existing live input.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Stream Write``Stream Read`

##### ParametersExpand Collapse

account\_id: str

Identifier.

maxLength32

[Link to this property](<#(resource)%20stream.live_inputs%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

live\_input\_identifier: str

A unique identifier for a live input.

maxLength32

[Link to this property](<#(resource)%20stream.live_inputs%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20live_input_identifier%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class LiveInput: …

Details about a live input.

</summary>

created: Optional\[datetime]

The date and time the live input was created.

formatdate-time

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

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 <code>null</code> value to remove an existing scheduled deletion.

minimum30

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20deleteRecordingAfterDays">Link to this property</a>

enabled: Optional\[bool]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

keys\_rotated\_at: Optional\[datetime]

The date and time the live input keys were last rotated. Omitted for live inputs that have never had their keys rotated.

formatdate-time

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20keysRotatedAt">Link to this property</a>

meta: Optional\[object]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20meta">Link to this property</a>

modified: Optional\[datetime]

The date and time the live input was last modified.

formatdate-time

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

<details>

<summary>

playback: Optional\[Playback]

Details for playing a live input’s broadcast using the HLS or DASH manifests. URLs reference the live input ID.

</summary>

dash: str

The DASH manifest URL used to play live video, referencing the live input ID.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20playback%20%3E%20(property)%20dash">Link to this property</a>

hls: str

The HLS manifest URL used to play live video, referencing the live input ID.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20playback%20%3E%20(property)%20hls">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20playback">Link to this property</a>

prefer\_low\_latency: Optional\[bool]

When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20preferLowLatency">Link to this property</a>

<details>

<summary>

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.

</summary>

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 <code>*</code> for wildcard subdomains. An empty array allows videos to be viewed on any origin.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording%20%3E%20(property)%20allowedOrigins">Link to this property</a>

hide\_live\_viewer\_count: Optional\[bool]

Disables reporting the number of live viewers when this property is set to <code>true</code>.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording%20%3E%20(property)%20hideLiveViewerCount">Link to this property</a>

<details>

<summary>

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

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

</summary>

One of the following:

"off"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording%20%3E%20(property)%20mode%20%3E%20(member)%200">Link to this property</a>

"automatic"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording%20%3E%20(property)%20mode%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording%20%3E%20(property)%20mode">Link to this property</a>

require\_signed\_urls: Optional\[bool]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording%20%3E%20(property)%20requireSignedURLs">Link to this property</a>

timeout\_seconds: Optional\[int]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording%20%3E%20(property)%20timeoutSeconds">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20recording">Link to this property</a>

<details>

<summary>

rtmps: Optional\[Rtmps]

Details for streaming to an live input using RTMPS.

</summary>

stream\_key: Optional\[str]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20rtmps%20%3E%20(property)%20streamKey">Link to this property</a>

url: Optional\[str]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20rtmps%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20rtmps">Link to this property</a>

<details>

<summary>

rtmps\_playback: Optional\[RtmpsPlayback]

Details for playback from an live input using RTMPS.

</summary>

stream\_key: Optional\[str]

The secret key to use for playback via RTMPS.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20rtmpsPlayback%20%3E%20(property)%20streamKey">Link to this property</a>

url: Optional\[str]

The URL used to play live video over RTMPS.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20rtmpsPlayback%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20rtmpsPlayback">Link to this property</a>

<details>

<summary>

srt: Optional\[Srt]

Details for streaming to a live input using SRT.

</summary>

passphrase: Optional\[str]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srt%20%3E%20(property)%20passphrase">Link to this property</a>

stream\_id: Optional\[str]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srt%20%3E%20(property)%20streamId">Link to this property</a>

url: Optional\[str]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srt%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srt">Link to this property</a>

<details>

<summary>

srt\_playback: Optional\[SrtPlayback]

Details for playback from an live input using SRT.

</summary>

passphrase: Optional\[str]

The secret key to use for playback via SRT.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srtPlayback%20%3E%20(property)%20passphrase">Link to this property</a>

stream\_id: Optional\[str]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srtPlayback%20%3E%20(property)%20streamId">Link to this property</a>

url: Optional\[str]

The URL used to play live video over SRT.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srtPlayback%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20srtPlayback">Link to this property</a>

<details>

<summary>

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

The connection status of a live input.

</summary>

One of the following:

"connected"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"reconnected"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"reconnecting"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

"client\_disconnect"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

"ttl\_exceeded"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%205">Link to this property</a>

"failed\_to\_connect"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%206">Link to this property</a>

"failed\_to\_reconnect"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%207">Link to this property</a>

"new\_configuration\_accepted"

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%208">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

uid: Optional\[str]

A unique identifier for a live input.

maxLength32

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20uid">Link to this property</a>

<details>

<summary>

web\_rtc: Optional\[WebRtc]

Details for streaming to a live input using WebRTC.

</summary>

url: Optional\[str]

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

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20webRTC%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20webRTC">Link to this property</a>

<details>

<summary>

web\_rtc\_playback: Optional\[WebRtcPlayback]

Details for playback from a live input using WebRTC.

</summary>

url: Optional\[str]

The URL used to play live video over WebRTC.

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20webRTCPlayback%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)%20%3E%20(property)%20webRTCPlayback">Link to this property</a>

</details>

[Link to this property](<#(resource)%20stream.live_inputs%20%3E%20(model)%20live_input%20%3E%20(schema)>)

### Retrieve a live input

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
live_input = client.stream.live_inputs.get(
    live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(live_input.uid)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "created": "2014-01-02T02:20:00Z",
    "deleteRecordingAfterDays": 45,
    "enabled": true,
    "keysRotatedAt": "2014-01-02T02:20:00Z",
    "meta": {
      "name": "test stream 1"
    },
    "modified": "2014-01-02T02:20:00Z",
    "playback": {
      "dash": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/66be4bf738797e01e1fca35a7bdecdcd/manifest/video.mpd",
      "hls": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/66be4bf738797e01e1fca35a7bdecdcd/manifest/video.m3u8"
    },
    "preferLowLatency": true,
    "recording": {
      "allowedOrigins": [
        "example.com"
      ],
      "hideLiveViewerCount": false,
      "mode": "off",
      "requireSignedURLs": false,
      "timeoutSeconds": 0
    },
    "rtmps": {
      "streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "url": "rtmps://live.cloudflare.com:443/live/"
    },
    "rtmpsPlayback": {
      "streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "url": "rtmps://live.cloudflare.com:443/live/"
    },
    "srt": {
      "passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "streamId": "f256e6ea9341d51eea64c9454659e576",
      "url": "srt://live.cloudflare.com:778"
    },
    "srtPlayback": {
      "passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "streamId": "f256e6ea9341d51eea64c9454659e576",
      "url": "rtmps://live.cloudflare.com:443/live/"
    },
    "status": "connected",
    "uid": "66be4bf738797e01e1fca35a7bdecdcd",
    "webRTC": {
      "url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/publish"
    },
    "webRTCPlayback": {
      "url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/play"
    }
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "created": "2014-01-02T02:20:00Z",
    "deleteRecordingAfterDays": 45,
    "enabled": true,
    "keysRotatedAt": "2014-01-02T02:20:00Z",
    "meta": {
      "name": "test stream 1"
    },
    "modified": "2014-01-02T02:20:00Z",
    "playback": {
      "dash": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/66be4bf738797e01e1fca35a7bdecdcd/manifest/video.mpd",
      "hls": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/66be4bf738797e01e1fca35a7bdecdcd/manifest/video.m3u8"
    },
    "preferLowLatency": true,
    "recording": {
      "allowedOrigins": [
        "example.com"
      ],
      "hideLiveViewerCount": false,
      "mode": "off",
      "requireSignedURLs": false,
      "timeoutSeconds": 0
    },
    "rtmps": {
      "streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "url": "rtmps://live.cloudflare.com:443/live/"
    },
    "rtmpsPlayback": {
      "streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "url": "rtmps://live.cloudflare.com:443/live/"
    },
    "srt": {
      "passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "streamId": "f256e6ea9341d51eea64c9454659e576",
      "url": "srt://live.cloudflare.com:778"
    },
    "srtPlayback": {
      "passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
      "streamId": "f256e6ea9341d51eea64c9454659e576",
      "url": "rtmps://live.cloudflare.com:443/live/"
    },
    "status": "connected",
    "uid": "66be4bf738797e01e1fca35a7bdecdcd",
    "webRTC": {
      "url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/publish"
    },
    "webRTCPlayback": {
      "url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/play"
    }
  }
}
```