Skip to main content
POST
Text-to-speech
POST /v1/audio/speech 返回二进制音频流。支持 gpt-4o-mini-ttsgpt-4o-audio-preview 等模型。

请求示例(cURL)

参数速览

  • voice:音色 ID,兼容 OpenAI 官网上所有可用选项。
  • response_format:控制输出封装,例如 mp3-1-32000-128000wav 等。
  • speed:语速(0.25 ~ 4)。
如果希望直接返回音频 URL,可结合 PhanEdge 的媒体存储服务或使用 MiniMaxi 文档中的 files/retrieve 接口。

Authorizations

Authorization
string
header
required

Authorization: Bearer

Body

application/json

The body is of type object.

Response

200 - audio/mpeg

Audio stream

The response is of type file.