GPT Realtime 2.1
Provider list prices: no platform markup, pay-as-you-go. These are official list prices. Logged-in customers may see effective prices including workspace discounts on /console/pricing. Effective input at a 70% cache-hit rate:$1.48/M. Automatic prefix caching once a prompt passes the minimum length, with no code changes; cached reads are discounted (up to 90% on current models) and there is no write fee.
Use GPT Realtime 2.1 in 30 seconds
OpenAI Realtime-compatible: connect over WebSocket and stream audio in, audio out. WS /v1/realtime
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1"
HEADERS = {"Authorization": "Bearer sk-syn-...", "OpenAI-Beta": "realtime=v1"}
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": {"modalities": ["audio", "text"], "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", {
headers: { Authorization: "Bearer sk-syn-...", "OpenAI-Beta": "realtime=v1" },
});
ws.on("open", () => {
// configure the speech-to-speech session
ws.send(JSON.stringify({ type: "session.update", session: { modalities: ["audio", "text"], 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-...' -H 'OpenAI-Beta: realtime=v1' \
'wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1' <<'EOF'
{"type":"session.update","session":{"modalities":["audio","text"],"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-...")
h.Set("OpenAI-Beta", "realtime=v1")
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{"modalities": []string{"audio", "text"}, "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-...")
.header("OpenAI-Beta", "realtime=v1")
.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\":{\"modalities\":[\"audio\",\"text\"],\"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);About GPT Realtime 2.1
GPT Realtime 2.1 is the flagship of OpenAI's realtime speech-to-speech family, announced as an updated realtime reasoning model with improved alphanumeric recognition, silence and noise handling, and interruption behavior.
- It expands the family to a 128K-token context window with 32K max output tokens, and supports configurable reasoning effort, instruction following, and tool use for complex voice-agent workflows.
- Audio and text tokens are billed at separate per-token rates, with discounted cached input.
- On Synthorai it is served through the OpenAI-compatible /v1/realtime WebSocket endpoint, so applications built on the official Realtime SDKs work unchanged.
Specs & limits
| Max output (vendor spec) | 32,000 |
| Modalities | audio + text → audio + text |
| Features | realtime · speech-to-speech |
| Notable | Updated realtime reasoning model with improved alphanumeric recognition, silence and noise handling, and interruption behavior; configurable reasoning effort and tool use for voice-agent workflows; 128k context. |
| Prompt caching | automatic · min 1,024-token prefix · TTL 5–10m, up to 1h |
FAQ
Is the GPT Realtime 2.1 API free to try?
GPT Realtime 2.1 is currently in invited beta: access is application-based rather than open signup. Apply from the Synthorai console; once approved, standard pay-as-you-go pricing applies with no subscription.
What is GPT Realtime 2.1 best at?
Flagship realtime tier for production voice agents, plus improved interruption, noise, and alphanumeric handling and configurable reasoning effort with tool use. See the About section for the full picture from the vendor's own release notes.
How much does GPT Realtime 2.1 cost?
GPT Realtime 2.1 costs $4 per million input tokens and $24 per million output tokens on Synthorai. That is the provider's list price, with no platform markup. Cached input tokens bill at $0.4/M.
How do I connect to the GPT Realtime 2.1 API?
GPT Realtime 2.1 is a speech-to-speech model: connect over WebSocket to wss://synthorai.io/v1/realtime?model=gpt-realtime-2.1 with the OpenAI Realtime SDK (or a raw WebSocket) and stream audio in, audio out. It is not a POST /v1/audio/transcriptions file upload. Authenticate with your sk-syn key and mirror the OpenAI-Beta header.
How do I get access to GPT Realtime 2.1?
GPT Realtime 2.1 is in invited beta: request access from the Synthorai console. Once approved it works like every other model: point your OpenAI SDK at base_url="https://synthorai.io/v1" and set model="gpt-realtime-2.1".