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

# 录音文件识别



## OpenAPI

````yaml openapi_v2.yaml POST /audio/transcriptions
openapi: 3.1.0
info:
  title: 极客智坊 API v2 文档
  description: 极客智坊 API v2 接口规范文档
  version: 2.0.0
servers:
  - url: https://geekai.co/api/v2
    description: 国内版代理入口
  - url: https://geekai.dev/api/v2
    description: 海外版代理入口
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /audio/transcriptions:
    post:
      tags:
        - Audio
      summary: 语音识别接口
      description: 将音频文件转换为文字的接口，支持多种音频格式和转录选项。
      operationId: createTranscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - audio
              properties:
                model:
                  type: string
                  description: 语音识别模型
                  default: doubao-transcribe
                audio:
                  type: object
                  description: 音频文件信息
                  required:
                    - url
                    - format
                  properties:
                    url:
                      type: string
                      description: 音频文件的URL或Base64编码的音频数据
                      example: https://example.com/audio.wav
                    format:
                      type: string
                      description: 音频格式，支持wav、mp3等
                      example: mp3
                retries:
                  type: integer
                  description: 自动重试次数，默认0，表示失败不重试
                  default: 0
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                required:
                  - text
                properties:
                  text:
                    type: string
                    description: 转录文本
                  duration:
                    type: number
                    description: 音频总时长(秒)
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/StandardError'
components:
  responses:
    ValidationError:
      description: 参数验证错误
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: validation_error
              message:
                type: string
                example: 参数验证失败
              details:
                type: object
                additionalProperties:
                  type: string
                example:
                  field: 错误描述
    Unauthorized:
      description: 未授权
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: unauthorized
              message:
                type: string
                example: Invalid API key or token
    StandardError:
      description: 标准错误响应
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: 错误代码
          example: invalid_request
        message:
          type: string
          description: 错误信息描述
          example: 请求参数不合法
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API认证token
    apiKeyAuth:
      type: apiKey
      in: header
      name: GeekAI-API-Key
      description: API密钥认证

````