Rate this page:

LiveAPIEvents

Add the following line to your scenario code to use the events:

require(Modules.OpenAI);

Constants

AgentStartedSpeaking
Copy URL

Emitted when the agent started speaking. Derived by AI Connector from output audio. Marks when audio enters the media path, before the caller hears it.

Parameters

AgentStoppedSpeaking
Copy URL

Emitted when the agent stopped speaking. Derived by AI Connector from output audio. Marks when audio stops entering the media path, before the caller hears the speech end.

Parameters

ConnectorInformation
Copy URL

Contains information about connector.

Parameters

Error
Copy URL

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. https://developers.openai.com/api/reference/resources/live/primary-websocket#error

Parameters

HTTPResponse
Copy URL

The HTTP response event.

Parameters

ResponseEvent
Copy URL

A streaming Responses API event from a backend delegated to by the Live session. Unwrap data.payload.event and preserve the outer delegation_id. https://developers.openai.com/api/reference/resources/live/primary-websocket#response.event

Parameters

SessionClosed
Copy URL

Returned after the Live session finishes finalizing, with the close reason, final session snapshot, and cumulative audio usage. A connection that closes without this event does not confirm successful finalization. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.closed

Parameters

SessionCommentaryAppended
Copy URL

Returned when a OpenAI.LiveAPIClient.sessionCommentaryAppend command is accepted into the Live session timeline. Match the command through client_event_id. This acknowledges the commentary and does not guarantee exact wording or completed audio playback. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.commentary.appended

Parameters

SessionDelegationCreated
Copy URL

Returned when the Live model delegates work to your application or a Responses backend. The payload carries delegation metadata and timeline position, not the task text or tool arguments. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.delegation.created

Parameters

SessionInputAudioMuted
Copy URL

Parameters

SessionInputAudioUnmuted
Copy URL

Parameters

SessionInputTranscriptDelta
Copy URL

A transcript fragment for user input audio. Append each fragment in delivery order. These events do not define complete turns and have no transcript-done event. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_transcript.delta

Parameters

SessionInstructionsAppended
Copy URL

Returned when a OpenAI.LiveAPIClient.sessionInstructionsAppend command is accepted into the Live session timeline. Match the command through client_event_id. This acknowledges the instructions and does not guarantee that the model has acted on them. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.instructions.appended

Parameters

SessionOutputTranscriptDelta
Copy URL

A transcript fragment for assistant output audio. Append each fragment in delivery order. These events do not define complete turns and have no transcript-done event. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.output_transcript.delta

Parameters

SessionStarted
Copy URL

Returned when a Live session has started. Contains the resolved session configuration, including server defaults. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.started

Parameters

SessionThinkingAppended
Copy URL

Returned when a OpenAI.LiveAPIClient.sessionThinkingAppend command is accepted into the Live session timeline. Match the command through client_event_id. This acknowledges the reasoning context and does not guarantee spoken output. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.thinking.appended

Parameters

SessionUpdated
Copy URL

Returned when a Live session update is accepted. Contains the resolved session configuration after the update. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.updated

Parameters

SessionUsageUpdated
Copy URL

Reports cumulative Live audio usage and, when available, the most recent context-window usage. Do not sum usage.seconds across events. Delegated Responses token usage is reported separately in OpenAI.LiveAPIEvents.ResponseEvent. https://developers.openai.com/api/reference/resources/live/primary-websocket#session.usage.updated

Parameters

Unknown
Copy URL

The unknown event.

Parameters

WebSocketError
Copy URL

The WebSocket error response event.

Parameters

Rate this page: