{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/stream_identifier-2"}},"required":["account_id"],"additionalProperties":false},"headers":{"type":"object","properties":{"Idempotency-Key":{"type":"string","maxLength":255,"description":"Prevents duplicate live inputs from being created when retrying this request. The key is scoped to the account, may contain up to 255 bytes, and expires six hours after the live input is created. Reusing a key for a deleted input before expiry returns a 409 Conflict response."}},"required":[],"additionalProperties":false},"body":{"$ref":"#/definitions/stream_create_input_request"}},"required":["path","body"],"additionalProperties":false,"definitions":{"stream_identifier-2":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"stream_create_input_request":{"properties":{"defaultCreator":{"$ref":"#/definitions/stream_live_input_default_creator"},"deleteRecordingAfterDays":{"$ref":"#/definitions/stream_live_input_recording_deletion"},"enabled":{"$ref":"#/definitions/stream_live_input_enabled"},"meta":{"$ref":"#/definitions/stream_live_input_metadata"},"preferLowLatency":{"$ref":"#/definitions/stream_live_input_prefer_low_latency"},"recording":{"$ref":"#/definitions/stream_live_input_recording_settings"}}},"stream_live_input_default_creator":{"description":"Sets the creator ID asssociated with this live input.","type":"string"},"stream_live_input_recording_deletion":{"description":"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.","type":"number","minimum":30,"examples":[45]},"stream_live_input_enabled":{"description":"Indicates whether the live input is enabled and can accept streams.","type":"boolean","default":true,"examples":[true]},"stream_live_input_metadata":{"description":"A user modifiable key-value store used to reference other systems of record for managing live inputs.","type":"object","examples":[{"name":"test stream 1"}]},"stream_live_input_prefer_low_latency":{"description":"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.","type":"boolean","default":false,"examples":[true]},"stream_live_input_recording_settings":{"description":"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.","type":"object","properties":{"allowedOrigins":{"$ref":"#/definitions/stream_live_input_recording_allowedOrigins"},"hideLiveViewerCount":{"$ref":"#/definitions/stream_live_input_recording_hideLiveViewerCount"},"mode":{"$ref":"#/definitions/stream_live_input_recording_mode"},"requireSignedURLs":{"$ref":"#/definitions/stream_live_input_recording_requireSignedURLs"},"timeoutSeconds":{"$ref":"#/definitions/stream_live_input_recording_timeoutSeconds"}},"examples":[{"hideLiveViewerCount":false,"mode":"off","requireSignedURLs":false,"timeoutSeconds":0}]},"stream_live_input_recording_allowedOrigins":{"description":"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.","type":"array","items":{"type":"string"},"examples":[["example.com"]]},"stream_live_input_recording_hideLiveViewerCount":{"description":"Disables reporting the number of live viewers when this property is set to `true`.","type":"boolean","default":false,"examples":[true]},"stream_live_input_recording_mode":{"description":"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.","type":"string","default":"off","enum":["off","automatic"],"examples":["automatic"]},"stream_live_input_recording_requireSignedURLs":{"description":"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.","type":"boolean","default":false,"examples":[true]},"stream_live_input_recording_timeoutSeconds":{"description":"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.","type":"integer","default":0}}},"name":"Create a live input","id":"cloudflare.stream-live-inputs-create-a-live-input","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":{}},"maxRequests":1,"summary":false}}