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.

Servers

Path parameters

Name Type Required Description
account_id String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
defaultCreator String No

Sets the creator ID asssociated with this live input.

deleteRecordingAfterDays Number No

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.

meta Object No

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

recording Object No

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.

recording.timeoutSeconds Integer No

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.

Default value: 0

recording.hideLiveViewerCount Boolean No

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

Default value: false

recording.allowedOrigins[] Array No

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.

recording.mode String No

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.

Possible values:

  • "off"
  • "automatic"

Default value: "off"

recording.requireSignedURLs Boolean No

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.

Default value: false

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.