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

# 音频转录

> 将音频转换为文本



## OpenAPI

````yaml /api.json post /v1/audio/transcriptions
openapi: 3.0.1
info:
  title: TKHub API
  description: TKHub 平台 API 接口文档
  version: 1.0.0
servers:
  - url: https://api.tkhub.ai
    description: 生产环境
  - url: https://api-test.tkhub.ai
    description: 测试环境
security:
  - bearerAuth: []
paths:
  /v1/audio/transcriptions:
    post:
      tags:
        - OpenAI音频(Audio)
      summary: 音频转录
      description: 将音频转换为文本
      operationId: createTranscription
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: 音频文件
                  example: ''
                model:
                  type: string
                  example: whisper-1
                language:
                  type: string
                  description: ISO-639-1 语言代码
                  example: ''
                prompt:
                  type: string
                  example: ''
                response_format:
                  type: string
                  enum:
                    - json
                    - text
                    - srt
                    - verbose_json
                    - vtt
                  default: json
                  example: json
                temperature:
                  type: number
                  example: 0
                timestamp_granularities:
                  type: array
                  items:
                    type: string
                    enum:
                      - word
                      - segment
                  example: ''
              required:
                - file
                - model
        required: true
      responses:
        '200':
          description: 成功转录
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioTranscriptionResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    AudioTranscriptionResponse:
      type: object
      properties:
        text:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````