原生标准同步语音合成,接收 JSON 并返回音频二进制字节或供应商支持的 SSE。与异步音乐任务 /v1/tasks/kie 不同,不能将 KIE Suno 模型传给此接口,也不提供旧 /v1/audio/generations 别名。
POST
/v1/audio/speechAuthorizations
AuthorizationstringrequiredUse a OneAster inference API Key (Bearer sk-…).
Authorization: Bearer $ONEASTER_API_KEY
Body · application/json
modelstringrequiredinputstringrequired要转换的文本
voicestringrequiredresponse_formatstringspeednumberJSON Schema
{
"type": "object",
"required": [
"model",
"input",
"voice"
],
"properties": {
"model": {
"type": "string",
"example": "tts-1"
},
"input": {
"type": "string",
"description": "要转换的文本",
"maxLength": 4096
},
"voice": {
"type": "string",
"enum": [
"alloy",
"echo",
"fable",
"onyx",
"nova",
"shimmer"
]
},
"response_format": {
"type": "string",
"enum": [
"mp3",
"opus",
"aac",
"flac",
"wav",
"pcm"
],
"default": "mp3"
},
"speed": {
"type": "number",
"minimum": 0.25,
"maximum": 4,
"default": 1
}
}
}