Skip to main content
The Opper Realtime API is a bidirectional WebSocket protocol — it can’t be fully represented in OpenAPI, so this page documents the event vocabulary. For the end-to-end journey (authentication, session lifecycle, tool flow, per-provider notes, billing), see the Realtime voice guide.

Connection

Two authentication paths are accepted on the upgrade request:
  • Server-side (bearer token): Authorization: Bearer <project-scoped runtime API key>.
  • Browser (ephemeral ticket): Sec-WebSocket-Protocol: opper-ticket.<value> subprotocol header (recommended), or ?ticket=<value> query parameter (fallback — bearer credentials in URLs end up in access logs). Tickets are minted by POST /v3/realtime-sessions and are single-use.
Successful upgrade returns 101 Switching Protocols. The first frame the client sends must be session.start.

Client → server events

session.start config

Server → client events

Termination codes

session.terminating.error.code is a closed set; you can enumerate against it:

Sample payloads

Every event is a JSON object over a text WebSocket frame. Field shapes below are the source of truth for client implementations and agent code generation — match these exactly.

Client → server

session.start
session.update
audio.append
text.input
tool.result

Server → client

session.started
audio.delta
text.delta
transcript.committed
speech.started
response.started
tool.call
session.terminating
error

Preflight rejections

Before the WebSocket upgrade, the endpoint returns standard HTTP status codes:

See also