Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Live

Connect
WebSocket
/live/sessions
Create session
client.Live.New(ctx, body) (*LiveNewResponse, error)
POST
/live/sessions
Models
type AudioFormatUnion interface{…}

Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.

type BuiltInVoice string

A built-in voice available for Live speech.

type ClientConfig struct{…}

Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.

type ClientDelegation struct{…}

Delegate tasks to your application. The Live session emits delegation events that your backend handles.

type ClientEventUnion interface{…}

Client events for Live. Initialize a primary WebSocket with session.start and wait for session.started. WebRTC creation already starts the session. Audio append is primary WebSocket-only. See the Live prompting guide before writing frontend instructions and delegation policies.

type CommentaryAppendEvent struct{…}

Provide context the Live model can communicate to the user, optionally for an existing client delegation. Rejected while an audio fixture is active.

type CommentaryAppendedEvent struct{…}

Returned when a session.commentary.append command is accepted into the Live session timeline. Acknowledges the added commentary without guaranteeing exact wording or completed audio playback.

type CustomVoice struct{…}
type DataChannelConfig struct{…}

Control which Live events an untrusted WebRTC frontend can send and receive over its data channel. These restrictions do not apply to trusted sideband connections.

type Decision struct{…}
type DecisionCreateEvent struct{…}

Evaluate the configured questions using the current conversation and Decision inputs. Reusing an event_id is rejected for the lifetime of the session.

type DecisionEvent struct{…}

A Decision API event for a Live delegation or transcript trigger. For a trigger, source_event_id identifies the transcript delta that caused this evaluation.

type DecisionItemCreateEvent struct{…}

Append an input item for future decisions without starting an evaluation or changing Live voice context.

type DecisionItemCreatedEvent struct{…}

An input item was appended for future decisions.

type DecisionItemDeleteEvent struct{…}

Delete an input item from future decisions without starting an evaluation or changing Live voice context.

type DecisionItemDeletedEvent struct{…}

An input item was removed from future decisions.

type DecisionTrigger struct{…}
type DecisionsDelegationConfig struct{…}
type DecisionsDelegationUpdateConfig struct{…}
type DelegationCreatedEvent struct{…}

Returned when the Live model delegates work to your application, Responses, or Decisions. Contains delegation metadata and the position on the session timeline where the work was delegated.

type LiveError struct{…}

Details of an error encountered by the Live session, including the affected parameter or client command when available.

type ErrorEvent struct{…}

Reports an error in the Live session, such as an invalid client command. Use error.client_event_id, when present, to identify the command that caused the error.

type ForkSessionConfig struct{…}

Overrides for a stored session after connecting to the fork WebSocket. An empty object inherits the stored configuration; do not supply a new model. audio.format applies only to the new WebSocket connection. client overrides are only supported for WebRTC forks.

type ForkSessionStartEvent struct{…}

Start a Live session after connecting to a stored session’s fork WebSocket. Send an empty session object to use the stored configuration.

type FunctionTool struct{…}

A function tool available to the Responses backend when the Live model delegates a task.

type InfoEvent struct{…}

An informational notice about the Live session, such as the event permissions applied to a frontend data channel.

type InitialItemUnion interface{…}

A developer, user, or assistant message supplied as text history before the Live session starts.

type InputAudioAppendEvent struct{…}

Send audio to a Live session over its primary WebSocket. WebRTC and SIP sessions send audio over their media transport.

type InputAudioMuteEvent struct{…}

Mute audio input to the Live model without closing the session. The server acknowledges with session.input_audio.muted.

type InputAudioMutedEvent struct{…}

Acknowledges a session.input_audio.mute command. An independent input mute sends silence to the model and preserves sideband audio reflection. Fixture playback does not emit this event.

type InputAudioUnmuteEvent struct{…}

Resume audio input to a Live model after muting it. The server acknowledges with session.input_audio.unmuted. An active audio fixture still pauses inference until playback finishes.

type InputAudioUnmutedEvent struct{…}

Acknowledges a session.input_audio.unmute command, removing the independent input mute. An active audio fixture still pauses inference until playback finishes. Fixture playback does not emit this event.

type InputTranscriptDeltaEvent struct{…}

A transcript fragment for user input audio in the Live session. Accumulate fragments in delivery order; these events do not define complete turns or include a transcript-done event.

type InstructionsAppendEvent struct{…}

Append developer instructions to the Live conversation while it is running, optionally associating them with an existing client delegation. Rejected while an audio fixture is active. These instructions remain in conversation history through compaction and are included in future backend delegations. For external audio, describe content already delivered so the assistant does not repeat it.

type InstructionsAppendedEvent struct{…}

Returned when a session.instructions.append command is accepted into the Live session timeline. Acknowledges the appended instructions without guaranteeing that the model has acted on them.

type MediaSessionConfig struct{…}

Startup configuration for a Live media session. Follow the Live prompting guide when writing frontend instructions and the backend prompt under delegation.responses.instructions.

type MediaSessionForkConfig struct{…}

Optional overrides for a stored Live session. Omitted settings are inherited. The model, voice, frontend instructions, and prior conversation come from the stored session. WebRTC negotiates its audio format; audio.format is only supported on WebSocket forks.

type OutputAudioDeltaEvent struct{…}

An audio chunk generated by the Live model. Decode and play primary WebSocket chunks in delivery order using the configured session audio format. Sideband connections receive reflected output audio with timestamps.

type OutputAudioFixturePlayEvent struct{…}

