---
title: "Create a stream"
method: POST
path: "/streams"
tags: ["streams"]
---

# Create a stream

`POST /streams`

## Headers

- `Idempotency-Key` string

## Request body

- CreateStreamRequest — CreateStreamInput is used for create Stream object. Input was generated by ent.
  - `agentModeEnabled` boolean, nullable — Feature flag: run stream in agent mode (/agent) with replica-based orchestration.
  - `audioUploadObjectID` string, nullable
  - `destinationID` string, nullable
  - `framerate` 'f_24' | 'f_25' | 'f_30' | 'f_60', nullable
  - `name` string, nullable
  - `playlistIDs` string[]
  - `preparedPlaylistIDs` string[]
  - `quality` 'q_720p' | 'q_1080p' | 'q_1440p' | 'q_2160p', nullable
  - `runBackupStream` boolean, nullable — Stream preference: enable backup destination streaming in agent mode.
  - `scheduleEndAt` string, date-time, nullable
  - `scheduleStartAt` string, date-time, nullable
  - `storageBackend` 'standard' | 'large', nullable — Storage tier for this stream's media. 'standard' suits typical playlists and is included. 'large' is for big playlists: storage is provisioned to fit your content and grows as you add to it, billed per GiB-month. Takes effect at the next stream start.
  - `streamBackend` 'ffmpeg' | 'manifest', nullable — RTMP publisher backend. Editing is restricted.
  - `streamDestination` 'youtube', nullable
  - `streamDuration` integer, nullable — Stream duration in seconds. 0 = never expires. Copied from user default on creation.
  - `streamKey` string, nullable — DEPRECATED: use destination_id. Kept for backward-compat during destination migration.
  - `streamStateID` string, nullable
  - `videoUploadObjectID` string, nullable
  - `youtubeSettingsID` string, nullable

## Response `201`

Created.

- Stream
  - `createdAt` string, date-time, required
  - `framerate` 'f_24' | 'f_25' | 'f_30' | 'f_60', nullable
  - `id` string, required
  - `name` string, nullable
  - `quality` 'q_720p' | 'q_1080p' | 'q_1440p' | 'q_2160p', nullable
  - `state` 'draft' | 'invalid' | 'scheduled' | 'preparing' | 'activating' | 'active' | 'failing' | 'failed' | 'stopping' | 'stopped', nullable

## Other responses

- `401` — Missing or invalid access token.
- `403` — The token lacks the required scope or access to the resource.
- `404` — The resource does not exist or is not visible to the caller.
- `422` — The request body or parameters are invalid.
- `429` — Rate limit exceeded. Retry after the indicated delay.
- `502` — The upstream data service returned an error.

---

[API](https://skmtc.dev/streamloop/apis/streamloop-api.md) · [All operations](https://skmtc.dev/streamloop/apis/streamloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/streamloop/streamloop-api/revisions/7f30ccbac1b1/schema)
