Skip to main content
POST
/
streams
Create a stream.
curl --request POST \
  --url https://api.streamloop.app/v1/streams \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentModeEnabled": true,
  "audioUploadObjectID": "<string>",
  "destinationID": "<string>",
  "name": "<string>",
  "playlistIDs": [
    "<string>"
  ],
  "preparedPlaylistIDs": [
    "<string>"
  ],
  "runBackupStream": true,
  "scheduleEndAt": "2023-11-07T05:31:56Z",
  "scheduleStartAt": "2023-11-07T05:31:56Z",
  "streamDuration": 123,
  "streamKey": "<string>",
  "streamStateID": "<string>",
  "videoUploadObjectID": "<string>",
  "youtubeSettingsID": "<string>"
}
'
{
  "createdAt": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "name": "<string>"
}

Authorizations

Authorization
string
header
required

OAuth 2.1 authorization-code flow with PKCE.

Headers

Idempotency-Key
string

Optional client-generated key. A repeated request with the same key replays the original response (within 24h) instead of re-executing — safe retries.

Body

application/json

CreateStreamInput is used for create Stream object. Input was generated by ent.

agentModeEnabled
boolean | null

Feature flag: run stream in agent mode (/agent) with replica-based orchestration.

audioUploadObjectID
string | null
destinationID
string | null
framerate
enum<string> | null
Available options:
f_24,
f_25,
f_30,
f_60
name
string | null
playlistIDs
string[]
preparedPlaylistIDs
string[]
quality
enum<string> | null
Available options:
q_720p,
q_1080p,
q_1440p,
q_2160p
runBackupStream
boolean | null

Stream preference: enable backup destination streaming in agent mode.

scheduleEndAt
string<date-time> | null
scheduleStartAt
string<date-time> | null
streamBackend
enum<string> | null

RTMP publisher backend. 'manifest' runs manifest-streamer in-process; 'ffmpeg' or empty uses the legacy subprocess. Editing is gated by the native_backend_streamer PostHog feature flag in the update resolver — the column is nullable so admin tooling can clear it.

Available options:
ffmpeg,
manifest
streamDestination
enum<string> | null
Available options:
youtube
streamDuration
integer | null

Stream duration in seconds. 0 = never expires. Copied from user default on creation.

streamKey
string | null

DEPRECATED: use destination_id. Kept for backward-compat during destination migration.

streamStateID
string | null
videoUploadObjectID
string | null
youtubeSettingsID
string | null

Response

Created.

createdAt
string<date-time>
required
id
string
required
framerate
enum<string> | null
Available options:
f_24,
f_25,
f_30,
f_60
name
string | null
quality
enum<string> | null
Available options:
q_720p,
q_1080p,
q_1440p,
q_2160p
state
enum<string> | null
Available options:
draft,
invalid,
scheduled,
preparing,
activating,
active,
failing,
failed,
stopping,
stopped