> For the complete documentation index, see [llms.txt](https://docs.videograph.ai/llms.txt).
> Use it to discover all available pages before exploring further.

# Creating, Streaming & Recording Live Sessions

End‑to‑end workflow for creating a live stream, broadcasting via RTMP, watching HLS playback, and recording the session for later VOD retrieval.


## Overview

This guide shows how to create a live stream using the Videograph API, broadcast using an RTMP encoder, view the HLS output, and optionally record the session. When recording is enabled, the stream is captured and remains available for about 12 hours from the start time before it is processed into a VOD‑like asset accessible through the standard contents API.

If you are new to live streaming on Videograph, see [Live Streaming Overview](/live-stream-basics). For essential playback concepts, see [Content Model & Playback Basics](/core-video-pipeline).

## Prerequisites

- API access key and secret (see [Authentication & Access Control](/authentication)).
- An RTMP‑compatible encoder such as OBS Studio.
- An HLS‑compatible playback integration (see [Playing Videos (Web & App Integration)](/web-sdk-player)).

<Callout kind="info">

Recording must be enabled when creating the live stream. Recorded sessions are retained for about 12 hours from the start of the broadcast before they are processed into a retrievable asset.

</Callout>

## End‑to‑end workflow

<Steps>

  <Step title="Create a live stream" icon="cast">

  
Use the `POST /video/services/api/v1/livestreams` endpoint to create a live stream. Set the `record` boolean to control whether the session should be captured for later retrieval.

<CodeGroup tabs="cURL">

```bash
curl --request POST \
     --url https://api.videograph.ai/video/services/api/v1/livestreams \
     -u "ACCESS_KEY:SECRET_KEY" \
     --header "content-type: application/json" \
     --data '{
       "title": "Live stream",
       "region": "us-east-1",
       "record": true
     }'
```

</CodeGroup>

Setting `"record": false` creates a non‑recorded live stream.

The dashboard shows separate views for streams created with recording enabled and disabled.

<Image src="https://blob-cdn.documentation.ai/org-b713c195-07b6-46aa-b0f6-7e28b1a72b11/doc-dbecd5b1-e16f-4af5-9dff-ae113c6cd9de/1765361261485-3f1a3bvwgpl-image-aa.jpg?q=85&fm=auto&auto=compress%2Cformat" alt="" width="800" height="450" priority={true} fetchPriority="high" />

<Image src="https://blob-cdn.documentation.ai/org-b713c195-07b6-46aa-b0f6-7e28b1a72b11/doc-dbecd5b1-e16f-4af5-9dff-ae113c6cd9de/1765361334485-ulbhota2r7s-image-bb.jpg?q=85&fm=auto&auto=compress%2Cformat" alt="" width="800" height="450" priority={true} fetchPriority="high" />

  </Step>

  <Step title="Interpret and store the response" icon="database">

  
The response returns all information required to broadcast and play the stream:

- `playbackUrl`
- `rtmpUrl`
- `streamKey`
- `streamUUID`
- `status` (initially Idle)

Store these values so your encoder and playback clients can be configured correctly.

  </Step>

  <Step title="Select the correct RTMP ingest base URL" icon="arrow-right">

  
Videograph uses two ingest bases:

- For recorded streams (`record` set to `true`):  
  `rtmp://rc-ingest.in.videograph.ai/rec`

- For non‑recorded streams (`record` set to `false`):  
  `rtmp://ingest.in.videograph.ai/live`

Append the returned `streamKey` when configuring your encoder.

  </Step>

  <Step title="Configure and start your encoder" icon="upload-cloud">

  
In OBS or another RTMP encoder:

- Set the server field to the ingest base URL.
- Set the stream key field to the returned `streamKey`.
- Start streaming to send video to Videograph.

Once the stream is received, it becomes playable using the returned HLS `playbackUrl`.

The screenshot below shows an example OBS configuration with the RTMP server URL and stream key.

<Image src="https://blob-cdn.documentation.ai/org-b713c195-07b6-46aa-b0f6-7e28b1a72b11/doc-dbecd5b1-e16f-4af5-9dff-ae113c6cd9de/1765361347190-4ij7u95xnwb-image-cc.jpg?q=85&fm=auto&auto=compress%2Cformat" alt="" width="800" height="450" />

  </Step>

  <Step title="Watch the live stream via HLS" icon="play-circle">

  
Use the `playbackUrl` in any HLS‑capable player. See [Playing Videos (Web & App Integration)](/web-sdk-player) for common integration patterns.

The HLS playback URL is also visible directly in the Videograph dashboard.

<Image src="https://blob-cdn.documentation.ai/org-b713c195-07b6-46aa-b0f6-7e28b1a72b11/doc-dbecd5b1-e16f-4af5-9dff-ae113c6cd9de/1765361379451-utki8adi3un-image-f.jpg?q=85&fm=auto&auto=compress%2Cformat" alt="" width="800" height="450" />

  </Step>

  <Step title="Retrieve the processed VOD asset (if recording enabled)" icon="video">

  
If `"record": true`, the stream is recorded and remains accessible for about 12 hours from the start time. After that window, the session is processed into a standard content item retrievable via the contents API.

When you know the resulting content identifier, request the asset and its playback URL:

<CodeGroup tabs="cURL">

```bash
curl --request GET \
     --url https://api.videograph.ai/video/services/api/v1/contents/CONTENT_ID \
     -u "ACCESS_KEY:SECRET_KEY"
```

</CodeGroup>

For editing metadata or managing tags later, see [Managing Video Content](/vod-metadata-tags).

You can also manage the live stream and recorded sessions from the dashboard's Live Stream or Live Recording menus, including clips, metadata, and lifecycle actions.

<Image src="https://blob-cdn.documentation.ai/org-b713c195-07b6-46aa-b0f6-7e28b1a72b11/doc-dbecd5b1-e16f-4af5-9dff-ae113c6cd9de/1765361400692-fu6vf7xih7f-image-h.jpg?q=85&fm=auto&auto=compress%2Cformat" alt="" width="800" height="450" />

  </Step>

</Steps>

## How recorded sessions become VOD assets

Recorded live streams are captured for about 12 hours from the moment the broadcast begins. After the session and retention window complete, Videograph processes the recording into a content item accessible through the standard VOD API. You can then work with the asset the same way you would any uploaded video, including updating metadata or integrating the playback URL in your applications.
