原生标准音频转写,使用 multipart/form-data 上传 file 与 model,返回原生 JSON、纯文本或字幕格式。
POST
/v1/audio/transcriptionsAuthorizations
AuthorizationstringrequiredUse a OneAster inference API Key (Bearer sk-…).
Authorization: Bearer $ONEASTER_API_KEY
Body · multipart/form-data
filestringrequired音频文件
modelstringrequiredlanguagestringISO-639-1 语言代码
promptstringresponse_formatstringtemperaturenumbertimestamp_granularitiesarrayJSON 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"
]
}