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

# Read a durable AI chat session's event log, as a page or an SSE tail (bearer token)



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /api/v1/chat/sessions/{session_id}/events
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/chat/sessions/{session_id}/events:
    get:
      tags:
        - chat
      summary: >-
        Read a durable AI chat session's event log, as a page or an SSE tail
        (bearer token)
      operationId: >-
        read_ai_session_events_endpoint_api_v1_chat_sessions__session_id__events_get
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            format: uuid
            title: Session Id
            type: string
        - in: query
          name: since
          required: false
          schema:
            default: 0
            minimum: 0
            title: Since
            type: integer
        - in: query
          name: limit
          required: false
          schema:
            default: 1000
            maximum: 5000
            minimum: 1
            title: Limit
            type: integer
        - in: query
          name: stream
          required: false
          schema:
            default: false
            title: Stream
            type: boolean
        - in: header
          name: Last-Event-ID
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Last-Event-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
            text/event-stream:
              schema:
                type: string
          description: >-
            stream=false: the event page after since (SessionEventsPage).
            stream=true: the SSE tail - persisted events replay first (id =
            sequence number), live events follow with 4-second heartbeats, and
            the terminal end frame closes the stream; resume with since or the
            Last-Event-ID header (the larger wins)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Bearer token missing (400) or invalid (401)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: AI session not found (the SSE branch answers an error frame instead)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    ContractDetailError:
      example:
        detail: Cluster not found
      properties:
        detail:
          oneOf:
            - type: string
            - additionalProperties: true
              properties: {}
              type: object
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````