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

# 回放或续订会话事件

> Without live, returns persisted user and assistant events as JSON. An unknown `after` cursor replays from the beginning. live=1 returns text/event-stream only while this session is still generating, otherwise 204.



## OpenAPI

````yaml GET /v1/sessions/{session_id}/events
openapi: 3.0.0
info:
  title: Profy Platform API
  version: 1.0.0
  description: >-
    Platform API for building on Profy — invoke Experts, use models, report
    billing events, and manage OAuth.
servers:
  - url: https://api.profy.cn
    description: Production
security: []
paths:
  /v1/sessions/{session_id}/events:
    get:
      tags:
        - Platform API
      summary: Replay the session log, or subscribe while a turn is generating
      description: >-
        Without live, returns persisted user and assistant events as JSON. An
        unknown `after` cursor replays from the beginning. live=1 returns
        text/event-stream only while this session is still generating, otherwise
        204.
      operationId: listSessionEvents
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
        - name: after
          in: query
          required: false
          schema:
            type: string
          description: Event id to resume after
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: Max 200
        - name: live
          in: query
          required: false
          schema:
            type: string
            enum:
              - '1'
          description: >-
            Pass 1 to subscribe to the in-progress SSE stream. Any other value,
            including omission, returns the JSON log. No generating stream
            returns 204.
      responses:
        '200':
          description: >-
            JSON log of persisted events. When live=1 and a turn is generating,
            the response is text/event-stream instead.
        '204':
          description: live=1 and this session has no generating stream.
        '401':
          description: Unauthorized
        '404':
          description: Not found
      security:
        - BearerToken: []
        - ApiKey: []
components:
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token issued via POST /oauth/token
    ApiKey:
      type: http
      scheme: bearer
      description: Developer API Key (sk-pro-xxx) created at platform.profy.cn

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.