音频转录
将音频转换为文本
POST
https://api.xiexus.cn/v1/audio/transcriptions
请求体:必填
接口信息
方法
POST路径
/v1/audio/transcriptions完整地址
https://api.xiexus.cn/v1/audio/transcriptions请求体
必填
标签
音频(Audio)/原生OpenAI格式
响应码
200
静态文件
当前接口页内已嵌入 OpenAPI JSON;如果需要查看总文件,可直接打开固定静态文件
relay.json。当前 JSON
../../../openapi/generated/ai-model/音频(Audio)/原生OpenAI格式/post-v1-audio-transcriptions-createtranscription-383826483.json总文件
../../../openapi/relay.jsonOpenAPI JSON
已将服务地址固定为
https://api.xiexus.cn,其余结构保持和源文档一致。{
"openapi": "3.1.0",
"info": {
"title": "音频转录",
"version": "1.0.0",
"description": "将音频转换为文本"
},
"tags": [
{
"name": "音频(Audio)/原生OpenAI格式"
}
],
"components": {
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "使用 Bearer Token 认证。\n格式: `Authorization: Bearer sk-xxxxxx`\n"
}
}
},
"paths": {
"/v1/audio/transcriptions": {
"post": {
"tags": [
"音频(Audio)/原生OpenAI格式"
],
"summary": "音频转录",
"description": "将音频转换为文本",
"operationId": "createtranscription",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "音频文件"
},
"model": {
"type": "string",
"examples": [
"whisper-1"
]
},
"language": {
"type": "string",
"description": "ISO-639-1 语言代码"
},
"prompt": {
"type": "string"
},
"response_format": {
"type": "string",
"enum": [
"json",
"text",
"srt",
"verbose_json",
"vtt"
],
"default": "json"
},
"temperature": {
"type": "number"
},
"timestamp_granularities": {
"type": "array",
"items": {
"type": "string",
"enum": [
"word",
"segment"
]
}
}
},
"required": [
"file",
"model"
]
}
}
}
},
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "成功转录",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"text": {
"type": "string"
}
},
"x-apifox-orders": [
"text"
]
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.xiexus.cn",
"description": "固定生产地址"
}
]
}