Whisper(同步任务)
openai/whisper
同步任务:/v1/audio/transcriptions,直接返回结果。
BASE URL
https://router.shengsuanyun.com/api认证方式
Authorization: Bearer YOUR_API_KEY端点列表
POST/v1/audio/transcriptionsOpenAI 语音转录-同步
同步语音转录接口:直接返回转录文本。
请求体
application/json
| 字段 | 类型 | 说明 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
file必填 | string | ||||||||||||||||
chunking_strategy必填 | union | 展开结构
oneOf · 1
oneOf · 2
| |||||||||||||||
language | string | 可选值:"zh" · "en" | |||||||||||||||
prompt | stringtextarea | ||||||||||||||||
response_format | string | 可选值:"json" · "text" · "srt" · "vtt" · "verbose_json" | |||||||||||||||
temperature | number | ||||||||||||||||
timestamp_granularities | array | 展开结构
数组元素
| |||||||||||||||
model必填 | string | 路由模型,本页固定为 openai/whisper |
{
"file": "string",
"language": "en",
"prompt": "string",
"response_format": "json",
"temperature": 0,
"timestamp_granularities": [
"segment"
],
"model": "openai/whisper"
}请求示例
参考地址:https://router.shengsuanyun.com/api。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X POST 'https://router.shengsuanyun.com/api/v1/audio/transcriptions' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"file": "string",
"language": "en",
"prompt": "string",
"response_format": "json",
"temperature": 0,
"timestamp_granularities": [
"segment"
],
"model": "openai/whisper"
}'