> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omniall.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 语音合成 API

> OpenAI 兼容语音合成，支持 MiniMax metadata 扩展。

# 语音合成 API

文本转语音（TTS）兼容 OpenAI Audio Speech；MiniMax 扩展参数放在 `metadata`。音乐生成使用 `POST /v1/music_generation`。

**API 主机：** `https://api.omniall.ai` · 鉴权 `Authorization: Bearer sk-...`。

| 说明 | 方法 | 路径 |
| - | - | - |
| 创建语音 | `POST` | `/v1/audio/speech` |
| 查询音色 | `POST` | `/v1/get_voice` |
| 音乐生成 | `POST` | `/v1/music_generation` |

| 字段 | 必填 | 说明 |
| - | - | - |
| `model` | 是 | 如 `speech-2.8-hd`、`speech-2.8-turbo` |
| `input` | 是 | 待合成文本 |
| `voice` | 是 | 音色 ID，如 `English_Graceful_Lady` |
| `response_format` | 否 | `mp3`、`wav`、`flac` 等 |
| `metadata` | 否 | MiniMax 扩展（`voice_setting`、`audio_setting` 等） |

```bash theme={null}
curl -X POST "https://api.omniall.ai/v1/audio/speech" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "speech-2.8-hd",
    "input": "你好，来自 Omniall AI",
    "voice": "English_Graceful_Lady",
    "response_format": "mp3"
  }' --output speech.mp3
```

完整字段与 Playground 见 **API Reference → 音频 → MiniMax 音频**。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.