gemini-3.1-flash-live vs GPT Realtime 2.1
gemini-3.1-flash-live は招待制で提供しています。以下の数値は現在適用されている料金ですが、呼び出すにはワークスペースへの利用許可が必要です。この比較をもとに開発を始める前に、当社まで利用をお申し込みください。
GPT Realtime 2.1 は招待制で提供しています。以下の数値は現在適用されている料金ですが、呼び出すにはワークスペースへの利用許可が必要です。この比較をもとに開発を始める前に、当社まで利用をお申し込みください。
どんなときに、どちらを選ぶか
両者とも100万トークン単位で課金されるリアルタイムオーディオモデルですが、gemini-3.1-flash-liveの方が安価なルートです。オーディオ入力は$32に対して$3(約10.7x安価)、オーディオ出力は$64に対して$12であり、テキストは$4/$24に対して$0.75/$4.5(約5.3x安価)となります。また、オーディオやテキストと併せて画像やビデオの入力も受け付け、131072トークンのコンテキストと最大65536の出力トークンを備えており、延長しない限りLive APIセッションはオーディオ専用で15分(ビデオ付きで2分)が上限となります。$0.4のキャッシュ読み取りを備えたOpenAIのオーディオ/テキストスタック、その128000トークンのコンテキストと最大出力32000が必要な場合は、gpt-realtime-2.1を選択してください。
料金
| gemini-3.1-flash-live | GPT Realtime 2.1 | Δ | |
|---|---|---|---|
| 音声入力 / 100 万トークン | $3 | $32 | 0.094× |
| 音声出力 / 100 万トークン | $12 | $64 | 0.19× |
| 音声キャッシュ読み取り / 100 万トークン | - | $0.4 | - |
| テキスト入力 / 100 万トークン | $0.75 | $4 | 0.19× |
| テキスト出力 / 100 万トークン | $4.5 | $24 | 0.19× |
| キャッシュ書き込み | - | 追加料金なし | - |
ビルド時点の現行カタログの料金です。最新の料金表は各モデルのページに掲載しています。
両モデルの位置:音声トークン 100 万あたりの料金(この課金単位のリアルタイム音声対話モデル全 6 件、対数スケール)
対応機能
| gemini-3.1-flash-live | GPT Realtime 2.1 | |
|---|---|---|
| 思考の制御 | 常時オン | - |
| プロンプトキャッシュ | 自動 + 明示 | 自動(暗黙的) |
| キャッシュ保持時間 | 公表なし | 5-10m, up to 1h |
| キャッシュ対象の最小プレフィックス | 4096 トークン | 1024 トークン |
仕様
| gemini-3.1-flash-live | GPT Realtime 2.1 | |
|---|---|---|
| 入力モダリティ | テキスト 画像 音声 動画 | テキスト 音声 |
| 出力モダリティ | テキスト 音声 | テキスト 音声 |
| リリース | 2026-03-26 | 2026-07-06 |
| 知識カットオフ | - | 2024-09 |
| ボイス | Any voice from the Gemini text-to-speech voice set native-audio output models switch languages naturally during a conversation. | - |
| セッション機能 |
|
|
| コンテキストウィンドウ | 131K | 128K |
仕様は各ベンダーのドキュメントから転記しています。ベンダーが公表していない項目は、推測で埋めずに省いています。 出典の一覧: gemini-3.1-flash-live · GPT Realtime 2.1
1 行の変更で切り替え
以下のどのタブにも両方のモデル ID が入っています。書き換えるのはハイライトされた 2 行だけで、エンドポイント、キー、リクエスト形式はすべて同じです。
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=gemini-3.1-flash-live"
# URL = "wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1" # この行のコメントを外し、上の行をコメントアウト
# 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=gemini-3.1-flash-live", {
// const ws = new WebSocket("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1", { // この行のコメントを外し、上の行をコメントアウト
// 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=gemini-3.1-flash-live' <<'EOF'
# 'wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1' <<'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=gemini-3.1-flash-live", h)
// c, _, err := websocket.DefaultDialer.Dial("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1", 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=gemini-3.1-flash-live"), new WebSocket.Listener() {
// .buildAsync(URI.create("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1"), 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);よくある質問
gemini-3.1-flash-live と GPT Realtime 2.1 ではどちらが安いですか?
音声入力 / 100 万トークンは gemini-3.1-flash-live のほうが安くなります($3 対 $32、11 倍の差)。ほかの行では逆になることもあります。料金の全体は上の表に掲載しており、実際のコストは利用の内訳によって変わります。
gemini-3.1-flash-live と GPT Realtime 2.1 の A/B テストは、実装を 2 つ用意せずにできますか?
はい。どちらも同じ OpenAI 互換エンドポイントから 1 つの API キーで利用できます。切り替えはモデル名の文字列を 1 行変えるだけなので、トラフィックの一部をそれぞれに振り分けて、請求額を直接比較できます。
gemini-3.1-flash-live と GPT Realtime 2.1 はプロンプトキャッシュに対応していますか?
当社の価格データでキャッシュ読み取りの料金が設定されているのは、2 つのうち 1 つだけです。料金の記載がないモデルでは、プロバイダーがキャッシュ読み取りに個別の価格を設定していません。