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

# Recording

Download the composite OGG recording for a completed session using the `stream_id` returned in the WebSocket `ready` message. Requires LiveKit recording to be enabled and storage configured; responds with `audio/ogg` and a download-friendly `Content-Disposition` header.

When the session was configured with a [`loading_audio`](/guides/websocket#loading_audio-configuration) clip, the recording mixes both the `tts-audio` and `loading-audio` tracks exactly as the human participant heard them.


## OpenAPI

````yaml GET /recording/{stream_id}
openapi: 3.1.0
info:
  title: Sayna API
  description: >-
    Real-time voice processing server with Speech-to-Text (STT) and
    Text-to-Speech (TTS) services
  contact:
    name: Sayna
    url: https://api.sayna.ai
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  version: 0.1.0
servers:
  - url: https://api.sayna.ai
    description: Production API
  - url: http://localhost:3001
    description: Local development
security: []
tags:
  - name: health
    description: Health check endpoints
  - name: voices
    description: TTS voice management
  - name: tts
    description: Text-to-speech synthesis
  - name: livekit
    description: LiveKit room and token management
  - name: recordings
    description: Recording download operations
  - name: sip
    description: SIP webhook configuration management
  - name: websocket
    description: WebSocket API for real-time communication
paths:
  /recording/{stream_id}:
    get:
      tags:
        - recordings
      summary: Download recording by stream ID from configured object storage
      operationId: download_recording
      parameters:
        - name: stream_id
          in: path
          description: Recording stream identifier
          required: true
          schema:
            type: string
          example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Recording retrieved successfully
          headers:
            Content-Disposition:
              schema:
                type: string
              description: Suggested filename for download
            Content-Length:
              schema:
                type: integer
                format: int64
                minimum: 0
              description: Size of the recording in bytes
          content:
            audio/ogg: {}
        '400':
          description: Invalid stream_id format
        '404':
          description: Recording not found
        '503':
          description: Recording storage not configured or unavailable
      security:
        - auth: []
components:
  securitySchemes:
    auth:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >-
        Authentication token for protected endpoints. Can be provided as
        `Authorization: Bearer <token>` or `?api_key=<token>`. Required when
        AUTH_REQUIRED is enabled.

````