音频接口

POST /v1/audio/transcriptions

音频转录

原生标准音频转写,使用 multipart/form-data 上传 file 与 model,返回原生 JSON、纯文本或字幕格式。

POST/v1/audio/transcriptions

身份验证

Authorizationstring必填

使用 OneAster 推理 API Key(Bearer sk-…)。

Authorization: Bearer $ONEASTER_API_KEY

请求正文 · multipart/form-data

filestring必填

音频文件

modelstring必填
languagestring

ISO-639-1 语言代码

promptstring
response_formatstring
temperaturenumber
timestamp_granularitiesarray
JSON 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"
  ]
}