Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/realtime-api-with-websocket-workflow-guide.mdA 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.javascriptA 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.pythonA 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.javascriptA 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.javascriptA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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