Explainer
Gemini Live API vs OpenAI Realtime API: How Sessions, Events and Audio Differ
A developer explainer on where Google's Gemini Live API and OpenAI's Realtime API disagree on connection setup, event names, audio formats, turn detection and tool calls, and how to wrap one interface over both.
Updated November 10, 2026 · Based on 9 sources · How we research
If you have shipped a voice agent on OpenAI's Realtime API and you are pricing out Google's Gemini Live API because the per-minute math looks better, you are about to discover the two are not drop-in replacements. Both open a persistent socket and stream speech in and speech out, so the elevator pitch matches. Underneath, the event names, the sample rates, the turn-detection model and the tool-call lifecycle are different. Teams that treat them as interchangeable end up with clipped audio at interruptions, stalled tool calls and silent disconnects at the ten-minute mark. This guide walks the differences a line at a time and shows how teams wrap one interface around both so swapping providers is a configuration change, not a rewrite.
Why do the two APIs look similar but not swap cleanly?
Both APIs give you a persistent duplex connection with speech in, speech out, text transcripts, tool calls and barge-in. That is the surface. OpenAI documents three connection types for its Realtime API: WebRTC, WebSocket and SIP, with WebRTC handling media buffering and truncation server-side (OpenAI Realtime conversations). Google's Gemini Live API is WebSocket only, a bidirectional stream against `BidiGenerateContent` (Gemini Live API get-started).
The implication for porting work is that if your existing OpenAI integration leans on WebRTC for media handling, moving to Gemini means picking up jitter buffering, playback-position tracking and interruption bookkeeping yourself. A third-party comparison from Micdrop recommends OpenAI Realtime for tool-heavy agents because of its MCP support and single 60-minute session, and Gemini Live when per-minute cost dominates at roughly one-quarter the price (Micdrop). RankGrids ranks both at the top of the Best Speech To Speech AI APIs 2026 list, with OpenAI gpt-realtime-2.1 at rank 1 and Google Gemini 3.8 Live at rank 5, with integration and reliability scores favoring OpenAI even though Gemini 3.8 Live lists at 0.023 dollars per minute against OpenAI's 0.10 dollars per minute.
Connection and session setup: the first message is not the same shape
OpenAI's WebSocket endpoint is `wss://api.openai.com/v1/realtime`. You can open it, start streaming audio and the model will respond using the session defaults: `pcm16` input and output at 24 kHz, the configured default voice, server VAD on, and a 60-minute cap (OpenAI Realtime conversations). To change anything, send a `session.update` event with the fields you want.
Gemini's endpoint is `wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent?key=YOUR_API_KEY`, or the Constrained variant with an ephemeral `access_token` (Gemini Live API get-started). The first message is not optional: it must be a `BidiGenerateContentSetup` envelope with `model`, `responseModalities` (for example `["AUDIO"]`), optional `systemInstruction`, `speechConfig`, `realtimeInputConfig` for VAD and `thinkingConfig` for reasoning depth. Everything after that is wrapped in `realtimeInput`, `clientContent`, or `toolResponse` messages. There is no flat `session.update`; the setup message is single-shot.
Event names: there is no one-to-one mapping
Neither side published a Rosetta Stone. The pragmatic mapping developers have reverse-engineered looks like this, with caveats that it is lossy in places because the semantics do not line up (Zylos adapter research).
| OpenAI Realtime | Gemini Live | Notes |
|---|---|---|
| `session.update` | `setup` (first message only) | Gemini configures once at open; OpenAI accepts re-configuration mid-session |
| `input_audio_buffer.append` | `realtimeInput` with `audio` | Payload is base64 PCM16 on both |
| `input_audio_buffer.commit` | No direct equivalent | Gemini relies on VAD or `activityEnd` |
| `input_audio_buffer.speech_started/stopped` | `activityStart/activityEnd` (manual) or VAD signal | Different triggering model |
| `response.output_audio.delta` | `serverContent.modelTurn.parts[].inlineData` | Different sample rates, covered below |
| `response.output_text.delta` | `serverContent.outputTranscription` | Transcript framing differs |
| `response.function_call_arguments.done` | `toolCall` | Gemini's can fire while audio is still streaming |
| `conversation.item.truncate` | Client-side only; Gemini sends `serverContent.interrupted` | Opposite directions |
| `response.done` | `serverContent.turnComplete` | Firing semantics do not match exactly |
Audio formats do not line up, and the fix is resampling
The Gemini Live API's input is raw 16-bit PCM at 16 kHz, little-endian, with MIME type `audio/pcm;rate=16000`; output is 24 kHz PCM (Gemini Live API get-started). The API will accept other input sample rates and resample server-side, but if you are building for latency you want to send 16 kHz directly.
OpenAI's Realtime API defaults to 24 kHz PCM16 mono in both directions (OpenAI Realtime conversations). An OpenAI capture pipeline that is already emitting 24 kHz has to be downsampled to 16 kHz before it hits Gemini. Naive 3:2 decimation introduces aliasing; the correct approach is band-limited resampling with a low-pass filter at the target Nyquist frequency before decimation (Zylos adapter research). If you are going the other way, 48 kHz microphone capture to Gemini, staged conversion (48 to 24 to 16) is safer than a single filter because each stage introduces less passband ripple.
Output does not need conversion: both APIs emit 24 kHz PCM, which lines up with most browser and SIP playback pipelines.
Turn detection is server-declarative on Gemini and client-coordinated on OpenAI
OpenAI's VAD ships in two flavors. `server_vad` is energy-based with `threshold`, `prefix_padding_ms` and `silence_duration_ms`, plus the newer `create_response` and `interrupt_response` knobs. `semantic_vad` is model-judged with an `eagerness` parameter (`low`, `high`, or `auto`, where `auto` maps to a medium setting) that tunes how readily the model cuts a user off (OpenAI Realtime VAD). When a user interrupts, the client is responsible for telling the server exactly how much audio was played by sending `conversation.item.truncate` with `item_id`, `content_index` and `audio_end_ms` in milliseconds (OpenAI Realtime conversations).
Gemini's automatic VAD exposes `startOfSpeechSensitivity` and `endOfSpeechSensitivity` (`LOW`, `MEDIUM`, `HIGH`) plus `prefixPaddingMs` and `silenceDurationMs` (Gemini Live capabilities). You can also turn it off by setting `automaticActivityDetection.disabled` and manually emit `activityStart` and `activityEnd`. Interruption is server-declarative: the server unilaterally sets an `interrupted` flag and the client just drains its playback queue. There is no mechanism to tell Gemini how many milliseconds of its last turn the user actually heard. Adapters that want parity with OpenAI must track local playback position independently.
Tool calling: synchronous wait on OpenAI, non-blocking by default on Gemini
OpenAI's tool-call cycle is a three-step dance: the model emits a `function_call` with a `call_id`, your client runs the function, you post a `function_call_output` conversation item with the same `call_id`, then you send `response.create` to resume (OpenAI Realtime client events). The model is silent during the tool round-trip.
Gemini Live is different: on `gemini-3.8-live`, function calling defaults to `NON_BLOCKING` so the model keeps talking while the tool runs in the background and patches results in later (Gemini Live capabilities). The upside is a more natural rhythm on long-running tools. The downside is that an adapter assuming OpenAI's block-until-tool-returns semantics will either stall waiting for a turn that was never going to block, or mishandle audio that keeps streaming past a still-pending tool call. You can force `BLOCKING` mode per call if you need OpenAI-shaped behavior. The extended-thinking variant of Gemini 3.8 Live only supports `NON_BLOCKING`.
OpenAI additionally supports remote MCP servers directly inside a Realtime session so the tool call runs server-side and bypasses your infrastructure altogether (Micdrop). Gemini does not have the equivalent today; you still ship the tool loop to your own worker.
Session limits and resumption are different problems
OpenAI caps a single Realtime session at 60 minutes (OpenAI Realtime conversations). For most inbound support calls that is more than enough, but for long campaign calls or AI companion sessions you need to stitch multiple sessions together on your side.
Gemini's limits are tighter per connection but flexible across them. Audio-only sessions top out at 15 minutes (Gemini Live capabilities), and individual WebSocket connections last about 10 minutes before the server cycles them (Micdrop). Session resumption returns a handle valid for two hours that lets you reopen the session on a new connection without losing conversation state. Context window is 131K tokens on the current Gemini 3.8 Live model and 128K tokens on OpenAI's gpt-realtime-2.1 per the specs on the OpenAI gpt-realtime-2.1 page and Google Gemini 3.8 Live page.
If your product has calls that regularly exceed 10 minutes, the Gemini side needs explicit resumption logic and the OpenAI side does not. If calls exceed 60 minutes, both need it.
Wrapping one interface over both: what teams actually ship
There are three paths. The first is to build a thin adapter that normalizes one API to the surface of the other. Most teams pick the OpenAI surface as the target because it has more public documentation and more existing client code. The adapter translates `session.update` to a `BidiGenerateContentSetup` at connect time, synthesizes `speech_started` and `speech_stopped` from Gemini's VAD or runs a local VAD as fallback, buffers transcription deltas to look like OpenAI's framing, resamples audio and translates tool calls (Zylos adapter research).
The second is to pick up Pipecat. Pipecat's processor model wraps both OpenAI Realtime and Gemini Live as speech-to-speech services behind a common Frame-based pipeline, alongside STT-LLM-TTS cascades (Forasoft Pipecat vs LiveKit). Swapping providers is roughly a one-line service change because the frames entering and leaving the processor are the same shape. Pipecat transports are also agnostic: the same pipeline runs on Daily, raw WebSocket, Twilio or LiveKit's audio-only mode.
The third is LiveKit Agents with its provider plugins (LiveKit OpenAI plugin). LiveKit handles the media transport (WebRTC to end users, PSTN via SIP providers) and the agent framework handles the provider glue. You configure the provider as a plugin and the rest of the agent code does not change when you flip it.
Worth noting: Inworld AI Realtime API ships explicit OpenAI Realtime protocol compatibility, so clients that already speak OpenAI's event shape can hit Inworld without modification. That is the exception; most providers invent their own event names and leave the glue to you or to Pipecat and LiveKit.
What actually breaks when you flip one API for the other
The failure modes cluster in a few places. Audio arriving at the wrong sample rate sounds harsh and sometimes degrades speech recognition on the Gemini side because the resampler has to clean up aliasing. Interruptions produce clipped words at the start of the agent's next turn when the adapter is not tracking local playback position. Tool calls stall when you assume OpenAI semantics on Gemini, or produce jarring overlapping audio when you do not expect Gemini's model to keep talking during a background tool. Sessions drop silently at 10 minutes on Gemini when you forget resumption. And thinking budget has no OpenAI analog: Gemini's `thinkingConfig` adds latency to time-to-first-audio and some model versions leak thinking content into responses even with `thinking_budget=0`, so adapters defensively filter (Zylos adapter research).
The reasonable rule: do not try to make the two APIs identical. Make the parts of your app that do not care about provider truly not care, and quarantine the parts that do.
The short version
The APIs look alike at the pitch level and diverge the moment you open a socket. OpenAI's Realtime API is the pick when you want the fewest surprises, SIP trunking in the box and a 60-minute session you can mostly ignore: that is why OpenAI gpt-realtime-2.1 ranks first on the Best Speech To Speech AI APIs 2026 list. Gemini Live is the pick when per-minute cost dominates and your team is willing to own resampling, resumption and the server-declarative interruption model: Gemini 3.8 Live at 0.023 dollars per minute and Gemini 2.0 Flash Live at 0.016 dollars per minute run at a fraction of OpenAI's 0.10 dollars per minute. If you want to run both or keep the option open, do not hand-roll two client stacks. Pick Pipecat or LiveKit Agents, or build a thin OpenAI-shaped adapter in front of Gemini, and keep your application code on one surface.
See Best Speech To Speech AI APIs 2026Questions people ask
How is the Gemini Live API different from the OpenAI Realtime API?+
Gemini Live is WebSocket only and configured by a one-shot `BidiGenerateContentSetup` message, with 16 kHz PCM16 input and 24 kHz output, server-declarative interruption via an `interrupted` flag, non-blocking tool calls by default, and about a 10-minute per-connection window backed by a two-hour resumption handle. OpenAI's Realtime API supports WebRTC, WebSocket and SIP, defaults to 24 kHz PCM16 both ways, uses `session.update` plus mid-session re-configuration, expects the client to send `conversation.item.truncate` with `audio_end_ms` on interruption, treats tool calls as synchronous, and caps sessions at 60 minutes.
Can I switch from OpenAI Realtime to Gemini Live without rewriting my app?+
Not without either an adapter in the middle or a framework like Pipecat or LiveKit Agents that already abstracts both. The event names, the audio sample rate on the input side, the tool-call lifecycle, the interruption model and the session-length math are all different. The adapter work is usually a few weeks of careful audio and state-management code; the easier path is to run your app on a framework whose speech-to-speech service is a swap-in configuration.
How do I support several realtime voice providers in one codebase?+
Pipecat is the common answer for Python teams because its processor model normalizes OpenAI Realtime, Gemini Live and STT-LLM-TTS cascades behind the same Frame interface, with transports for WebSocket, Daily, Twilio and LiveKit. LiveKit Agents is the answer when you want WebRTC and SIP ingress to be handled too. If neither fits, build a thin adapter that exposes the OpenAI Realtime event surface and translates it to Gemini underneath, which is the direction most third-party adapters go because OpenAI's surface is better documented.
Does Gemini Live support SIP trunking for phone calls?+
No. The current Gemini Live API does not ship native SIP trunking. For telephony you either bridge through a provider like Twilio, Telnyx or LiveKit SIP, or you pick an API that has SIP in the box. OpenAI's Realtime API supports SIP as a native connection type. Among providers ranked on Best Speech To Speech AI APIs 2026, OpenAI gpt-realtime-2.1 and Microsoft Azure AI Voice Live include native SIP; Gemini 3.8 Live and Gemini 2.0 Flash Live do not.
Which has lower latency, Gemini Live or OpenAI Realtime?+
It depends on which Gemini model and which region. Per the specs on the Gemini 2.0 Flash Live page, Gemini 3.8 Live page and OpenAI gpt-realtime-2.1 page, Gemini 2.0 Flash Live is listed at around 150 ms end-to-end, Gemini 3.8 Live at around 600 ms, and OpenAI gpt-realtime-2.1 at around 320 ms p95. Latency also depends on your `thinkingConfig` on the Gemini side; raising the thinking budget directly delays time-to-first-audio.
Do the two APIs share any event names?+
No. The naming conventions are entirely separate. OpenAI uses dotted names like `input_audio_buffer.append` and `response.output_audio.delta`. Gemini uses nested camelCase under envelopes like `realtimeInput`, `serverContent.modelTurn` and `toolCall`. Any adapter has to translate names and in several cases also re-segment or synthesize events that the other side does not emit at all.
Sources
What this guide is based on. We research from published specifications, independent reviews and owner reports; we did not test these products ourselves.
- 1.Get started with Gemini Live API using WebSockets, Google AI for Developers
- 2.Live API capabilities guide, Google AI for Developers
- 3.Realtime conversations, OpenAI
- 4.Voice activity detection (VAD), OpenAI
- 5.Realtime client events, OpenAI
- 6.GPT-Live vs GPT-Realtime-2 vs Gemini Live in 2026, Micdrop
- 7.Cross-Provider Realtime Voice: Adapting Gemini Live to the OpenAI Realtime Surface, Zylos
- 8.Pipecat vs LiveKit Agents vs OpenAI Agents SDK (2026), Forasoft
- 9.OpenAI Realtime API plugin guide, LiveKit
Products mentioned
More on speech to speech ai apis
Explainer
What Realtime Voice APIs Cost per Minute of Conversation
A token-by-token breakdown of what a real conversation minute costs on OpenAI Realtime, Gemini Live, ElevenLabs Agents, Hume EVI 3, Azure Voice Live and the rest, plus the formula to estimate your bill before you ship.
Explainer
Voice Agent Latency Explained: Where the Delay Comes From and What Feels Natural
A plain breakdown of voice agent latency: network, buffering, turn detection, LLM and TTS, with the delays people notice and the levers that actually shorten reply time.
Explainer
Speech-to-Speech Models vs an STT, LLM and TTS Pipeline: The Real Trade-offs
Native speech-to-speech models vs cascaded STT, LLM and TTS pipelines on latency, naturalness, control, debugging, compliance and cost. Pick the architecture before the vendor.
Explainer
Real-Time vs Turn-Based Voice Agents: Which Design Fits Your Product
A plain look at streaming full-duplex voice agents against turn-based ones, what each costs in latency, accuracy and money, and which design fits the product you are building.
Buying guide
How to Choose a Speech-to-Speech API for a Voice Agent
The real differences between realtime voice APIs for builders: latency, interruptions, SIP telephony, tool calling, voices, and price per conversation minute.


