Package-level declarations

Types

Link copied to clipboard
@Serializable
data class LiveAudioConfig(val format: LiveAudioFormat? = null, val output: LiveAudioOutput? = null)

Live audio settings. Only a primary or fork WebSocket accepts format.

Link copied to clipboard
@Serializable
data class LiveAudioFormat(val type: String = "audio/pcm", val rate: Int = 24000)

Raw mono audio encoding for a Live WebSocket.

Link copied to clipboard
@Serializable
data class LiveAudioOutput(val voice: LiveVoice? = null)

Voice settings, selected before startup and immutable afterward.

Link copied to clipboard
@Serializable
data class LiveClientConfig(val dataChannel: LiveDataChannelConfig)

Startup permissions for an untrusted WebRTC frontend. Sideband credentials remain trusted.

Link copied to clipboard
@Serializable
data class LiveDataChannelConfig(val allowedClientEvents: JsonElement? = null, val allowedServerEvents: JsonElement? = null)

Frontend event restrictions. Use "all" or arrays of selectors.

Link copied to clipboard
@Serializable
data class LiveDecisionsConfig(val model: ModelId, val questions: List<DecisionQuestion>)

Model and questions used by Decisions delegation.

Link copied to clipboard
@Serializable
data class LiveDecisionTrigger(val eventType: String, val decisions: LiveDecisionTriggerQuestions)

A Decisions trigger independent of normal delegation.

Link copied to clipboard
@Serializable
data class LiveDecisionTriggerQuestions(val questions: List<DecisionQuestion>)

Questions evaluated by a transcript trigger.

Link copied to clipboard
@Serializable
sealed interface LiveDelegation

Owner of backend work delegated by the Live model.

Link copied to clipboard
@Serializable
data class LiveError(val code: String, val message: String, val type: String, val clientEventId: String? = null, val param: String? = null)

A Live service or protocol error.

Link copied to clipboard
@Serializable(with = LiveEvent.Serializer::class)
data class LiveEvent(val payload: JsonObject)

A Live protocol event retaining all original, including evolving backend-specific, JSON fields.

Link copied to clipboard
@Serializable
data class LiveHistoryItem(val role: String, val content: List<LiveHistoryText>, val id: String? = null, val status: String? = null)

One text-only initial history message.

Link copied to clipboard
@Serializable
data class LiveHistoryText(val text: String, val type: String = "input_text")

A single text part in initial Live history.

Link copied to clipboard
@Serializable
data class LiveResponseReasoning(val effort: Effort? = null, val summary: String? = null)

Reasoning controls for a Responses backend.

Link copied to clipboard
@Serializable
data class LiveResponsesConfig(val model: ModelId, val instructions: String? = null, val maxOutputTokens: Int? = null, val parallelToolCalls: Boolean? = null, val reasoning: LiveResponseReasoning? = null, val serviceTier: String? = null, val text: LiveResponseText? = null, val toolChoice: JsonElement? = null, val tools: List<ResponseToolDefinition>? = null)

Backend configuration for Live Responses delegation.

Link copied to clipboard
@Serializable
data class LiveResponsesDelegationUpdate(val responses: JsonObject? = null, val acknowledgementDelayMs: Int? = null)

Changes a Responses backend on a fork without changing the delegation type.

Link copied to clipboard
@Serializable
data class LiveResponseText(val verbosity: String? = null)

Text output settings for a Responses backend.

Link copied to clipboard
@Serializable
data class LiveSessionConfig(val model: ModelId, val instructions: String? = null, val audio: LiveAudioConfig? = null, val client: LiveClientConfig? = null, val delegation: LiveDelegation? = null, val input: List<LiveHistoryItem>? = null, val store: Boolean? = null, val triggers: List<LiveDecisionTrigger>? = null)

Startup configuration shared by Live media sessions and primary WebSockets.

Link copied to clipboard
@Serializable
data class LiveSessionForkRequest(val transport: LiveTransport, val session: LiveSessionOverrides? = null)

Forks a stored session into a new WebRTC connection.

Link copied to clipboard
@Serializable
data class LiveSessionOverrides(val audio: LiveAudioConfig? = null, val client: LiveClientConfig? = null, val delegation: LiveResponsesDelegationUpdate? = null, val store: Boolean? = null)

Configuration overrides for stored-session forks; the source model is inherited.

Link copied to clipboard
@Serializable
data class LiveSessionReference(val id: String)

Opaque identifier of a Live session.

Link copied to clipboard
@Serializable
data class LiveSessionRequest(val session: LiveSessionConfig, val transport: LiveTransport)

Creates a WebRTC session or an outbound SIP call. SIP requests must not be blindly retried.

Link copied to clipboard
Link copied to clipboard
@Serializable
data class LiveSessionResult(val session: LiveSessionReference, val transport: LiveTransportResult)

Newly created session and its negotiated transport.

Link copied to clipboard
@Serializable
class LiveSipAuthentication(val username: String, val password: String)

SIP Digest credentials. The password is redacted from toString.

Link copied to clipboard
@Serializable
data class LiveSipTrunk(val auth: LiveSipAuthentication, val callerNumber: String, val providerUrl: String)

Outbound SIP trunk configuration. Keep it on the server and avoid logging request bodies.

Link copied to clipboard
@Serializable
sealed interface LiveTransport

WebRTC or SIP settings for creating a Live media session.

Link copied to clipboard
@Serializable
sealed interface LiveTransportResult

Negotiated media transport; outbound SIP credentials are never part of this result.

Link copied to clipboard
@Serializable
data class LiveUsage(val seconds: Double)

Cumulative audio duration for a Live session, separate from delegated model token usage.

Link copied to clipboard
@Serializable(with = LiveVoiceSerializer::class)
sealed interface LiveVoice

A built-in voice name or custom voice reference.

Functions

Link copied to clipboard

Builds a Live media-session request.