> ## 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.

# 语音识别历史

> 查询语音识别历史记录，支持按会话或 API Key 过滤

## 说明

获取语音识别历史，支持按会话 ID 或 API Key 过滤。历史最长保存 7 天（按会话结束时间计）。

* **接口地址**：`https://api.senseaudio.cn/v1/audio/records`
* **鉴权方式**：Bearer Token，详见 [快速接入](/guides/account/quick-access)

## Authorizations

<ParamField header="Authorization" type="string" required>
  Bearer 鉴权头，格式为 `Bearer SENSEAUDIO_API_KEY`。
</ParamField>

## Query parameters

<ParamField query="page" type="integer" default="1">
  页数。
</ParamField>

<ParamField query="page_size" type="integer" default="20">
  分页大小。
</ParamField>

<ParamField query="session_id" type="string">
  按会话 ID 筛选。
</ParamField>

<ParamField query="api_key" type="string">
  按 API Key 筛选。
</ParamField>

## Response

`200` — `application/json`

<ResponseField name="total" type="integer">
  调用记录总数。
</ResponseField>

<ResponseField name="list" type="object[]">
  查询得到的调用记录数据。

  <Expandable title="child attributes">
    <ResponseField name="list.api_key" type="string">
      此调用记录使用的 API Key。
    </ResponseField>

    <ResponseField name="list.audio" type="string">
      调用记录的音频文件 URL，格式为 PCM s16le，采样率与声道数依据此次会话的控制信息。
    </ResponseField>

    <ResponseField name="list.points" type="integer">
      此次调用消耗的积分。
    </ResponseField>

    <ResponseField name="list.session_id" type="string">
      会话 ID。
    </ResponseField>

    <ResponseField name="list.session_start" type="integer">
      会话开始时间，UNIX 时间戳。
    </ResponseField>

    <ResponseField name="list.session_end" type="integer">
      会话结束时间，UNIX 时间戳。
    </ResponseField>

    <ResponseField name="list.text" type="string">
      识别出的文本。
    </ResponseField>
  </Expandable>
</ResponseField>

## 相关指南

* [语音识别介绍](/guides/asr/overview)
* [语音识别转写](/api-reference/endpoint/asr/transcriptions)
* [计费说明](/guides/account/billing)


## OpenAPI

````yaml api-reference/endpoint/asr/records.openapi.json GET /v1/audio/records
openapi: 3.1.0
info:
  title: SenseAudio - 语音识别历史
  version: 1.0.0
servers:
  - url: https://api.senseaudio.cn
    description: 生产环境
security:
  - bearerAuth: []
paths:
  /v1/audio/records:
    get:
      tags:
        - ASR
      summary: 获取语音识别历史
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: page_size
          in: query
          schema:
            type: integer
            default: 20
        - name: session_id
          in: query
          schema:
            type: string
            example: bcc1a46806d94bfef1a442f44e3cbe0a
        - name: api_key
          in: query
          schema:
            type: string
            example: sk-123456
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioRecordsResponse'
              example:
                total: 1
                list:
                  - audio: >-
                      https://example.com/file/bcc1a46806d94bfef1a442f44e3cbe0a-record.pcm
                    session_id: bcc1a46806d94bfef1a442f44e3cbe0a
                    session_start: 1772161815
                    session_end: 1772161917
                    api_key: sk-123456
                    points: 485
                    text: 这是一个示例文本。
components:
  schemas:
    AudioRecordsResponse:
      type: object
      properties:
        total:
          type: integer
          description: 调用记录总数
        list:
          type: array
          description: 查询得到的调用记录数据
          items:
            type: object
            properties:
              api_key:
                type: string
                description: 此调用记录使用的 API Key
              audio:
                type: string
                description: 调用记录的音频文件 URL，PCM s16le 格式
              points:
                type: integer
                format: int64
                description: 此次调用消耗的积分
              session_id:
                type: string
                description: 会话 ID
              session_start:
                type: integer
                format: int64
                description: 会话开始时间，UNIX 时间戳
              session_end:
                type: integer
                format: int64
                description: 会话结束时间，UNIX 时间戳
              text:
                type: string
                description: 识别出的文本
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: 格式：`Bearer <API_KEY>`

````