For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusSupportDiscussionsLog inSign Up
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
  • ACTIVATE ACCOUNT
    • Create account
  • PRODUCT OS API
    • Overview
  • ERROR CODES
    • Error codes
  • VIDEO ON DEMAND API
    • Overview
  • LIVE STREAM API
    • Overview
      • POSTCreate a new stream
  • VIDEO DATA API
    • Overview
LogoLogo
StatusSupportDiscussionsLog inSign Up
LIVE STREAM APIStart live stream

Create a new stream

POST
https://api.fastpix.com/v1/live/streams
POST
/v1/live/streams
$curl -X POST https://api.fastpix.com/v1/live/streams \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{
> "playbackSettings": {},
> "inputMediaSettings": {}
>}'
201Created
1{
2 "success": true,
3 "data": {
4 "streamId": "fa7f8c0950ea48ebcc5ef9de8c23deaa",
5 "streamKey": "3dc5d7641f918baa083a5c52a5bd9cbckfa7f8c0950ea48ebcc5ef9de8c23deaa",
6 "srtSecret": "c51739512d0088d98a46925c9b74c73akfa7f8c0950ea48ebcc5ef9de8c23deaa",
7 "trial": false,
8 "status": "idle",
9 "maxResolution": "1080p",
10 "maxDuration": 28800,
11 "createdAt": "2024-10-15T08:48:31.551351Z",
12 "reconnectWindow": 60,
13 "enableRecording": true,
14 "enableDvrMode": true,
15 "mediaPolicy": "public",
16 "metadata": {
17 "livestream_name": "fastpix_livestream"
18 },
19 "lowLatency": true,
20 "closedCaptions": false,
21 "playbackIds": [
22 {
23 "id": "4e43ec52-4775-4f68-a3ff-a57d8a59bba8",
24 "accessPolicy": "public"
25 }
26 ],
27 "srtPlaybackResponse": {
28 "srtPlaybackStreamId": "playfa7f8c0950ea48ebcc5ef9de8c23deaa",
29 "srtPlaybackSecret": "490e707dd4d165c9e38d261b252f9457kfa7f8c0950ea48ebcc5ef9de8c23deaa"
30 }
31 }
32}
Creates a new <a href="https://docs.fastpix.io/docs/get-started-with-live-streaming">RTMPS</a> or <a href="https://docs.fastpix.io/docs/using-srt-to-live-stream">SRT</a> live stream in FastPix. When you create a stream, FastPix generates a unique `streamKey` and `srtSecret` that you can use with broadcasting software such as OBS to connect to FastPix RTMPS or SRT servers. Use SRT for live streaming in unstable network conditions, as it provides error correction and encryption for a more reliable and secure broadcast. Leverage SRT for live streaming in environments with unstable networks, taking advantage of its error correction and encryption features for a resilient and secure broadcast. <h4>How it works</h4> 1. Send a `POST` request to this endpoint. You can configure the stream settings, including `metadata` (such as stream name and description), `reconnectWindow` (in case of disconnection), and privacy options (`public` or `private`). 2. FastPix returns the stream details for both RTMPS and SRT configurations. These keys and IDs from the stream details are essential for connecting the broadcasting software to FastPix’s servers and transmitting the live stream to viewers. 3. After the live stream is created, FastPix sends a `POST` request to your specified webhook endpoint with the event <a href="https://docs.fastpix.io/docs/live-events#videolive_streamcreated">video.live_stream.created</a>. **Example:** Imagine a gaming platform that allows users to live stream gameplay directly from their dashboard. The API creates a new stream, provides the necessary stream key, and sets it to "private" so that only specific viewers can access it. Related guide: <a href="https://docs.fastpix.io/docs/how-to-livestream">How to live stream</a>
Was this page helpful?
Previous

Get all live streams

Next
Built with

Creates a new RTMPS or SRT live stream in FastPix. When you create a stream, FastPix generates a unique streamKey and srtSecret that you can use with broadcasting software such as OBS to connect to FastPix RTMPS or SRT servers. Use SRT for live streaming in unstable network conditions, as it provides error correction and encryption for a more reliable and secure broadcast.

Leverage SRT for live streaming in environments with unstable networks, taking advantage of its error correction and encryption features for a resilient and secure broadcast.

How it works

  1. Send a POST request to this endpoint. You can configure the stream settings, including metadata (such as stream name and description), reconnectWindow (in case of disconnection), and privacy options (public or private).

  2. FastPix returns the stream details for both RTMPS and SRT configurations. These keys and IDs from the stream details are essential for connecting the broadcasting software to FastPix’s servers and transmitting the live stream to viewers.

  3. After the live stream is created, FastPix sends a POST request to your specified webhook endpoint with the event video.live_stream.created.

Example:

Imagine a gaming platform that allows users to live stream gameplay directly from their dashboard. The API creates a new stream, provides the necessary stream key, and sets it to “private” so that only specific viewers can access it.

Related guide: How to live stream

Authentication

AuthorizationBasic

FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request.

  • Username: Access Token ID
  • Password: Secret Key

Activate your FastPix account to generate your API credentials. See the guide here

Request

This endpoint expects an object.
playbackSettingsobjectRequired
Displays the result of the playback settings.
inputMediaSettingsobjectRequired
Contains configuration details for input media settings.

Response

Stream created successfully
successboolean
Shows the request status. Returns true for success and false for failure.
dataobject
Displays the result of the request.