openai · OpenAI Platform Docs
Realtime API with WebSocket
Implementation guide for establishing a server-to-server connection to the Realtime API using WebSockets, including authentication via API keys and handling JSON-serialized event streams.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Realtime API with WebSocket
Implementation guide for establishing a server-to-server connection to the Realtime API using WebSockets, including authentication via API keys and handling JSON-serialized event streams.
When To Use
Use when you need to implement a low-level, server-side integration for real-time audio or text streaming using the WebSocket protocol.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/realtime-api-with-websocket-workflow-guide.md | A guide explaining how to connect to the OpenAI Realtime API using WebSockets for server-to-server applications. | Questions about a guide explaining how to connect to the OpenAI Realtime API using WebSockets for server-to-server applications. |
examples/realtime-api-with-websocket-openai-realtime-api-websocket-javascript-con.javascript | A JavaScript implementation demonstrating how to establish a WebSocket connection to the OpenAI Realtime API using the ws library. | Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to establish a WebSocket connection to the OpenAI Realtime API using th... |
examples/realtime-api-with-websocket-openai-realtime-api-websocket.python | A Python script using the websocket-client library to establish a connection to the OpenAI Realtime API. | Exact payloads, commands, or snippets shown in A Python script using the websocket-client library to establish a connection to the OpenAI Realtime API. |
examples/realtime-api-with-websocket-openai-realtime-api-websocket-javascript-con-2.javascript | A JavaScript implementation demonstrating how to establish a WebSocket connection to the OpenAI Realtime API using a client-side environment. | Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to establish a WebSocket connection to the OpenAI Realtime API using a... |
examples/realtime-api-with-websocket-openai-realtime-api-websocket-javascript-con-3.javascript | A JavaScript implementation demonstrating how to establish a WebSocket connection to the OpenAI Realtime API using a Bearer token. | Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to establish a WebSocket connection to the OpenAI Realtime API using a... |
What This Skill Covers
- WebSockets are a broadly supported API for realtime data transfer, and a great choice for connecting to the OpenAI Realtime API in server-to-server applicati...
- Main sections:
Connect via WebSocket,Sending and receiving events.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/realtime-websocket.md
