View Source OpenAi.Realtime (OpenAI REST API Client v1.0.0)

Provides API endpoints related to realtime

Summary

Functions

Create an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the session.update client event.

Create an ephemeral API token for use in client-side applications with the Realtime API specifically for realtime transcriptions. Can be configured with the same session parameters as the transcription_session.update client event.

Functions

Link to this function

create_realtime_session(body, opts \\ [])

View Source
@spec create_realtime_session(
  body :: OpenAi.Realtime.Session.CreateRequest.t(),
  opts :: keyword()
) ::
  {:ok, OpenAi.Realtime.Session.CreateResponse.t()}
  | {:error, OpenAi.Error.error()}

Create an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the session.update client event.

It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API.

Link to this function

create_realtime_transcription_session(body, opts \\ [])

View Source
@spec create_realtime_transcription_session(
  body :: OpenAi.Realtime.TranscriptionSession.CreateRequest.t(),
  opts :: keyword()
) ::
  {:ok, OpenAi.Realtime.TranscriptionSession.CreateResponse.t()}
  | {:error, OpenAi.Error.error()}

Create an ephemeral API token for use in client-side applications with the Realtime API specifically for realtime transcriptions. Can be configured with the same session parameters as the transcription_session.update client event.

It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API.