ModelSell Docs
Audio & MoreAudio

文本转语音

POST
/v1/audio/speech

将完整文本转换为音频字节。音色、格式和参数范围取决于模型,不同供应商的音色不可直接互换。 百炼 Qwen-Audio、CosyVoice、Qwen HTTP 和 MiniMax 的原生选项通过 extra_body.input / extra_body.parameters 传入。 标准输入不能被扩展中的 model 或 input.text 替换。Qwen realtime 型号使用 WebSocket,详见 百炼 TTS 对接概览。 stream: true 返回二进制音频分片,stream_format: sse 返回原生 SSE 事件。网关不转码;Qwen HTTP 普通请求使用 WAV,流式使用 PCM。

Authorization

bearerAuth
AuthorizationBearer <token>

使用 Authorization Bearer API Key 进行鉴权。

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/audio/speech" \  -H "Content-Type: application/json" \  -d '{    "model": "tts-1",    "input": "string",    "voice": "alloy"  }'
"string"