返回模型列表
GPT-4o Mini TTS
openaiopenai/gpt-4o-mini-tts
媒体生成能力
tts
- output_formats
- mp3
- opus
- aac
- flac
- voices
- alloy
- ash
- ballad
- coral
- echo
- fable
- onyx
- nova
- sage
- shimmer
- verse
- defaults
- voice
- alloy
API 使用指南
文本转语音(流式)
GPT-4o Mini TTS 使用标准的 OpenAI speech 端点。通过 TheRouter 的统一 API 调用——该模型支持同步和流式模式,并支持通过指令控制语气。
cURL
curl https://api.therouter.ai/v1/audio/speech \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini-tts",
"input": "Welcome to TheRouter — your unified API for all AI models.",
"voice": "nova",
"instructions": "Speak warmly and professionally, like a friendly customer service agent.",
"response_format": "mp3"
}' \
--output speech.mp3流式 TTS
对于实时语音应用,音频块生成时即可流式传输。GPT-4o Mini TTS 通过 SSE 发送二进制音频块,典型条件下首块在 500 毫秒内到达。
cURL
curl https://api.therouter.ai/v1/audio/speech \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini-tts",
"input": "This is a streaming voice demo using TheRouter API.",
"voice": "echo",
"response_format": "pcm"
}' \
--output - | ffplay -f s16le -ar 24000 -ac 1 -事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | openai.com ↗ | 2026-05-28 | 已核实 |
| 基础架构 | openai.com ↗ | 2026-05-28 | 已核实 |
| API 端点 | developers.openai.com ↗ | 2026-05-28 | 已核实 |
| 预设语音 | docs.aimlapi.com ↗ | 2026-05-28 | 已核实 |
| 支持语言 | tokenmix.ai ↗ | 2026-05-28 | 已核实 |
| 上下文窗口 | tokenmix.ai ↗ | 2026-05-28 | 待核实 |
| 输出格式 | developers.openai.com ↗ | 2026-05-28 | 已核实 |
| 可引导性 | simonwillison.net ↗ | 2026-05-28 | 已核实 |
| Steerability benchmark (Simon Willison) | simonwillison.net ↗ | 2026-05-28 | 已核实 |
| Standard TTS benchmarks | openai.com ↗ | 2026-05-28 | 未知 |
| OpenAI 发布 gpt-4o-mini-tts 及新一代语音转文本模型 | openai.com ↗ | 2026-05-28 | 已核实 |
| gpt-4o-mini-tts 有哪些可用语音? | docs.aimlapi.com ↗ | 2026-05-28 | 待核实 |
| instructions 参数如何工作? | simonwillison.net ↗ | 2026-05-28 | 待核实 |
| gpt-4o-mini-tts 支持哪些语言? | tokenmix.ai ↗ | 2026-05-28 | 待核实 |
| 定价机制是怎样的?按 Token 计费还是按分钟? | tokenmix.ai ↗ | 2026-05-28 | 待核实 |
| 可以通过 TheRouter 使用 gpt-4o-mini-tts 吗? | api.therouter.ai ↗ | 2026-05-28 | 待核实 |