In short.
This guide introduces OpenAI's Realtime API to developers building conversational voice agents, but its short example does not cover a complete application. It explains direct audio interaction, conversation state and tool calls, with browser connections over WebRTC and server connections over WebSocket. The JavaScript example uses @openai/agents/realtime and names gpt-realtime-2.1. The page also explains temporary credentials, safety identifiers and beta-to-GA migration. Pricing, SDK version requirements, reuse rights and measured performance are unknown from this page. No code was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete supplied page at [https://developers.openai.com/api/docs/guides/realtime.md], including its example and any licence or notices present in that text; no explicit licence or reuse notice appears. Linked pages, SDK source, other folders and external terms are excluded. No code was executed, and connection behavior, audio performance, tool behavior and deployment suitability were not tested.
The overview
Identity
Getting started with the Realtime API is an OpenAI developer guide for building speech-to-speech voice agents. The selected resource is the page at [https://developers.openai.com/api/docs/guides/realtime.md]. It starts with the Agents SDK and directs readers to separate references for lower-level connections and specialized audio workflows.
Assessment
The guide is useful for understanding the basic architecture and creating a minimal voice session. Its strongest practical details are the separation between agent logic and audio transport, the server-to-browser credential flow and the concrete GA migration changes. It does not provide a complete application, a troubleshooting walkthrough or performance measurements.
Who it is for
The main audience is developers building conversational voice applications, especially browser applications using JavaScript. Developers maintaining beta Realtime integrations also get actionable migration guidance. Beginners can follow the overall flow, but the example assumes familiarity with package imports, asynchronous JavaScript, environment variables and communication between a frontend and server.
Capabilities covered
The page describes a model that works directly with audio, retains conversation state and calls tools. It positions Realtime for natural turn taking, interruptions while the agent is speaking, low delay before the first audio response and tool use during conversations. These are documented capabilities and intended uses; the page supplies no measured latency or reliability results.
It also says tools, handoffs and guardrails can be attached to RealtimeAgent, while RealtimeSession handles the connection and audio transport. Their detailed configuration is not demonstrated.
Using it
Requirements
The example requires access to @openai/agents/realtime, an ephemeral API credential and a runtime that supports its JavaScript imports. The documented browser architecture needs an application server to create the temporary credential and a frontend to establish the session.
The page does not specify package versions, supported browsers, runtime versions, account eligibility or rate limits. The snippet reads OPENAI_REALTIME_EPHEMERAL_KEY through process.env; it does not show how a browser frontend receives the credential.
How it works
The application server first creates a temporary client secret. The frontend then creates a RealtimeSession and connects using that secret. The guide describes WebRTC for browser connections and WebSocket for server connections. Within the session, the agent handles audio turns, tools, interruptions and handoffs.
Agent instructions and business logic belong in the agent definition; audio transport belongs in the session layer. For applications identifying individual users, the guide recommends a stable, privacy-preserving safety identifier. With ephemeral credentials, it is supplied through the OpenAI-Safety-Identifier header when the server creates the client secret. It must be associated with each session and does not carry over from Responses API requests.
Setup and migration
For the documented SDK path, obtain an ephemeral credential from the application server, import RealtimeAgent and RealtimeSession, define the agent, create its session and call session.connect with the credential. The GA endpoint for creating client secrets is POST /v1/realtime/client_secrets; WebRTC session establishment uses /v1/realtime/calls. The page links to connection guides but does not include the server implementation.
Existing beta integrations are instructed to remove the OpenAI-Beta: realtime=v1 header and update session and event structures. Specific changes include setting session.type, placing output audio configuration under session.audio.output and adopting event names such as response.output_text.delta, response.output_audio.delta and response.output_audio_transcript.delta.
Example
The JavaScript example reads OPENAI_REALTIME_EPHEMERAL_KEY and throws an error if it is absent. It creates a RealtimeAgent named Assistant with a short instruction, places it in a RealtimeSession configured with model gpt-realtime-2.1, then awaits session.connect using the temporary key.
This illustrates session creation and connection. It does not include credential generation, a browser interface, tool implementations or error recovery. The example was not executed, so connection success and audio behavior are unassessed.
Assessment & evidence
Limitations
This is a starting guide with links to further documentation. It does not establish supported languages, audio quality, concurrency limits, session duration limits, accessibility behavior or handling of poor network conditions. Turn detection, server controls, tool configuration and prompting are delegated to linked pages.
There are no benchmarks or application results in the supplied evidence. Claims about responsiveness and conversational behavior cannot be translated into a latency guarantee or deployment-readiness conclusion.
Fit for a project
The documented approach fits projects where spoken interaction, interruption handling and tools within a conversation are central requirements. Its agent-and-session structure gives developers a clear place for business logic and a separate place for connection handling.
The guide alone is insufficient for choosing an architecture on price, measured latency or operational reliability. Those decisions need information and application measurements that this page does not provide.
Related approaches
The page directs developers needing full-duplex conversations with a separate delegated backend to GPT-Live [https://developers.openai.com/api/docs/guides/live]. For comparing voice architectures and chained pipelines, it points to Voice agents [https://developers.openai.com/api/docs/guides/voice-agents].
For narrower audio tasks, it points to live transcription for captions, file transcription for recordings and live translation for continuous translation. These linked resources were not assessed, so their requirements, costs and comparative performance remain unknown.
Evidence
The evidence is the captured OpenAI documentation page at [https://developers.openai.com/api/docs/guides/realtime.md], including its JavaScript example, connection overview, safety-identifier instructions and migration notes. Statements about API behavior come from that documentation; no independent measurements or execution results are available.
The source was captured on 12 November 2026 at 17:14:20.297 UTC. Its recorded source revision is sha256:4bce5b91c49271cc47a683257ae174df0085021f37059ddacc0404741f2c9f61.
Access & freshness
Costs
The selected page provides no prices, billing units, included allowances or session cost estimates. It links to a separate cost-optimization guide concerning accounting and caching, whose contents are outside this resource. API usage costs and the cost of operating the supporting server remain unknown.
Rights and terms
The supplied page contains no explicit licence or reuse notice for its prose or example code. Permission to redistribute the page or reuse the example is therefore not established by this evidence. SDK licensing, API service terms and audio-data handling terms are also not established here.
Freshness
The captured page presents the GA interface as the path for new work and directs beta integrations to migrate. Its sample names gpt-realtime-2.1, but no SDK release number, publication date or last-updated date appears in the supplied text.
The capture date establishes when this documentation snapshot was obtained. Current model availability, endpoint compatibility and package compatibility beyond that snapshot were not verified.
Practical next steps
For a browser voice agent, begin with the server-created temporary credential and the minimal RealtimeAgent and RealtimeSession example. Use the linked WebRTC documentation to fill in browser connection details, or the WebSocket documentation for a server connection.
Before committing to an implementation, establish current SDK requirements, API pricing and applicable terms. Validate credential delivery, audio turns, interruptions and tool behavior in the intended application. For an existing beta integration, apply the documented GA changes and verify the updated event handling.
