返回模型列表
gpt-audio-mini
openaiopenai/gpt-audio-mini
API 使用指南
音频 Chat 调用
在消息内容中发送 base64 编码的 WAV/MP3 音频。模型用文本和/或音频回复——API 模式与 gpt-audio 相同,仅价格更低。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-audio-mini",
"modalities": ["text", "audio"],
"audio": { "voice": "alloy", "format": "wav" },
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "What does this audio say?" },
{ "type": "input_audio", "input_audio": { "data": "<BASE64_AUDIO>", "format": "wav" } }
]
}
]
}'流式音频对话
实时流式接收文本(转写)token,同时在最终消息中获取完整音频。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-audio-mini",
"modalities": ["text", "audio"],
"audio": { "voice": "nova", "format": "wav" },
"stream": true,
"messages": [
{ "role": "user", "content": "Tell me a story in 30 seconds." }
]
}'工具/函数调用
gpt-audio-mini 支持带音频上下文的工具调用——使用方式与纯文本模型相同。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-audio-mini",
"messages": [
{
"role": "user",
"content": [
{ "type": "input_audio", "input_audio": { "data": "<BASE64_AUDIO>", "format": "wav" } },
{ "type": "text", "text": "Extract the booking reference and the date mentioned in this audio." }
]
}
],
"tools": [
{
"type": "function",
"function": {
"name": "extract_booking",
"description": "Extract booking reference and date",
"parameters": {
"type": "object",
"properties": {
"reference": { "type": "string" },
"date": { "type": "string" }
},
"required": ["reference", "date"]
}
}
}
],
"tool_choice": "auto"
}'事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | Design for Online / OpenRouter ↗ | 2026-05-29 | 已核实 |
| 上下文窗口 | OpenRouter ↗ | 2026-05-29 | 已核实 |
| 最大输出长度 | OpenRouter ↗ | 2026-05-29 | 已核实 |
| 支持的模态 | developers.openai.com ↗ | 2026-05-29 | 已核实 |
| 支持的能力 | platform.openai.com ↗ | 2026-05-29 | 已核实 |
| 许可 | — | — | 已核实 |
| Audio quality (upgraded decoder) | Design for Online ↗ | 2026-05-29 | 待核实 |
| OpenAI 发布 gpt-audio 和 gpt-audio-mini | Design for Online / OpenRouter ↗ | 2026-05-29 | 已核实 |