OpenAI Realtime
OpenAIRealtime is the engine wrapper for OpenAI’s Realtime API — a single WebSocket session that handles speech-in, reasoning, and speech-out, with sub-500 ms typical turn latency.
For the basic engine=OpenAIRealtime(...) quickstart, see Engines. This page documents the full configuration surface: every supported model, the streaming transcription options, and the new reasoning_effort tier.
Models
Pass any of these tomodel= on OpenAIRealtime(...). Pricing is auto-resolved per model from DEFAULT_PRICING — no manual override is required (see Metrics).
The same identifiers are exposed as a
StrEnum for editor autocomplete:
gpt-realtime-translate is intentionally not supported by Patter’s Realtime engine. It lives on a different OpenAI endpoint (/v1/realtime/translations), does not accept tool calls or response.create, and would invalidate the Agent contract Patter exposes. Real-time translation, if added, will land as a dedicated feature — not as a Realtime model variant.Reasoning effort
gpt-realtime-2 accepts a configurable reasoning tier. Patter exposes it as the reasoning_effort constructor argument on the lower-level OpenAIRealtimeAdapter:
When set, Patter injects
session.reasoning = { effort: ... } into the session.update payload. When omitted, the field is not sent and OpenAI’s server default applies. The field is a no-op on models that ignore it (for example gpt-realtime-mini), so it’s safe to leave configured across model swaps.
Streaming transcription
The Realtime session can run an inline Whisper-family model on inbound audio so you get text deltas alongside the conversation. The model is set viainput_audio_transcription_model:
Same enum form:
Speakerphone noise & turn detection
The samenoise_reduction and turn_detection knobs documented on the OpenAI Realtime 2 page are accepted by OpenAIRealtime(...) too — they reach the beta adapter, which emits input_audio_noise_reduction at the top level of the session (the GA adapter nests it under session.audio.input):
None / omitting either field preserves today’s behaviour exactly. See the Realtime 2 reference for the full RealtimeTurnDetection field table.
Worked example — gpt-realtime-2 with low reasoning + streaming whisper
Constructing the lower-level OpenAIRealtimeAdapter directly gives access to every field. This is what OpenAIRealtime(engine=...) builds under the hood; reach for it when you need reasoning_effort or a non-default transcription model.
Since 0.6.2 you can pass
reasoning_effort and input_audio_transcription_model directly to the engine wrapper — OpenAIRealtime(model="gpt-realtime-2", reasoning_effort="low", input_audio_transcription_model="gpt-realtime-whisper"). Reach for the lower-level OpenAIRealtimeAdapter only when you need every field (custom VAD type, modalities, silence_duration_ms, etc.). For the GA gpt-realtime-2 endpoint, prefer the dedicated OpenAIRealtime2 marker — it dispatches to a separate adapter that handles the GA-shape session.update wire format automatically.Backward compatibility
- Defaults are unchanged:
model="gpt-realtime-mini",input_audio_transcription_model="whisper-1",reasoning_effort=None. - All existing
OpenAIRealtime(...)constructions keep working without code changes. - Pricing for new models is added under
DEFAULT_PRICING["openai_realtime"].models[...]. The earlierPatter(pricing={"openai_realtime": DEFAULT_PRICING["openai_realtime_2"]})workaround is no longer needed — just construct withmodel="gpt-realtime-2".
What’s Next
Engines
All engine classes side by side.
Metrics
Per-call cost breakdown and the model-aware pricing table.
Agents
Configure system prompts, tools, and first messages.
Tools
Function calling inside a Realtime session.

