{
"text": "你好,世界!"
}
{
"text": "Hello, world!"
}
POST /v1/audio/speech
POST /v1/audio/transcriptions
POST /v1/audio/translations
Authorization: Bearer $NEWAPI_API_KEY
$NEWAPI_API_KEY
是您的 API 密钥。model
input
voice
response_format
speed
file
model
language
prompt
response_format
temperature
timestamp_granularities
file
model
prompt
response_format
temperature
{
"text": "转录的文本内容"
}
{
"task": "transcribe",
"language": "english",
"duration": 8.47,
"text": "完整的转录文本",
"segments": [
{
"id": 0,
"seek": 0,
"start": 0.0,
"end": 3.32,
"text": "分段的转录文本",
"tokens": [50364, 440, 7534],
"temperature": 0.0,
"avg_logprob": -0.286,
"compression_ratio": 1.236,
"no_speech_prob": 0.009
}
]
}
{
"text": "翻译后的英文文本"
}
400 Bad Request
: 请求参数无效401 Unauthorized
: API 密钥无效或未提供429 Too Many Requests
: 超出 API 调用限制500 Internal Server Error
: 服务器内部错误{
"error": {
"message": "文件格式不支持",
"type": "invalid_request_error",
"param": "file",
"code": "invalid_file_format"
}
}