创建语音 gpt-4o-mini-tts
POST /v1/audio/speech
说明
概览
| Method | POST |
|---|---|
| Path | /v1/audio/speech |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 45008043 |
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "model": { "type": "string", "description": "可用的 TTS 模型之一:tts-1 或 tts-1-hd" }, "input": { "type": "string", "description": "要生成音频的文本。最大长度为4096个字符。" }, "voice": { "type": "string", "description": "生成音频时使用的语音。支持的语音有:alloy、echo、fable、onyx、nova 和 shimmer。" }, "response_format": { "type": "string", "description": "默认为 mp3 音频的格式。支持的格式有:mp3、opus、aac 和 flac。" }, "speed": { "type": "number", "description": "默认为 1 生成的音频速度。选择0.25到4.0之间的值。1.0是默认值。" } }, "required": [ "model", "input", "voice" ], "x-apifox-orders": [ "model", "input", "voice", "response_format", "speed" ] }, "mediaType": "", "examples": [ { "value": "{\r\n \"model\": \"gpt-4o-mini-tts\",\r\n \"input\": \"The quick brown fox jumped over the lazy dog.\",\r\n \"voice\": \"alloy\"\r\n }", "mediaType": "application/json", "description": "" } ], "oasExtensions": "" }
响应
[ { "id": 562497978, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {}, "x-apifox-orders": [] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]