Play one complete audio fixture through the session output. Send this event over the primary WebSocket or a server sideband. Audio must be raw mono PCM16 little-endian at 24 kHz, regardless of the session audio format, and at most 30 seconds. The entire payload is validated before model speech is interrupted and input is muted. Only one fixture can be active. fixture.playing acknowledges acceptance and fixture.played reports server mixer drain. These notifications are not exact transport-media boundaries. Input arriving during playback is dropped and not replayed.

type OutputAudioFixturePlayedEvent struct{…}

The complete audio fixture has drained from the server mixer and normal inference has resumed. Transport buffers may still contain audio; this event does not prove listener-side completion. The optional client_event_id echoes the play command. This event is not emitted for canceled or failed playback.

type OutputAudioFixturePlayingEvent struct{…}

The existing playback path has accepted the validated audio fixture. This acknowledgment does not identify when the listener receives the first sample. The optional client_event_id echoes the play command.

type OutputTranscriptDeltaEvent struct{…}

A transcript fragment for assistant output audio in the Live session. Accumulate fragments in delivery order; these events do not define complete turns or include a transcript-done event.

type ResponseCreateEvent struct{…}

Request a response from the Live session’s Responses backend, or continue a delegated response waiting for tool results. Requires Responses delegation.

type ResponseEvent struct{…}

A streaming Responses API event from a backend delegated to by the Live session. Use the outer delegation_id to associate the nested stream with its Live delegation.

type ResponseItemCreateEvent struct{…}

Add an input item to the Live session’s Responses backend. Requires Responses delegation; use response.create to request a response.

type ResponsesDelegationConfig struct{…}

Model, prompt, and tool settings for tasks delegated by the Live session to a Responses backend.

type ResponsesDelegationUpdateConfig struct{…}

Updates to the Responses backend of an existing Live session. Omitted settings retain their current values.

type ServerEventUnion interface{…}

Server events for Live. Response lifecycle events are wrapped inside response.event; dispatch the nested event by its full type and tolerate new response event types. Follow the Live prompting guide when designing the conversation and delegation policy.

type ServerEventSelector struct{…}

A Live server event selector for the WebRTC frontend data channel.

type SessionCloseEvent struct{…}

Request that the Live session close. The terminal session.closed event contains the close reason and final usage.

type SessionClosedEvent struct{…}

Returned after the Live session finishes finalizing, with the close reason, final session snapshot, and cumulative audio usage. A connection closing without this event does not confirm successful finalization.

type SessionConfig struct{…}

Initial configuration for a Live session, including its model, conversation instructions, audio, and delegated task handling.

type SessionResource struct{…}

The resolved Live session configuration and server-assigned session metadata.

type SessionStartEvent struct{…}

Start a Live session on a primary WebSocket. Send this event before other commands and wait for session.started.

type SessionStartedEvent struct{…}

Returned when a Live session has started. Contains the resolved session configuration, including server defaults.

type SessionUpdateConfig struct{…}

Changes to an active Live session’s delegation settings and transcript triggers.

type SessionUpdateEvent struct{…}

Update the delegation settings or transcript triggers of an active Live session. The server acknowledges accepted changes with session.updated.

type SessionUpdatedEvent struct{…}

Returned when a Live session update is accepted. Contains the resolved session configuration after the update.

type SessionUsage struct{…}

Cumulative audio duration for a Live session. Values are totals for the session, not increments to sum across usage events.

type SessionUsageUpdatedEvent struct{…}

Reports cumulative Live audio usage and, when available, the most recent context-window usage. Delegated Responses token usage is reported separately in response.event events.

type ThinkingAppendEvent struct{…}

Provide silent reasoning or progress context to the Live model, optionally for an existing client delegation. Rejected while an audio fixture is active.

type ThinkingAppendedEvent struct{…}

Returned when a session.thinking.append command is accepted into the Live session timeline. Acknowledges the added reasoning context without guaranteeing any spoken output.

LiveForks

Connect
WebSocket
/live/sessions/{session_id}/fork
Models
type ForkClientEventUnion interface{…}

Client events for a Live fork WebSocket. First send session.start with an overrides object (which may be empty), then wait for session.started before sending other commands. The model and conversation are inherited from the stored session.

type ForkServerEventUnion interface{…}

Server events for Live. Response lifecycle events are wrapped inside response.event; dispatch the nested event by its full type and tolerate new response event types. Follow the Live prompting guide when designing the conversation and delegation policy.

LiveSessions

Accept call
client.Live.Sessions.Accept(ctx, sessionID, body) error
POST
/live/sessions/{session_id}/accept
Download recording
client.Live.Sessions.DownloadRecording(ctx, sessionID) (*Response, error)
GET
/live/sessions/{session_id}/content
Fork session
client.Live.Sessions.Fork(ctx, sessionID, body) (*SessionForkResponse, error)
POST
/live/sessions/{session_id}/fork
Hang up session
client.Live.Sessions.Hangup(ctx, sessionID) error
POST
/live/sessions/{session_id}/hangup
Transfer call
client.Live.Sessions.Refer(ctx, sessionID, body) error
POST
/live/sessions/{session_id}/refer
Reject call
client.Live.Sessions.Reject(ctx, sessionID, body) error
POST
/live/sessions/{session_id}/reject

LiveSideband

Connect
WebSocket
/live/sessions/{session_id}/attach
Models
type ConnectClientEventUnion interface{…}

Client events accepted by an attached Live sideband WebSocket. The session has already started. Send input audio over the primary connection.

type ConnectServerEventUnion interface{…}

Server events received by an attached Live sideband WebSocket, including reflected input and output audio and transport notifications.