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

# GPT Audio 1.5

> GPT Audio 1.5：支援語音輸入與輸出的音訊對話模型。包含 MixRoute 呼叫範例與參數。

GPT Audio 1.5 是 OpenAI 推出的支援語音輸入與輸出的音訊對話模型。

可使用下方端點透過 MixRoute 呼叫 `gpt-audio-1.5`。

## 核心能力

* 音訊輸入與輸出 - 在 Chat Completions 對話中使用語音
* 音色選擇 - 設定生成音訊使用的音色
* 文字轉錄 - 在生成音訊的同時取得文字
* OpenAI 相容 - 使用 Chat Completions 請求格式

## 快速範例

**cURL**

```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-audio-1.5",
  "modalities": [
    "text",
    "audio"
  ],
  "audio": {
    "voice": "alloy",
    "format": "wav"
  },
  "messages": [
    {
      "role": "user",
      "content": "Give a short spoken welcome to MixRoute."
    }
  ],
  "max_completion_tokens": 256
}'
```

**Python**

```python theme={null}
import base64
from pathlib import Path
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

response = client.chat.completions.create(
    model="gpt-audio-1.5",
    modalities=["text", "audio"],
    audio={"voice": "alloy", "format": "wav"},
    messages=[{"role": "user", "content": "Give a short spoken welcome to MixRoute."}],
    max_completion_tokens=256,
)

audio = response.choices[0].message.audio
Path("reply.wav").write_bytes(base64.b64decode(audio.data))
print(audio.transcript)
```

## 參數

| 參數 | 類型 | 必填 | 說明 |
| - | - | - | - |
| `model` | string | 是 | 固定為 `gpt-audio-1.5`。 |
| `messages` | array | 是 | 對話訊息，content 可包含文字或 input\_audio 內容片段。 |
| `modalities` | array | 是 | 包含 audio 以請求生成語音。 |
| `audio` | object | 是 | 輸出音色與音訊格式。 |
| `max_completion_tokens` | integer | 否 | 最大生成 token 數。 |
| `stream` | boolean | 否 | 啟用 Chat Completions 串流輸出。 |


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