GPT Realtime 2.1 vs GPT Realtime 2.1 Mini
何時該用哪一個 — 綜合評斷,而非基準測試數據表
mini 檔在每一行都更便宜——文字每百萬 $0.6 和 $2.4 對 $4 和 $24,音訊每百萬輸入/輸出 $10 和 $20 對 $32 和 $64——即音訊大約低 3 倍、文字輸入約低 7 倍。兩者都帶 128K 工作階段脈絡、語音到語音、工具使用和提示快取;完整版另外寫明了可設定的推理力度和打斷處理。走量選 mini,需要按工作階段調節推理力度時選完整版。
定價
| GPT Realtime 2.1 | GPT Realtime 2.1 Mini | Δ | |
|---|---|---|---|
| 音訊輸入 / 1M tokens | $32 | $10 | 3.2× |
| 音訊輸出 / 1M tokens | $64 | $20 | 3.2× |
| 音訊快取讀取 / 1M tokens | $0.4 | $0.3 | 1.3× |
| 文字輸入 / 1M tokens | $4 | $0.6 | 6.7× |
| 文字輸出 / 1M tokens | $24 | $2.4 | 10× |
| 快取寫入 | 不額外計費 | 不額外計費 | — |
費率取自建置時的即時目錄;各模型頁面皆附有目前的費率卡。
它們的相對位置 — 在此計費單位下,所有 6 個 即時語音對語音 模型的 每 1M 語音 tokens 的價格(對數尺度)
能力
| GPT Realtime 2.1 | GPT Realtime 2.1 Mini | |
|---|---|---|
| 提示快取 | 隱式(自動) | 隱式(自動) |
| 快取生命週期 | 5–10m, up to 1h | 5–10m, up to 1h |
| 最小快取前綴 | 1024 個 token | 1024 個 token |
規格
| GPT Realtime 2.1 | GPT Realtime 2.1 Mini | |
|---|---|---|
| 輸入模態 | 文字 音訊 | 文字 音訊 |
| 輸出模態 | 文字 音訊 | 文字 音訊 |
| 發布日期 | 2026-07-06 | 2026-07-06 |
| 知識截止日期 | 2024-09 | 2024-09 |
| 工作階段功能 |
|
|
| 上下文視窗 | 128K | 128K |
規格摘錄自各供應商的文件;供應商未發布的資料列會直接省略,而非自行推測。 完整來源: GPT Realtime 2.1 · GPT Realtime 2.1 Mini
只需一行程式碼即可在兩者間切換
以下每個頁籤中都有這兩個 ID — 醒目提示的這兩行是唯一的修改處。相同的端點,相同的金鑰,相同的請求結構。
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1"
# URL = "wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1-mini" # 取消註解此行,並註解上一行
# Send ONLY the Authorization header — the beta protocol is retired.
HEADERS = {"Authorization": "Bearer sk-syn-..."}
async def main():
async with websockets.connect(URL, additional_headers=HEADERS) as ws:
# 1) configure the speech-to-speech session
await ws.send(json.dumps({
"type": "session.update",
"session": {
"type": "realtime",
"output_modalities": ["audio"],
"audio": {"output": {"voice": "alloy"}},
},
}))
# 2) send input audio (base64 PCM16), then request a spoken reply
await ws.send(json.dumps({"type": "input_audio_buffer.append", "audio": pcm16_b64}))
await ws.send(json.dumps({"type": "input_audio_buffer.commit"}))
await ws.send(json.dumps({"type": "response.create"}))
# 3) stream the model's audio (and text) back
async for raw in ws:
ev = json.loads(raw)
if ev["type"] == "response.audio.delta":
play(base64.b64decode(ev["delta"])) # audio out
elif ev["type"] == "response.done":
break
asyncio.run(main())import WebSocket from "ws";
const ws = new WebSocket("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1", {
// const ws = new WebSocket("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1-mini", { // 取消註解此行,並註解上一行
// Send ONLY the Authorization header — the beta protocol is retired.
headers: { Authorization: "Bearer sk-syn-..." },
});
ws.on("open", () => {
// configure the speech-to-speech session
ws.send(JSON.stringify({ type: "session.update", session: {
type: "realtime", output_modalities: ["audio"], audio: { output: { voice: "alloy" } },
} }));
// send input audio (base64 PCM16), then request a spoken reply
ws.send(JSON.stringify({ type: "input_audio_buffer.append", audio: pcm16Base64 }));
ws.send(JSON.stringify({ type: "input_audio_buffer.commit" }));
ws.send(JSON.stringify({ type: "response.create" }));
});
ws.on("message", (raw) => {
const ev = JSON.parse(raw.toString());
if (ev.type === "response.audio.delta") playAudio(Buffer.from(ev.delta, "base64")); // audio out
else if (ev.type === "response.done") ws.close();
});# Realtime is a WebSocket protocol — use a WS client such as websocat.
# Each line below is one OpenAI Realtime event (JSON) sent to the session.
websocat -H 'Authorization: Bearer sk-syn-...' \
'wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1' <<'EOF'
# 'wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1-mini' <<'EOF' # 取消註解此行,並註解上一行
{"type":"session.update","session":{"type":"realtime","output_modalities":["audio"],"audio":{"output":{"voice":"alloy"}}}}
{"type":"input_audio_buffer.append","audio":"<base64-pcm16>"}
{"type":"input_audio_buffer.commit"}
{"type":"response.create"}
EOF
# Responses stream back as response.audio.delta (base64 audio out) … response.donepackage main
import (
"net/http"
"github.com/gorilla/websocket"
)
func main() {
h := http.Header{}
h.Set("Authorization", "Bearer sk-syn-...")
// Send ONLY the Authorization header — the beta protocol is retired.
c, _, err := websocket.DefaultDialer.Dial("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1", h)
// c, _, err := websocket.DefaultDialer.Dial("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1-mini", h) // 取消註解此行,並註解上一行
if err != nil {
panic(err)
}
defer c.Close()
// configure the speech-to-speech session, send audio, request a spoken reply
c.WriteJSON(map[string]any{"type": "session.update", "session": map[string]any{
"type": "realtime", "output_modalities": []string{"audio"},
"audio": map[string]any{"output": map[string]any{"voice": "alloy"}}}})
c.WriteJSON(map[string]any{"type": "input_audio_buffer.append", "audio": pcm16B64})
c.WriteJSON(map[string]any{"type": "input_audio_buffer.commit"})
c.WriteJSON(map[string]any{"type": "response.create"})
for {
var ev struct {
Type string `json:"type"`
Delta string `json:"delta"`
}
if err := c.ReadJSON(&ev); err != nil {
return
}
if ev.Type == "response.audio.delta" {
playAudio(ev.Delta) // base64 audio out
} else if ev.Type == "response.done" {
return
}
}
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.WebSocket;
import java.util.concurrent.CompletionStage;
// JDK built-in WebSocket — no extra dependency needed.
WebSocket ws = HttpClient.newHttpClient().newWebSocketBuilder()
.header("Authorization", "Bearer sk-syn-...")
// Send ONLY the Authorization header — the beta protocol is retired.
.buildAsync(URI.create("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1"), new WebSocket.Listener() {
// .buildAsync(URI.create("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1-mini"), new WebSocket.Listener() { // 取消註解此行,並註解上一行
public CompletionStage<?> onText(WebSocket w, CharSequence data, boolean last) {
// handle response.audio.delta (base64 audio out) / response.done here
w.request(1);
return null;
}
}).join();
// configure the session, send input audio, then request a spoken reply
ws.sendText("{\"type\":\"session.update\",\"session\":{\"type\":\"realtime\",\"output_modalities\":[\"audio\"],\"audio\":{\"output\":{\"voice\":\"alloy\"}}}}", true);
ws.sendText("{\"type\":\"input_audio_buffer.append\",\"audio\":\"<base64-pcm16>\"}", true);
ws.sendText("{\"type\":\"input_audio_buffer.commit\"}", true);
ws.sendText("{\"type\":\"response.create\"}", true);常見問題
GPT Realtime 2.1 和 GPT Realtime 2.1 Mini 哪個比較便宜?
GPT Realtime 2.1 Mini 在 音訊輸入 / 1m tokens 上較便宜($10 對比 $32,相差 3.2×)。其他項目可能呈現相反結果 — 上表提供完整資訊,實際成本取決於您的使用組合。
我可以在不進行兩次整合的情況下,對 GPT Realtime 2.1 和 GPT Realtime 2.1 Mini 進行 A/B 測試嗎?
可以。兩者皆透過同一個相容 OpenAI 的端點提供服務,並使用同一把 API 金鑰 — 切換只需更改一行的模型字串,因此您可以將部分流量分別導向兩者並直接比較帳單。
GPT Realtime 2.1 與 GPT Realtime 2.1 Mini 支援提示快取嗎?
是的 — 兩者的快取讀取費率皆低於其輸入費率,因此具有暖前綴的工作負載成本會低於牌價所示。確切的快取讀取列請見上方的定價表。