> ## 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.

# Subscribe (SSE)

> Subscribe to live derived data (Server-Sent Events)

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

Open an SSE long-connection that pushes a live video's derived data in real time (caption / transcription / summary). Reconnect with `last_event_id` (or the `Last-Event-ID` header) for exactly-once replay.

<Note>
  **Custom method `:subscribe`** — this is an action on the resource, not standard CRUD. Call it exactly as `GET /datalake/v1/videos/{id}:subscribe`.
</Note>

<Note>
  **Pricing:** Included with the live stream (no separate charge). · See [Pricing](/datalake/pricing) for the full model.
</Note>

## Response Fields

<ResponseField name="event" type="string">`caption` | `transcription` | `summary` | `end`.</ResponseField>
<ResponseField name="id" type="integer">Monotonic event id; replay resumes from here.</ResponseField>
<ResponseField name="data" type="object">The derived payload for this event.</ResponseField>

## Notes

This is a streaming endpoint (no request/response playground). Test with `curl -N`. In dev without a gateway route, connect directly to the stream service. A polling alternative is [Get Caption](/datalake/moments/get-caption) with `?since=`.


## OpenAPI

````yaml GET /datalake/v1/videos/{id}:subscribe
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/videos/{id}:subscribe:
    get:
      tags:
        - Live Stream
      summary: Subscribe to live derived data (Server-Sent Events)
      description: >-
        Open an SSE long-connection that pushes a live video's derived data in
        real time (caption / transcription / summary). Reconnect with
        `last_event_id` (or the `Last-Event-ID` header) for exactly-once replay.
      operationId: subscribe_stream
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Live video ID.
        - name: data
          in: query
          required: false
          schema:
            type: string
          description: >-
            Comma list: `caption, transcription, summary, entities, speakers,
            events` (default all).
        - name: last_event_id
          in: query
          required: false
          schema:
            type: string
          description: Resume point for reconnection.
      responses:
        '200':
          description: Server-Sent Events stream
          content:
            text/event-stream:
              example:
                event: caption
                id: 47
                data:
                  seq: 47
                  start: 12.3
                  end: 15
                  text: A woman opens the door
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Send `Authorization: sk-mai-...`'

````