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

# 列出会话

> 列出工作区中仍处于打开状态的会话 ID，按创建时间从新到旧排列。使用查询会话接口获取每个会话的状态和设置。

> [accordion] 错误
>
> 会话端点可能返回的错误码请参阅[会话错误](https://docs.vivix.ai/cn/streaming-avatar/api-references/sessions#errors)。


## OpenAPI

````yaml cn/streaming-avatar/api-references/openapi.json GET /v1/realtime-avatar/sessions
openapi: 3.1.0
info:
  title: Vivix Streaming Avatar API 中文参考
  version: 1.0.0
  description: Streaming Avatar 会话、音色和角色的 REST 接口。
servers:
  - url: https://api.vivix.ai
security:
  - bearerAuth: []
paths:
  /v1/realtime-avatar/sessions:
    get:
      summary: 列出会话
      description: 列出工作区中仍处于打开状态的会话 ID，按创建时间从新到旧排列。使用查询会话接口获取每个会话的状态和设置。
      operationId: listSessions
      parameters:
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
          description: 最多返回的会话 ID 数量。默认为 `100`，最大可接受值为 `200`。超出范围时回退到默认值。
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - data
                properties:
                  code:
                    type: integer
                    description: 成功时为 `0`；其他值均为错误码。
                  message:
                    type: string
                    description: '`success`，或英文错误说明。'
                  data:
                    type: object
                    properties:
                      session_ids:
                        type: array
                        items:
                          type: string
                        description: >-
                          仍处于打开状态的会话 ID，按创建时间从新到旧排列。没有打开的会话时返回空数组。`page_size`
                          最多将结果限制为 `200` 个 ID；此接口不提供分页。
                    required:
                      - session_ids
              example:
                code: 0
                message: success
                data:
                  session_ids:
                    - avatar-session-345
                    - avatar-session-123
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 你的 Vivix API 密钥。请仅保存在服务端。

````

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