GPT Realtime vs GPT Realtime 2.1
Quale scegliere e quando — verdetto curato, non una tabella di benchmark
L'input testuale è $4 per milione su entrambi, l'audio $32 in ingresso e $64 in uscita su entrambi, e le letture di cache $0.4 su entrambi; gpt-realtime-2.1 costa di più solo sull'output testuale, $24 contro $16, e quadruplica il contesto di sessione a 128K da 32K. Aggiunge inoltre uno sforzo di ragionamento configurabile e la gestione delle interruzioni al function calling del modello precedente. Scegli gpt-realtime solo per mantenere un'integrazione esistente — su tutto tranne l'output testuale il più recente costa uguale.
Prezzi
| GPT Realtime | GPT Realtime 2.1 | Δ | |
|---|---|---|---|
| Input audio / 1M token | $32 | $32 | = |
| Output audio / 1M token | $64 | $64 | = |
| Lettura cache audio / 1M token | $0.4 | $0.4 | = |
| Input di testo / 1M token | $4 | $4 | = |
| Output di testo / 1M token | $16 | $24 | 0.67× |
| Scrittura in cache | nessun addebito separato | nessun addebito separato | — |
Le tariffe provengono dal catalogo live al momento della build; la pagina di ciascun modello riporta la scheda attuale.
Dove si posizionano — prezzo per 1M di token audio rispetto a tutti gli 6 modelli speech-to-speech in tempo reale con questa unità di fatturazione (scala logaritmica)
Capacità
| GPT Realtime | GPT Realtime 2.1 | |
|---|---|---|
| Prompt caching | implicito (automatico) | implicito (automatico) |
| Durata della cache | 5–10m, up to 1h | 5–10m, up to 1h |
| Prefisso minimo in cache | 1024 token | 1024 token |
Specifiche
| GPT Realtime | GPT Realtime 2.1 | |
|---|---|---|
| Modalità di input | testo audio | testo audio |
| Modalità di output | testo audio | testo audio |
| Rilascio | 2025-08-28 | 2026-07-06 |
| Cutoff di conoscenza | 2023-10 | 2024-09 |
| Funzionalità di sessione |
|
|
| Finestra di contesto | 32K | 128K |
Le specifiche sono trascritte dalla documentazione di ciascun fornitore; una riga che un fornitore non pubblica viene omessa anziché essere dedotta. Fonti complete: GPT Realtime · GPT Realtime 2.1
Passa dall'uno all'altro con una sola riga
Entrambi gli id sono presenti in ogni scheda qui sotto — la coppia di righe evidenziata è l'unica modifica. Stesso endpoint, stessa chiave, stessa struttura della richiesta.
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=gpt-realtime"
# URL = "wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1" # decommenta questa riga, commenta quella sopra
# 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", {
// const ws = new WebSocket("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1", { // decommenta questa riga, commenta quella sopra
// 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' <<'EOF'
# 'wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1' <<'EOF' # decommenta questa riga, commenta quella sopra
{"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", h)
// c, _, err := websocket.DefaultDialer.Dial("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1", h) // decommenta questa riga, commenta quella sopra
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"), new WebSocket.Listener() {
// .buildAsync(URI.create("wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1"), new WebSocket.Listener() { // decommenta questa riga, commenta quella sopra
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);FAQ
Qual è più economico, GPT Realtime o GPT Realtime 2.1?
Riportano lo stesso valore per input audio / 1m token ($32), quindi il prezzo non è decisivo in questo caso — vedi le specifiche e le funzionalità di seguito.
Posso fare un A/B test di GPT Realtime contro GPT Realtime 2.1 senza due integrazioni?
Sì. Entrambi sono serviti tramite lo stesso endpoint compatibile con OpenAI con una singola chiave API — il passaggio richiede la modifica della stringa del modello in una sola riga, quindi puoi instradare una frazione del traffico verso ciascuno e confrontare direttamente le fatture.
GPT Realtime e GPT Realtime 2.1 supportano il prompt caching?
Sì — entrambi fatturano le letture in cache a un prezzo inferiore rispetto alla loro tariffa di input, quindi i carichi di lavoro con warm-prefix costano meno di quanto suggeriscano le tariffe di listino. Le righe esatte per la lettura in cache si trovano nella tabella dei prezzi qui sopra.