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

# 查询Agent状态

> 查询指定房间内语音Agent的运行状态，用于了解当前会话是否活跃，便于进行异常处理和资源管理。



## OpenAPI

````yaml GET /v1/realtime/status
openapi: 3.1.0
info:
  title: SenseAudio Open Platform API
  description: >-
    SenseAudio 开放平台
    API，覆盖语音合成、语音识别、音色能力、音乐生成、图片生成、视频生成、智能体与大语言模型等能力。未显式说明的字段为依据素材文档推断。
  version: 1.0.0
servers:
  - url: https://api.senseaudio.cn
    description: 生产环境
security:
  - bearerAuth: []
paths:
  /v1/realtime/status:
    get:
      tags:
        - Realtime
      summary: 查询 Agent 状态
      description: 查询指定房间内语音Agent的运行状态，用于了解当前会话是否活跃，便于进行异常处理和资源管理。
      operationId: getRealtimeAgentStatus
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: 内容类型。固定为 application/json
          schema:
            type: string
            default: application/json
            example: application/json
        - name: room_id
          in: query
          required: true
          description: 房间 ID，从「创建对话式 Agent」接口返回值中获取
          schema:
            type: string
            default: lO81loRAfmUMFIwY
            example: lO81loRAfmUMFIwY
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealtimeStatusResponse'
              example:
                status: RUNNING
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFilled:
                  summary: 未填写API KEY
                  value:
                    code: authentication_error
                    message: invalid authorization
                apiKeyFailed:
                  summary: API KEY 错误
                  value:
                    code: authentication_error
                    message: incorrect API key provided
        '404':
          description: 房间不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: notfound
                message: 资源未找到
                ref_code: 404000
        '500':
          description: 服务器内部错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: internal
                message: 服务繁忙，请稍后再试
                ref_code: 500000
      security:
        - bearerAuth: []
components:
  schemas:
    RealtimeStatusResponse:
      type: object
      properties:
        status:
          type: string
          description: 'Agent 状态。RUNNING: 运行中；STOPPED: 已停止'
          enum:
            - RUNNING
            - STOPPED
          example: RUNNING
      required:
        - status
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: 格式：`Bearer <API_KEY>`

````