> ## Documentation Index
> Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Open Stream

> Open a live stream session

<Info>
  **Product**: Video Datalake
  **Host**: `https://api.memories.ai/datalake/v1`
  **Auth**: `Authorization: sk-mai-...`
</Info>

Attach a live pull-stream (rtsp/rtmp/http-flv) to a collection; the platform indexes it in real time and content becomes searchable **while the stream is live**. Current constraint: server-pull only (`source_url` required).

<Note>
  **Pricing:** \$0.04 / minute streamed · See [Pricing](/datalake/pricing) for the full model.
</Note>

## Response Fields

<ResponseField name="video_id" type="string">The live video (state `processing` while live); use it to search/subscribe.</ResponseField>
<ResponseField name="session_id" type="string">Use to close the stream.</ResponseField>
<ResponseField name="playback_url" type="string">Raw m3u8 (signed/CDN in a later version).</ResponseField>
<ResponseField name="ingest_url" type="string">Always `null` (pull-only).</ResponseField>


## OpenAPI

````yaml POST /datalake/v1/streams
openapi: 3.1.0
info:
  title: Memories.ai DataLake API 2.0
  version: 2026-08
  description: OpenAPI mapping used by Mintlify Try it for the DataLake API 2.0 docs.
servers:
  - url: https://api.memories.ai
security:
  - ApiKeyAuth: []
paths:
  /datalake/v1/streams:
    post:
      tags:
        - Live Stream
      summary: Open a live stream session
      description: >-
        Attach a live pull-stream (rtsp/rtmp/http-flv) to a collection; the
        platform indexes it in real time and content becomes searchable **while
        the stream is live**. Current constraint: server-pull only (`source_url`
        required).
      operationId: open_stream
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection_id:
                  type: string
                  description: Target collection (OmniRetriever).
                source_url:
                  type: string
                  description: '`rtsp://` / `rtmp://` / `http(s)://` pull URL.'
                fps:
                  type: number
                  description: Sampling rate 0.1–30 (default 1.0).
                metadata:
                  type: object
              required:
                - collection_id
                - source_url
              example:
                collection_id: col_xxx
                source_url: rtmp://cam.example.com/live/door1
                fps: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                video_id: vid_live1
                session_id: 3f2a...-uuid
                ingest_url: null
                playback_url: gs://.../video/index-0.m3u8
                operation: op_xxx
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Send `Authorization: sk-mai-...`'

````