Skip to main content

Module realtime

Module realtime 

Source
Expand description

The Realtime API (HTTP part): create ephemeral client sessions via /realtime.

![warn] This module is untested! If you encounter any issues, please report them on the repository.

The Realtime API’s primary transport is WebSocket, which this crate does not implement. The two HTTP endpoints here create the short-lived session tokens a browser or mobile client uses to open that WebSocket connection, so they can be issued from a backend without exposing the API key. See the OpenAI Realtime guide.

The session configuration (modalities, voice, tools, turn detection, …) is passed through as raw JSON, because it changes frequently and only matters to the WebSocket client consuming it.

Modules§

transcription_sessions
Create a Realtime transcription session via POST /realtime/transcription_sessions.

Structs§

CreateRealtimeSessionRequest
Creates a Realtime session via POST /realtime/sessions.
RealtimeClientSecret
A client secret of a Realtime session.
RealtimeSession
The response of a Realtime session creation.