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

# Create a stream

`POST /stream`

The only parameter you are required to set is the name of your stream,
but we also highly recommend that you define transcoding profiles
parameter that suits your specific broadcasting configuration.
\
\
If you do not define transcoding rendition profiles when creating the
stream, a default set of profiles will be used. These profiles include
240p,  360p, 480p and 720p.
\
\
The playback policy is set to public by default for new streams. It can
also be added upon the creation of a new stream by adding
`"playbackPolicy": {"type": "jwt"}`

## Request body

- NewStreamPayload
  - `name` Name, required — unresolved $ref
  - `pull` Pull — unresolved $ref
  - `creatorId` union
    - object
      - `type` 'unverified', required
      - `value` string, required
    - string — Helper syntax to specify an unverified creator ID, fully managed by the developer.
  - `playbackPolicy` PlaybackPolicy — Whether the playback policy for a asset or stream is public or signed
    - `type` 'public' | 'jwt' | 'webhook', required
    - `webhookId` string — ID of the webhook to use for playback policy
    - `webhookContext` object — User-defined webhook context
    - `refreshInterval` number — Interval (in seconds) at which the playback policy should be refreshed (default 600 seconds)
  - `profiles` Profiles — unresolved $ref
  - `record` Record — unresolved $ref
  - `multistream` Multistream — unresolved $ref
  - `userTags` UserTags — unresolved $ref

## Response `201`

Success

- Stream
  - `id` string
  - `name` string, required
  - `kind` string
  - `creatorId` CreatorId
    - `type` 'unverified', required
    - `value` string, required — Developer-managed ID of the user who created the resource.
  - `userTags` object — User input tags associated with the stream
  - `lastSeen` number
  - `sourceSegments` number
  - `transcodedSegments` number
  - `sourceSegmentsDuration` number — Duration of all the source segments, sec
  - `transcodedSegmentsDuration` number — Duration of all the transcoded segments, sec
  - `sourceBytes` number
  - `transcodedBytes` number
  - `ingestRate` number — Rate at which sourceBytes increases (bytes/second)
  - `outgoingRate` number — Rate at which transcodedBytes increases (bytes/second)
  - `isActive` boolean — If currently active
  - `isHealthy` IsHealthy — unresolved $ref
  - `issues` HumanIssues — unresolved $ref
  - `createdByTokenName` string — Name of the token used to create this object
  - `createdAt` number — Timestamp (in milliseconds) at which stream object was created
  - `parentId` string — Points to parent stream object
  - `streamKey` string — Used to form RTMP ingest URL
  - `pull` object — Configuration for a stream that should be actively pulled from an external source, rather than pushed to Livepeer. If specified, the stream will not have a streamKey.
    - `source` string, required — URL from which to pull from.
    - `headers` object — Headers to be sent with the request to the pull source.
    - `location` object — Approximate location of the pull source. The location is used to determine the closest Livepeer region to pull the stream from.
      - `lat` number, required — Latitude of the pull source in degrees. North is positive, south is negative.
      - `lon` number, required — Longitude of the pull source in degrees. East is positive, west is negative.
  - `playbackId` string — The playback ID to use with the Playback Info endpoint to retrieve playback URLs.
  - `playbackPolicy` PlaybackPolicy — Whether the playback policy for a asset or stream is public or signed
    - `type` 'public' | 'jwt' | 'webhook', required
    - `webhookId` string — ID of the webhook to use for playback policy
    - `webhookContext` object — User-defined webhook context
    - `refreshInterval` number — Interval (in seconds) at which the playback policy should be refreshed (default 600 seconds)
  - `profiles` FfmpegProfile[]
    - `width` integer, required
    - `name` string, required
    - `height` integer, required
    - `bitrate` integer, required
    - `fps` integer, required
    - `fpsDen` integer
    - `quality` integer — Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it.
    - `gop` string
    - `profile` 'H264Baseline' | 'H264Main' | 'H264High' | 'H264ConstrainedHigh'
    - `encoder` 'H.264'
  - `record` boolean — Should this stream be recorded? Uses default settings. For more customization, create and configure an object store.
  - `multistream` object
    - `targets` Target[] — References to targets where this stream will be simultaneously streamed to
      - `profile` string, required — Name of transcoding profile that should be sent. Use "source" for pushing source stream data
      - `videoOnly` boolean — If true, the stream audio will be muted and only silent video will be pushed to the target.
      - `id` string — ID of multistream target object where to push this stream
      - `spec` object — Inline multistream target object. Will automatically create the target resource to be used by the created stream.
        - `name` string
        - `url` Url, required — unresolved $ref
  - `suspended` boolean — If currently suspended
  - `lastTerminatedAt` number, nullable — Timestamp (in milliseconds) when the stream was last terminated
  - `userId` string
  - `renditions` object

## Other responses

- `default` — Error

## Changes

- **2024-04-23** `d0909f9b9414` — 2 breaking, 7 info
  - removed `#/components/schemas/creator-id` from the `creatorId` request property `oneOf` list
  - the `creatorId` response's property type/format changed from `object`/`` to ``/`` for status `201`
  - api operation id `createStream` was added
  - api tag `stream` added
  - …5 more
- **2024-03-29** `b9e5350658ff` — 3 breaking, 3 info
  - removed the enum value `HEVC` of the request property `profiles/items/encoder`
  - removed the enum value `VP8` of the request property `profiles/items/encoder`
  - removed the enum value `VP9` of the request property `profiles/items/encoder`
  - removed the `HEVC` enum value from the `profiles/items/encoder` response property for the response status `201`
  - …2 more
- **2024-03-09** `0e04362e1932` — 1 breaking, 1 info
  - removed the success response with the status `200`
  - added the success response with the status `201`
- **2024-03-07** `19782674dd1a` — 1 breaking, 27 info
  - the response's body type/format changed from `array`/`` to `object`/`` for status `200`
  - added the optional property `createdAt` to the response with the `200` status
  - added the optional property `createdByTokenName` to the response with the `200` status
  - added the optional property `creatorId` to the response with the `200` status
  - …24 more
- **2024-02-21** `e4eac2ca26e9` — 1 warning
  - removed the optional property `items/isPullStream` from the response with the `200` status

[Full history](https://skmtc.dev/livepeer/apis/livepeer-api-reference/changes/stream/post.md)

---

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