Class RealtimeServerEvent
- 
                    
                    - All Implemented Interfaces:
 
 public final class RealtimeServerEventA realtime server event. 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public interfaceRealtimeServerEvent.VisitorAn interface that defines how to map each variant of RealtimeServerEvent to a value of type T. public final classRealtimeServerEvent.ConversationItemRetrievedReturned when a conversation item is retrieved with conversation.item.retrieve. This is provided as a way to fetch the server's representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.public final classRealtimeServerEvent.OutputAudioBufferStartedWebRTC Only: Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added ( response.content_part.added) to the response. Learn more.public final classRealtimeServerEvent.OutputAudioBufferStoppedWebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client ( response.done). Learn more.public final classRealtimeServerEvent.OutputAudioBufferClearedWebRTC Only: Emitted when the output audio buffer is cleared. This happens either in VAD mode when the user has interrupted ( input_audio_buffer.speech_started), or when the client has emitted theoutput_audio_buffer.clearevent to manually cut off the current audio response. Learn more.
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final Optional<ConversationCreatedEvent>conversationCreated()Returned when a conversation is created. final Optional<ConversationItemCreatedEvent>conversationItemCreated()Returned when a conversation item is created. final Optional<ConversationItemDeletedEvent>conversationItemDeleted()Returned when an item in the conversation is deleted by the client with a conversation.item.deleteevent.final Optional<ConversationItemInputAudioTranscriptionCompletedEvent>conversationItemInputAudioTranscriptionCompleted()This event is the output of audio transcription for user audio written to the user audio buffer. final Optional<ConversationItemInputAudioTranscriptionDeltaEvent>conversationItemInputAudioTranscriptionDelta()Returned when the text value of an input audio transcription content part is updated with incremental transcription results. final Optional<ConversationItemInputAudioTranscriptionFailedEvent>conversationItemInputAudioTranscriptionFailed()Returned when input audio transcription is configured, and a transcription request for a user message failed. final Optional<RealtimeServerEvent.ConversationItemRetrieved>conversationItemRetrieved()Returned when a conversation item is retrieved with conversation.item.retrieve.final Optional<ConversationItemTruncatedEvent>conversationItemTruncated()Returned when an earlier assistant audio message item is truncated by the client with a conversation.item.truncateevent.final Optional<RealtimeErrorEvent>error()Returned when an error occurs, which could be a client problem or a server problem. final Optional<InputAudioBufferClearedEvent>inputAudioBufferCleared()Returned when the input audio buffer is cleared by the client with a input_audio_buffer.clearevent.final Optional<InputAudioBufferCommittedEvent>inputAudioBufferCommitted()Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. final Optional<InputAudioBufferSpeechStartedEvent>inputAudioBufferSpeechStarted()Sent by the server when in server_vadmode to indicate that speech has been detected in the audio buffer.final Optional<InputAudioBufferSpeechStoppedEvent>inputAudioBufferSpeechStopped()Returned in server_vadmode when the server detects the end of speech in the audio buffer.final Optional<RateLimitsUpdatedEvent>rateLimitsUpdated()Emitted at the beginning of a Response to indicate the updated rate limits. final Optional<ResponseAudioDeltaEvent>responseOutputAudioDelta()Returned when the model-generated audio is updated. final Optional<ResponseAudioDoneEvent>responseOutputAudioDone()Returned when the model-generated audio is done. final Optional<ResponseAudioTranscriptDeltaEvent>responseOutputAudioTranscriptDelta()Returned when the model-generated transcription of audio output is updated. final Optional<ResponseAudioTranscriptDoneEvent>responseOutputAudioTranscriptDone()Returned when the model-generated transcription of audio output is done streaming. final Optional<ResponseContentPartAddedEvent>responseContentPartAdded()Returned when a new content part is added to an assistant message item during response generation. final Optional<ResponseContentPartDoneEvent>responseContentPartDone()Returned when a content part is done streaming in an assistant message item. final Optional<ResponseCreatedEvent>responseCreated()Returned when a new Response is created. final Optional<ResponseDoneEvent>responseDone()Returned when a Response is done streaming. final Optional<ResponseFunctionCallArgumentsDeltaEvent>responseFunctionCallArgumentsDelta()Returned when the model-generated function call arguments are updated. final Optional<ResponseFunctionCallArgumentsDoneEvent>responseFunctionCallArgumentsDone()Returned when the model-generated function call arguments are done streaming. final Optional<ResponseOutputItemAddedEvent>responseOutputItemAdded()Returned when a new Item is created during Response generation. final Optional<ResponseOutputItemDoneEvent>responseOutputItemDone()Returned when an Item is done streaming. final Optional<ResponseTextDeltaEvent>responseOutputTextDelta()Returned when the text value of an "output_text" content part is updated. final Optional<ResponseTextDoneEvent>responseOutputTextDone()Returned when the text value of an "output_text" content part is done streaming. final Optional<SessionCreatedEvent>sessionCreated()Returned when a Session is created. final Optional<SessionUpdatedEvent>sessionUpdated()Returned when a session is updated with a session.updateevent, unless there is an error.final Optional<RealtimeServerEvent.OutputAudioBufferStarted>outputAudioBufferStarted()WebRTC Only: Emitted when the server begins streaming audio to the client. final Optional<RealtimeServerEvent.OutputAudioBufferStopped>outputAudioBufferStopped()WebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. final Optional<RealtimeServerEvent.OutputAudioBufferCleared>outputAudioBufferCleared()WebRTC Only: Emitted when the output audio buffer is cleared. final Optional<ConversationItemAdded>conversationItemAdded()Sent by the server when an Item is added to the default Conversation. final Optional<ConversationItemDone>conversationItemDone()Returned when a conversation item is finalized. final Optional<InputAudioBufferTimeoutTriggered>inputAudioBufferTimeoutTriggered()Returned when the Server VAD timeout is triggered for the input audio buffer. final Optional<ConversationItemInputAudioTranscriptionSegment>conversationItemInputAudioTranscriptionSegment()Returned when an input audio transcription segment is identified for an item. final Optional<McpListToolsInProgress>mcpListToolsInProgress()Returned when listing MCP tools is in progress for an item. final Optional<McpListToolsCompleted>mcpListToolsCompleted()Returned when listing MCP tools has completed for an item. final Optional<McpListToolsFailed>mcpListToolsFailed()Returned when listing MCP tools has failed for an item. final Optional<ResponseMcpCallArgumentsDelta>responseMcpCallArgumentsDelta()Returned when MCP tool call arguments are updated during response generation. final Optional<ResponseMcpCallArgumentsDone>responseMcpCallArgumentsDone()Returned when MCP tool call arguments are finalized during response generation. final Optional<ResponseMcpCallInProgress>responseMcpCallInProgress()Returned when an MCP tool call has started and is in progress. final Optional<ResponseMcpCallCompleted>responseMcpCallCompleted()Returned when an MCP tool call has completed successfully. final Optional<ResponseMcpCallFailed>responseMcpCallFailed()Returned when an MCP tool call has failed. final BooleanisConversationCreated()final BooleanisConversationItemCreated()final BooleanisConversationItemDeleted()final BooleanisConversationItemInputAudioTranscriptionCompleted()final BooleanisConversationItemInputAudioTranscriptionDelta()final BooleanisConversationItemInputAudioTranscriptionFailed()final BooleanisConversationItemRetrieved()final BooleanisConversationItemTruncated()final BooleanisError()final BooleanisInputAudioBufferCleared()final BooleanisInputAudioBufferCommitted()final BooleanisInputAudioBufferSpeechStarted()final BooleanisInputAudioBufferSpeechStopped()final BooleanisRateLimitsUpdated()final BooleanisResponseOutputAudioDelta()final BooleanisResponseOutputAudioDone()final BooleanisResponseOutputAudioTranscriptDelta()final BooleanisResponseOutputAudioTranscriptDone()final BooleanisResponseContentPartAdded()final BooleanisResponseContentPartDone()final BooleanisResponseCreated()final BooleanisResponseDone()final BooleanisResponseFunctionCallArgumentsDelta()final BooleanisResponseFunctionCallArgumentsDone()final BooleanisResponseOutputItemAdded()final BooleanisResponseOutputItemDone()final BooleanisResponseOutputTextDelta()final BooleanisResponseOutputTextDone()final BooleanisSessionCreated()final BooleanisSessionUpdated()final BooleanisOutputAudioBufferStarted()final BooleanisOutputAudioBufferStopped()final BooleanisOutputAudioBufferCleared()final BooleanisConversationItemAdded()final BooleanisConversationItemDone()final BooleanisInputAudioBufferTimeoutTriggered()final BooleanisConversationItemInputAudioTranscriptionSegment()final BooleanisMcpListToolsInProgress()final BooleanisMcpListToolsCompleted()final BooleanisMcpListToolsFailed()final BooleanisResponseMcpCallArgumentsDelta()final BooleanisResponseMcpCallArgumentsDone()final BooleanisResponseMcpCallInProgress()final BooleanisResponseMcpCallCompleted()final BooleanisResponseMcpCallFailed()final ConversationCreatedEventasConversationCreated()Returned when a conversation is created. final ConversationItemCreatedEventasConversationItemCreated()Returned when a conversation item is created. final ConversationItemDeletedEventasConversationItemDeleted()Returned when an item in the conversation is deleted by the client with a conversation.item.deleteevent.final ConversationItemInputAudioTranscriptionCompletedEventasConversationItemInputAudioTranscriptionCompleted()This event is the output of audio transcription for user audio written to the user audio buffer. final ConversationItemInputAudioTranscriptionDeltaEventasConversationItemInputAudioTranscriptionDelta()Returned when the text value of an input audio transcription content part is updated with incremental transcription results. final ConversationItemInputAudioTranscriptionFailedEventasConversationItemInputAudioTranscriptionFailed()Returned when input audio transcription is configured, and a transcription request for a user message failed. final RealtimeServerEvent.ConversationItemRetrievedasConversationItemRetrieved()Returned when a conversation item is retrieved with conversation.item.retrieve.final ConversationItemTruncatedEventasConversationItemTruncated()Returned when an earlier assistant audio message item is truncated by the client with a conversation.item.truncateevent.final RealtimeErrorEventasError()Returned when an error occurs, which could be a client problem or a server problem. final InputAudioBufferClearedEventasInputAudioBufferCleared()Returned when the input audio buffer is cleared by the client with a input_audio_buffer.clearevent.final InputAudioBufferCommittedEventasInputAudioBufferCommitted()Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. final InputAudioBufferSpeechStartedEventasInputAudioBufferSpeechStarted()Sent by the server when in server_vadmode to indicate that speech has been detected in the audio buffer.final InputAudioBufferSpeechStoppedEventasInputAudioBufferSpeechStopped()Returned in server_vadmode when the server detects the end of speech in the audio buffer.final RateLimitsUpdatedEventasRateLimitsUpdated()Emitted at the beginning of a Response to indicate the updated rate limits. final ResponseAudioDeltaEventasResponseOutputAudioDelta()Returned when the model-generated audio is updated. final ResponseAudioDoneEventasResponseOutputAudioDone()Returned when the model-generated audio is done. final ResponseAudioTranscriptDeltaEventasResponseOutputAudioTranscriptDelta()Returned when the model-generated transcription of audio output is updated. final ResponseAudioTranscriptDoneEventasResponseOutputAudioTranscriptDone()Returned when the model-generated transcription of audio output is done streaming. final ResponseContentPartAddedEventasResponseContentPartAdded()Returned when a new content part is added to an assistant message item during response generation. final ResponseContentPartDoneEventasResponseContentPartDone()Returned when a content part is done streaming in an assistant message item. final ResponseCreatedEventasResponseCreated()Returned when a new Response is created. final ResponseDoneEventasResponseDone()Returned when a Response is done streaming. final ResponseFunctionCallArgumentsDeltaEventasResponseFunctionCallArgumentsDelta()Returned when the model-generated function call arguments are updated. final ResponseFunctionCallArgumentsDoneEventasResponseFunctionCallArgumentsDone()Returned when the model-generated function call arguments are done streaming. final ResponseOutputItemAddedEventasResponseOutputItemAdded()Returned when a new Item is created during Response generation. final ResponseOutputItemDoneEventasResponseOutputItemDone()Returned when an Item is done streaming. final ResponseTextDeltaEventasResponseOutputTextDelta()Returned when the text value of an "output_text" content part is updated. final ResponseTextDoneEventasResponseOutputTextDone()Returned when the text value of an "output_text" content part is done streaming. final SessionCreatedEventasSessionCreated()Returned when a Session is created. final SessionUpdatedEventasSessionUpdated()Returned when a session is updated with a session.updateevent, unless there is an error.final RealtimeServerEvent.OutputAudioBufferStartedasOutputAudioBufferStarted()WebRTC Only: Emitted when the server begins streaming audio to the client. final RealtimeServerEvent.OutputAudioBufferStoppedasOutputAudioBufferStopped()WebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. final RealtimeServerEvent.OutputAudioBufferClearedasOutputAudioBufferCleared()WebRTC Only: Emitted when the output audio buffer is cleared. final ConversationItemAddedasConversationItemAdded()Sent by the server when an Item is added to the default Conversation. final ConversationItemDoneasConversationItemDone()Returned when a conversation item is finalized. final InputAudioBufferTimeoutTriggeredasInputAudioBufferTimeoutTriggered()Returned when the Server VAD timeout is triggered for the input audio buffer. final ConversationItemInputAudioTranscriptionSegmentasConversationItemInputAudioTranscriptionSegment()Returned when an input audio transcription segment is identified for an item. final McpListToolsInProgressasMcpListToolsInProgress()Returned when listing MCP tools is in progress for an item. final McpListToolsCompletedasMcpListToolsCompleted()Returned when listing MCP tools has completed for an item. final McpListToolsFailedasMcpListToolsFailed()Returned when listing MCP tools has failed for an item. final ResponseMcpCallArgumentsDeltaasResponseMcpCallArgumentsDelta()Returned when MCP tool call arguments are updated during response generation. final ResponseMcpCallArgumentsDoneasResponseMcpCallArgumentsDone()Returned when MCP tool call arguments are finalized during response generation. final ResponseMcpCallInProgressasResponseMcpCallInProgress()Returned when an MCP tool call has started and is in progress. final ResponseMcpCallCompletedasResponseMcpCallCompleted()Returned when an MCP tool call has completed successfully. final ResponseMcpCallFailedasResponseMcpCallFailed()Returned when an MCP tool call has failed. final Optional<JsonValue>_json()final <T extends Any> Taccept(RealtimeServerEvent.Visitor<T> visitor)final RealtimeServerEventvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RealtimeServerEventofConversationCreated(ConversationCreatedEvent conversationCreated)Returned when a conversation is created. final static RealtimeServerEventofConversationItemCreated(ConversationItemCreatedEvent conversationItemCreated)Returned when a conversation item is created. final static RealtimeServerEventofConversationItemDeleted(ConversationItemDeletedEvent conversationItemDeleted)Returned when an item in the conversation is deleted by the client with a conversation.item.deleteevent.final static RealtimeServerEventofConversationItemInputAudioTranscriptionCompleted(ConversationItemInputAudioTranscriptionCompletedEvent conversationItemInputAudioTranscriptionCompleted)This event is the output of audio transcription for user audio written to the user audio buffer. final static RealtimeServerEventofConversationItemInputAudioTranscriptionDelta(ConversationItemInputAudioTranscriptionDeltaEvent conversationItemInputAudioTranscriptionDelta)Returned when the text value of an input audio transcription content part is updated with incremental transcription results. final static RealtimeServerEventofConversationItemInputAudioTranscriptionFailed(ConversationItemInputAudioTranscriptionFailedEvent conversationItemInputAudioTranscriptionFailed)Returned when input audio transcription is configured, and a transcription request for a user message failed. final static RealtimeServerEventofConversationItemRetrieved(RealtimeServerEvent.ConversationItemRetrieved conversationItemRetrieved)Returned when a conversation item is retrieved with conversation.item.retrieve.final static RealtimeServerEventofConversationItemTruncated(ConversationItemTruncatedEvent conversationItemTruncated)Returned when an earlier assistant audio message item is truncated by the client with a conversation.item.truncateevent.final static RealtimeServerEventofError(RealtimeErrorEvent error)Returned when an error occurs, which could be a client problem or a server problem. final static RealtimeServerEventofInputAudioBufferCleared(InputAudioBufferClearedEvent inputAudioBufferCleared)Returned when the input audio buffer is cleared by the client with a input_audio_buffer.clearevent.final static RealtimeServerEventofInputAudioBufferCommitted(InputAudioBufferCommittedEvent inputAudioBufferCommitted)Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. final static RealtimeServerEventofInputAudioBufferSpeechStarted(InputAudioBufferSpeechStartedEvent inputAudioBufferSpeechStarted)Sent by the server when in server_vadmode to indicate that speech has been detected in the audio buffer.final static RealtimeServerEventofInputAudioBufferSpeechStopped(InputAudioBufferSpeechStoppedEvent inputAudioBufferSpeechStopped)Returned in server_vadmode when the server detects the end of speech in the audio buffer.final static RealtimeServerEventofRateLimitsUpdated(RateLimitsUpdatedEvent rateLimitsUpdated)Emitted at the beginning of a Response to indicate the updated rate limits. final static RealtimeServerEventofResponseOutputAudioDelta(ResponseAudioDeltaEvent responseOutputAudioDelta)Returned when the model-generated audio is updated. final static RealtimeServerEventofResponseOutputAudioDone(ResponseAudioDoneEvent responseOutputAudioDone)Returned when the model-generated audio is done. final static RealtimeServerEventofResponseOutputAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent responseOutputAudioTranscriptDelta)Returned when the model-generated transcription of audio output is updated. final static RealtimeServerEventofResponseOutputAudioTranscriptDone(ResponseAudioTranscriptDoneEvent responseOutputAudioTranscriptDone)Returned when the model-generated transcription of audio output is done streaming. final static RealtimeServerEventofResponseContentPartAdded(ResponseContentPartAddedEvent responseContentPartAdded)Returned when a new content part is added to an assistant message item during response generation. final static RealtimeServerEventofResponseContentPartDone(ResponseContentPartDoneEvent responseContentPartDone)Returned when a content part is done streaming in an assistant message item. final static RealtimeServerEventofResponseCreated(ResponseCreatedEvent responseCreated)Returned when a new Response is created. final static RealtimeServerEventofResponseDone(ResponseDoneEvent responseDone)Returned when a Response is done streaming. final static RealtimeServerEventofResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent responseFunctionCallArgumentsDelta)Returned when the model-generated function call arguments are updated. final static RealtimeServerEventofResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent responseFunctionCallArgumentsDone)Returned when the model-generated function call arguments are done streaming. final static RealtimeServerEventofResponseOutputItemAdded(ResponseOutputItemAddedEvent responseOutputItemAdded)Returned when a new Item is created during Response generation. final static RealtimeServerEventofResponseOutputItemDone(ResponseOutputItemDoneEvent responseOutputItemDone)Returned when an Item is done streaming. final static RealtimeServerEventofResponseOutputTextDelta(ResponseTextDeltaEvent responseOutputTextDelta)Returned when the text value of an "output_text" content part is updated. final static RealtimeServerEventofResponseOutputTextDone(ResponseTextDoneEvent responseOutputTextDone)Returned when the text value of an "output_text" content part is done streaming. final static RealtimeServerEventofSessionCreated(SessionCreatedEvent sessionCreated)Returned when a Session is created. final static RealtimeServerEventofSessionUpdated(SessionUpdatedEvent sessionUpdated)Returned when a session is updated with a session.updateevent, unless there is an error.final static RealtimeServerEventofOutputAudioBufferStarted(RealtimeServerEvent.OutputAudioBufferStarted outputAudioBufferStarted)WebRTC Only: Emitted when the server begins streaming audio to the client. final static RealtimeServerEventofOutputAudioBufferStopped(RealtimeServerEvent.OutputAudioBufferStopped outputAudioBufferStopped)WebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. final static RealtimeServerEventofOutputAudioBufferCleared(RealtimeServerEvent.OutputAudioBufferCleared outputAudioBufferCleared)WebRTC Only: Emitted when the output audio buffer is cleared. final static RealtimeServerEventofConversationItemAdded(ConversationItemAdded conversationItemAdded)Sent by the server when an Item is added to the default Conversation. final static RealtimeServerEventofConversationItemDone(ConversationItemDone conversationItemDone)Returned when a conversation item is finalized. final static RealtimeServerEventofInputAudioBufferTimeoutTriggered(InputAudioBufferTimeoutTriggered inputAudioBufferTimeoutTriggered)Returned when the Server VAD timeout is triggered for the input audio buffer. final static RealtimeServerEventofConversationItemInputAudioTranscriptionSegment(ConversationItemInputAudioTranscriptionSegment conversationItemInputAudioTranscriptionSegment)Returned when an input audio transcription segment is identified for an item. final static RealtimeServerEventofMcpListToolsInProgress(McpListToolsInProgress mcpListToolsInProgress)Returned when listing MCP tools is in progress for an item. final static RealtimeServerEventofMcpListToolsCompleted(McpListToolsCompleted mcpListToolsCompleted)Returned when listing MCP tools has completed for an item. final static RealtimeServerEventofMcpListToolsFailed(McpListToolsFailed mcpListToolsFailed)Returned when listing MCP tools has failed for an item. final static RealtimeServerEventofResponseMcpCallArgumentsDelta(ResponseMcpCallArgumentsDelta responseMcpCallArgumentsDelta)Returned when MCP tool call arguments are updated during response generation. final static RealtimeServerEventofResponseMcpCallArgumentsDone(ResponseMcpCallArgumentsDone responseMcpCallArgumentsDone)Returned when MCP tool call arguments are finalized during response generation. final static RealtimeServerEventofResponseMcpCallInProgress(ResponseMcpCallInProgress responseMcpCallInProgress)Returned when an MCP tool call has started and is in progress. final static RealtimeServerEventofResponseMcpCallCompleted(ResponseMcpCallCompleted responseMcpCallCompleted)Returned when an MCP tool call has completed successfully. final static RealtimeServerEventofResponseMcpCallFailed(ResponseMcpCallFailed responseMcpCallFailed)Returned when an MCP tool call has failed. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        conversationCreatedfinal Optional<ConversationCreatedEvent> conversationCreated() Returned when a conversation is created. Emitted right after session creation. 
 - 
                                        conversationItemCreatedfinal Optional<ConversationItemCreatedEvent> conversationItemCreated() Returned when a conversation item is created. There are several scenarios that produce this event: - The server is generating a Response, which if successful will produce either one or two Items, which will be of type - message(role- assistant) or type- function_call.
- The input audio buffer has been committed, either by the client or the server (in - server_vadmode). The server will take the content of the input audio buffer and add it to a new user message Item.
- The client has sent a - conversation.item.createevent to add a new Item to the Conversation.
 
 - 
                                        conversationItemDeletedfinal Optional<ConversationItemDeletedEvent> conversationItemDeleted() Returned when an item in the conversation is deleted by the client with a conversation.item.deleteevent. This event is used to synchronize the server's understanding of the conversation history with the client's view.
 - 
                                        conversationItemInputAudioTranscriptionCompletedfinal Optional<ConversationItemInputAudioTranscriptionCompletedEvent> conversationItemInputAudioTranscriptionCompleted() This event is the output of audio transcription for user audio written to the user audio buffer. Transcription begins when the input audio buffer is committed by the client or server (when VAD is enabled). Transcription runs asynchronously with Response creation, so this event may come before or after the Response events. Realtime API models accept audio natively, and thus input transcription is a separate process run on a separate ASR (Automatic Speech Recognition) model. The transcript may diverge somewhat from the model's interpretation, and should be treated as a rough guide. 
 - 
                                        conversationItemInputAudioTranscriptionDeltafinal Optional<ConversationItemInputAudioTranscriptionDeltaEvent> conversationItemInputAudioTranscriptionDelta() Returned when the text value of an input audio transcription content part is updated with incremental transcription results. 
 - 
                                        conversationItemInputAudioTranscriptionFailedfinal Optional<ConversationItemInputAudioTranscriptionFailedEvent> conversationItemInputAudioTranscriptionFailed() Returned when input audio transcription is configured, and a transcription request for a user message failed. These events are separate from other errorevents so that the client can identify the related Item.
 - 
                                        conversationItemRetrievedfinal Optional<RealtimeServerEvent.ConversationItemRetrieved> conversationItemRetrieved() Returned when a conversation item is retrieved with conversation.item.retrieve. This is provided as a way to fetch the server's representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.
 - 
                                        conversationItemTruncatedfinal Optional<ConversationItemTruncatedEvent> conversationItemTruncated() Returned when an earlier assistant audio message item is truncated by the client with a conversation.item.truncateevent. This event is used to synchronize the server's understanding of the audio with the client's playback.This action will truncate the audio and remove the server-side text transcript to ensure there is no text in the context that hasn't been heard by the user. 
 - 
                                        errorfinal Optional<RealtimeErrorEvent> error() Returned when an error occurs, which could be a client problem or a server problem. Most errors are recoverable and the session will stay open, we recommend to implementors to monitor and log error messages by default. 
 - 
                                        inputAudioBufferClearedfinal Optional<InputAudioBufferClearedEvent> inputAudioBufferCleared() Returned when the input audio buffer is cleared by the client with a input_audio_buffer.clearevent.
 - 
                                        inputAudioBufferCommittedfinal Optional<InputAudioBufferCommittedEvent> inputAudioBufferCommitted() Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. The item_idproperty is the ID of the user message item that will be created, thus aconversation.item.createdevent will also be sent to the client.
 - 
                                        inputAudioBufferSpeechStartedfinal Optional<InputAudioBufferSpeechStartedEvent> inputAudioBufferSpeechStarted() Sent by the server when in server_vadmode to indicate that speech has been detected in the audio buffer. This can happen any time audio is added to the buffer (unless speech is already detected). The client may want to use this event to interrupt audio playback or provide visual feedback to the user.The client should expect to receive a input_audio_buffer.speech_stoppedevent when speech stops. Theitem_idproperty is the ID of the user message item that will be created when speech stops and will also be included in theinput_audio_buffer.speech_stoppedevent (unless the client manually commits the audio buffer during VAD activation).
 - 
                                        inputAudioBufferSpeechStoppedfinal Optional<InputAudioBufferSpeechStoppedEvent> inputAudioBufferSpeechStopped() Returned in server_vadmode when the server detects the end of speech in the audio buffer. The server will also send anconversation.item.createdevent with the user message item that is created from the audio buffer.
 - 
                                        rateLimitsUpdatedfinal Optional<RateLimitsUpdatedEvent> rateLimitsUpdated() Emitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be "reserved" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed. 
 - 
                                        responseOutputAudioDeltafinal Optional<ResponseAudioDeltaEvent> responseOutputAudioDelta() Returned when the model-generated audio is updated. 
 - 
                                        responseOutputAudioDonefinal Optional<ResponseAudioDoneEvent> responseOutputAudioDone() Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        responseOutputAudioTranscriptDeltafinal Optional<ResponseAudioTranscriptDeltaEvent> responseOutputAudioTranscriptDelta() Returned when the model-generated transcription of audio output is updated. 
 - 
                                        responseOutputAudioTranscriptDonefinal Optional<ResponseAudioTranscriptDoneEvent> responseOutputAudioTranscriptDone() Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        responseContentPartAddedfinal Optional<ResponseContentPartAddedEvent> responseContentPartAdded() Returned when a new content part is added to an assistant message item during response generation. 
 - 
                                        responseContentPartDonefinal Optional<ResponseContentPartDoneEvent> responseContentPartDone() Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        responseCreatedfinal Optional<ResponseCreatedEvent> responseCreated() Returned when a new Response is created. The first event of response creation, where the response is in an initial state of in_progress.
 - 
                                        responseDonefinal Optional<ResponseDoneEvent> responseDone() Returned when a Response is done streaming. Always emitted, no matter the final state. The Response object included in the response.doneevent will include all output Items in the Response but will omit the raw audio data.Clients should check the statusfield of the Response to determine if it was successful (completed) or if there was another outcome:cancelled,failed, orincomplete.A response will contain all output items that were generated during the response, excluding any audio content. 
 - 
                                        responseFunctionCallArgumentsDeltafinal Optional<ResponseFunctionCallArgumentsDeltaEvent> responseFunctionCallArgumentsDelta() Returned when the model-generated function call arguments are updated. 
 - 
                                        responseFunctionCallArgumentsDonefinal Optional<ResponseFunctionCallArgumentsDoneEvent> responseFunctionCallArgumentsDone() Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        responseOutputItemAddedfinal Optional<ResponseOutputItemAddedEvent> responseOutputItemAdded() Returned when a new Item is created during Response generation. 
 - 
                                        responseOutputItemDonefinal Optional<ResponseOutputItemDoneEvent> responseOutputItemDone() Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        responseOutputTextDeltafinal Optional<ResponseTextDeltaEvent> responseOutputTextDelta() Returned when the text value of an "output_text" content part is updated. 
 - 
                                        responseOutputTextDonefinal Optional<ResponseTextDoneEvent> responseOutputTextDone() Returned when the text value of an "output_text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        sessionCreatedfinal Optional<SessionCreatedEvent> sessionCreated() Returned when a Session is created. Emitted automatically when a new connection is established as the first server event. This event will contain the default Session configuration. 
 - 
                                        sessionUpdatedfinal Optional<SessionUpdatedEvent> sessionUpdated() Returned when a session is updated with a session.updateevent, unless there is an error.
 - 
                                        outputAudioBufferStartedfinal Optional<RealtimeServerEvent.OutputAudioBufferStarted> outputAudioBufferStarted() WebRTC Only: Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added ( response.content_part.added) to the response. Learn more.
 - 
                                        outputAudioBufferStoppedfinal Optional<RealtimeServerEvent.OutputAudioBufferStopped> outputAudioBufferStopped() WebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client ( response.done). Learn more.
 - 
                                        outputAudioBufferClearedfinal Optional<RealtimeServerEvent.OutputAudioBufferCleared> outputAudioBufferCleared() WebRTC Only: Emitted when the output audio buffer is cleared. This happens either in VAD mode when the user has interrupted ( input_audio_buffer.speech_started), or when the client has emitted theoutput_audio_buffer.clearevent to manually cut off the current audio response. Learn more.
 - 
                                        conversationItemAddedfinal Optional<ConversationItemAdded> conversationItemAdded() Sent by the server when an Item is added to the default Conversation. This can happen in several cases: - When the client sends a - conversation.item.createevent.
- When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. 
- When the model is generating a Response. In this case the - conversation.item.addedevent will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and- statuswill be- in_progress).
 The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a conversation.item.retrieveevent if necessary.
 - 
                                        conversationItemDonefinal Optional<ConversationItemDone> conversationItemDone() Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a conversation.item.retrieveevent if needed.
 - 
                                        inputAudioBufferTimeoutTriggeredfinal Optional<InputAudioBufferTimeoutTriggered> inputAudioBufferTimeoutTriggered() Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured with idle_timeout_msin theturn_detectionsettings of the session, and it indicates that there hasn't been any speech detected for the configured duration.The audio_start_msandaudio_end_msfields indicate the segment of audio after the last model response up to the triggering time, as an offset from the beginning of audio written to the input audio buffer. This means it demarcates the segment of audio that was silent and the difference between the start and end values will roughly match the configured timeout.The empty audio will be committed to the conversation as an input_audioitem (there will be ainput_audio_buffer.committedevent) and a model response will be generated. There may be speech that didn't trigger VAD but is still detected by the model, so the model may respond with something relevant to the conversation or a prompt to continue speaking.
 - 
                                        conversationItemInputAudioTranscriptionSegmentfinal Optional<ConversationItemInputAudioTranscriptionSegment> conversationItemInputAudioTranscriptionSegment() Returned when an input audio transcription segment is identified for an item. 
 - 
                                        mcpListToolsInProgressfinal Optional<McpListToolsInProgress> mcpListToolsInProgress() Returned when listing MCP tools is in progress for an item. 
 - 
                                        mcpListToolsCompletedfinal Optional<McpListToolsCompleted> mcpListToolsCompleted() Returned when listing MCP tools has completed for an item. 
 - 
                                        mcpListToolsFailedfinal Optional<McpListToolsFailed> mcpListToolsFailed() Returned when listing MCP tools has failed for an item. 
 - 
                                        responseMcpCallArgumentsDeltafinal Optional<ResponseMcpCallArgumentsDelta> responseMcpCallArgumentsDelta() Returned when MCP tool call arguments are updated during response generation. 
 - 
                                        responseMcpCallArgumentsDonefinal Optional<ResponseMcpCallArgumentsDone> responseMcpCallArgumentsDone() Returned when MCP tool call arguments are finalized during response generation. 
 - 
                                        responseMcpCallInProgressfinal Optional<ResponseMcpCallInProgress> responseMcpCallInProgress() Returned when an MCP tool call has started and is in progress. 
 - 
                                        responseMcpCallCompletedfinal Optional<ResponseMcpCallCompleted> responseMcpCallCompleted() Returned when an MCP tool call has completed successfully. 
 - 
                                        responseMcpCallFailedfinal Optional<ResponseMcpCallFailed> responseMcpCallFailed() Returned when an MCP tool call has failed. 
 - 
                                        isConversationCreatedfinal Boolean isConversationCreated() 
 - 
                                        isConversationItemCreatedfinal Boolean isConversationItemCreated() 
 - 
                                        isConversationItemDeletedfinal Boolean isConversationItemDeleted() 
 - 
                                        isConversationItemInputAudioTranscriptionCompletedfinal Boolean isConversationItemInputAudioTranscriptionCompleted() 
 - 
                                        isConversationItemInputAudioTranscriptionDeltafinal Boolean isConversationItemInputAudioTranscriptionDelta() 
 - 
                                        isConversationItemInputAudioTranscriptionFailedfinal Boolean isConversationItemInputAudioTranscriptionFailed() 
 - 
                                        isConversationItemRetrievedfinal Boolean isConversationItemRetrieved() 
 - 
                                        isConversationItemTruncatedfinal Boolean isConversationItemTruncated() 
 - 
                                        isInputAudioBufferClearedfinal Boolean isInputAudioBufferCleared() 
 - 
                                        isInputAudioBufferCommittedfinal Boolean isInputAudioBufferCommitted() 
 - 
                                        isInputAudioBufferSpeechStartedfinal Boolean isInputAudioBufferSpeechStarted() 
 - 
                                        isInputAudioBufferSpeechStoppedfinal Boolean isInputAudioBufferSpeechStopped() 
 - 
                                        isRateLimitsUpdatedfinal Boolean isRateLimitsUpdated() 
 - 
                                        isResponseOutputAudioDeltafinal Boolean isResponseOutputAudioDelta() 
 - 
                                        isResponseOutputAudioDonefinal Boolean isResponseOutputAudioDone() 
 - 
                                        isResponseOutputAudioTranscriptDeltafinal Boolean isResponseOutputAudioTranscriptDelta() 
 - 
                                        isResponseOutputAudioTranscriptDonefinal Boolean isResponseOutputAudioTranscriptDone() 
 - 
                                        isResponseContentPartAddedfinal Boolean isResponseContentPartAdded() 
 - 
                                        isResponseContentPartDonefinal Boolean isResponseContentPartDone() 
 - 
                                        isResponseCreatedfinal Boolean isResponseCreated() 
 - 
                                        isResponseDonefinal Boolean isResponseDone() 
 - 
                                        isResponseFunctionCallArgumentsDeltafinal Boolean isResponseFunctionCallArgumentsDelta() 
 - 
                                        isResponseFunctionCallArgumentsDonefinal Boolean isResponseFunctionCallArgumentsDone() 
 - 
                                        isResponseOutputItemAddedfinal Boolean isResponseOutputItemAdded() 
 - 
                                        isResponseOutputItemDonefinal Boolean isResponseOutputItemDone() 
 - 
                                        isResponseOutputTextDeltafinal Boolean isResponseOutputTextDelta() 
 - 
                                        isResponseOutputTextDonefinal Boolean isResponseOutputTextDone() 
 - 
                                        isSessionCreatedfinal Boolean isSessionCreated() 
 - 
                                        isSessionUpdatedfinal Boolean isSessionUpdated() 
 - 
                                        isOutputAudioBufferStartedfinal Boolean isOutputAudioBufferStarted() 
 - 
                                        isOutputAudioBufferStoppedfinal Boolean isOutputAudioBufferStopped() 
 - 
                                        isOutputAudioBufferClearedfinal Boolean isOutputAudioBufferCleared() 
 - 
                                        isConversationItemAddedfinal Boolean isConversationItemAdded() 
 - 
                                        isConversationItemDonefinal Boolean isConversationItemDone() 
 - 
                                        isInputAudioBufferTimeoutTriggeredfinal Boolean isInputAudioBufferTimeoutTriggered() 
 - 
                                        isConversationItemInputAudioTranscriptionSegmentfinal Boolean isConversationItemInputAudioTranscriptionSegment() 
 - 
                                        isMcpListToolsInProgressfinal Boolean isMcpListToolsInProgress() 
 - 
                                        isMcpListToolsCompletedfinal Boolean isMcpListToolsCompleted() 
 - 
                                        isMcpListToolsFailedfinal Boolean isMcpListToolsFailed() 
 - 
                                        isResponseMcpCallArgumentsDeltafinal Boolean isResponseMcpCallArgumentsDelta() 
 - 
                                        isResponseMcpCallArgumentsDonefinal Boolean isResponseMcpCallArgumentsDone() 
 - 
                                        isResponseMcpCallInProgressfinal Boolean isResponseMcpCallInProgress() 
 - 
                                        isResponseMcpCallCompletedfinal Boolean isResponseMcpCallCompleted() 
 - 
                                        isResponseMcpCallFailedfinal Boolean isResponseMcpCallFailed() 
 - 
                                        asConversationCreatedfinal ConversationCreatedEvent asConversationCreated() Returned when a conversation is created. Emitted right after session creation. 
 - 
                                        asConversationItemCreatedfinal ConversationItemCreatedEvent asConversationItemCreated() Returned when a conversation item is created. There are several scenarios that produce this event: - The server is generating a Response, which if successful will produce either one or two Items, which will be of type - message(role- assistant) or type- function_call.
- The input audio buffer has been committed, either by the client or the server (in - server_vadmode). The server will take the content of the input audio buffer and add it to a new user message Item.
- The client has sent a - conversation.item.createevent to add a new Item to the Conversation.
 
 - 
                                        asConversationItemDeletedfinal ConversationItemDeletedEvent asConversationItemDeleted() Returned when an item in the conversation is deleted by the client with a conversation.item.deleteevent. This event is used to synchronize the server's understanding of the conversation history with the client's view.
 - 
                                        asConversationItemInputAudioTranscriptionCompletedfinal ConversationItemInputAudioTranscriptionCompletedEvent asConversationItemInputAudioTranscriptionCompleted() This event is the output of audio transcription for user audio written to the user audio buffer. Transcription begins when the input audio buffer is committed by the client or server (when VAD is enabled). Transcription runs asynchronously with Response creation, so this event may come before or after the Response events. Realtime API models accept audio natively, and thus input transcription is a separate process run on a separate ASR (Automatic Speech Recognition) model. The transcript may diverge somewhat from the model's interpretation, and should be treated as a rough guide. 
 - 
                                        asConversationItemInputAudioTranscriptionDeltafinal ConversationItemInputAudioTranscriptionDeltaEvent asConversationItemInputAudioTranscriptionDelta() Returned when the text value of an input audio transcription content part is updated with incremental transcription results. 
 - 
                                        asConversationItemInputAudioTranscriptionFailedfinal ConversationItemInputAudioTranscriptionFailedEvent asConversationItemInputAudioTranscriptionFailed() Returned when input audio transcription is configured, and a transcription request for a user message failed. These events are separate from other errorevents so that the client can identify the related Item.
 - 
                                        asConversationItemRetrievedfinal RealtimeServerEvent.ConversationItemRetrieved asConversationItemRetrieved() Returned when a conversation item is retrieved with conversation.item.retrieve. This is provided as a way to fetch the server's representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.
 - 
                                        asConversationItemTruncatedfinal ConversationItemTruncatedEvent asConversationItemTruncated() Returned when an earlier assistant audio message item is truncated by the client with a conversation.item.truncateevent. This event is used to synchronize the server's understanding of the audio with the client's playback.This action will truncate the audio and remove the server-side text transcript to ensure there is no text in the context that hasn't been heard by the user. 
 - 
                                        asErrorfinal RealtimeErrorEvent asError() Returned when an error occurs, which could be a client problem or a server problem. Most errors are recoverable and the session will stay open, we recommend to implementors to monitor and log error messages by default. 
 - 
                                        asInputAudioBufferClearedfinal InputAudioBufferClearedEvent asInputAudioBufferCleared() Returned when the input audio buffer is cleared by the client with a input_audio_buffer.clearevent.
 - 
                                        asInputAudioBufferCommittedfinal InputAudioBufferCommittedEvent asInputAudioBufferCommitted() Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. The item_idproperty is the ID of the user message item that will be created, thus aconversation.item.createdevent will also be sent to the client.
 - 
                                        asInputAudioBufferSpeechStartedfinal InputAudioBufferSpeechStartedEvent asInputAudioBufferSpeechStarted() Sent by the server when in server_vadmode to indicate that speech has been detected in the audio buffer. This can happen any time audio is added to the buffer (unless speech is already detected). The client may want to use this event to interrupt audio playback or provide visual feedback to the user.The client should expect to receive a input_audio_buffer.speech_stoppedevent when speech stops. Theitem_idproperty is the ID of the user message item that will be created when speech stops and will also be included in theinput_audio_buffer.speech_stoppedevent (unless the client manually commits the audio buffer during VAD activation).
 - 
                                        asInputAudioBufferSpeechStoppedfinal InputAudioBufferSpeechStoppedEvent asInputAudioBufferSpeechStopped() Returned in server_vadmode when the server detects the end of speech in the audio buffer. The server will also send anconversation.item.createdevent with the user message item that is created from the audio buffer.
 - 
                                        asRateLimitsUpdatedfinal RateLimitsUpdatedEvent asRateLimitsUpdated() Emitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be "reserved" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed. 
 - 
                                        asResponseOutputAudioDeltafinal ResponseAudioDeltaEvent asResponseOutputAudioDelta() Returned when the model-generated audio is updated. 
 - 
                                        asResponseOutputAudioDonefinal ResponseAudioDoneEvent asResponseOutputAudioDone() Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        asResponseOutputAudioTranscriptDeltafinal ResponseAudioTranscriptDeltaEvent asResponseOutputAudioTranscriptDelta() Returned when the model-generated transcription of audio output is updated. 
 - 
                                        asResponseOutputAudioTranscriptDonefinal ResponseAudioTranscriptDoneEvent asResponseOutputAudioTranscriptDone() Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        asResponseContentPartAddedfinal ResponseContentPartAddedEvent asResponseContentPartAdded() Returned when a new content part is added to an assistant message item during response generation. 
 - 
                                        asResponseContentPartDonefinal ResponseContentPartDoneEvent asResponseContentPartDone() Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        asResponseCreatedfinal ResponseCreatedEvent asResponseCreated() Returned when a new Response is created. The first event of response creation, where the response is in an initial state of in_progress.
 - 
                                        asResponseDonefinal ResponseDoneEvent asResponseDone() Returned when a Response is done streaming. Always emitted, no matter the final state. The Response object included in the response.doneevent will include all output Items in the Response but will omit the raw audio data.Clients should check the statusfield of the Response to determine if it was successful (completed) or if there was another outcome:cancelled,failed, orincomplete.A response will contain all output items that were generated during the response, excluding any audio content. 
 - 
                                        asResponseFunctionCallArgumentsDeltafinal ResponseFunctionCallArgumentsDeltaEvent asResponseFunctionCallArgumentsDelta() Returned when the model-generated function call arguments are updated. 
 - 
                                        asResponseFunctionCallArgumentsDonefinal ResponseFunctionCallArgumentsDoneEvent asResponseFunctionCallArgumentsDone() Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        asResponseOutputItemAddedfinal ResponseOutputItemAddedEvent asResponseOutputItemAdded() Returned when a new Item is created during Response generation. 
 - 
                                        asResponseOutputItemDonefinal ResponseOutputItemDoneEvent asResponseOutputItemDone() Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        asResponseOutputTextDeltafinal ResponseTextDeltaEvent asResponseOutputTextDelta() Returned when the text value of an "output_text" content part is updated. 
 - 
                                        asResponseOutputTextDonefinal ResponseTextDoneEvent asResponseOutputTextDone() Returned when the text value of an "output_text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        asSessionCreatedfinal SessionCreatedEvent asSessionCreated() Returned when a Session is created. Emitted automatically when a new connection is established as the first server event. This event will contain the default Session configuration. 
 - 
                                        asSessionUpdatedfinal SessionUpdatedEvent asSessionUpdated() Returned when a session is updated with a session.updateevent, unless there is an error.
 - 
                                        asOutputAudioBufferStartedfinal RealtimeServerEvent.OutputAudioBufferStarted asOutputAudioBufferStarted() WebRTC Only: Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added ( response.content_part.added) to the response. Learn more.
 - 
                                        asOutputAudioBufferStoppedfinal RealtimeServerEvent.OutputAudioBufferStopped asOutputAudioBufferStopped() WebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client ( response.done). Learn more.
 - 
                                        asOutputAudioBufferClearedfinal RealtimeServerEvent.OutputAudioBufferCleared asOutputAudioBufferCleared() WebRTC Only: Emitted when the output audio buffer is cleared. This happens either in VAD mode when the user has interrupted ( input_audio_buffer.speech_started), or when the client has emitted theoutput_audio_buffer.clearevent to manually cut off the current audio response. Learn more.
 - 
                                        asConversationItemAddedfinal ConversationItemAdded asConversationItemAdded() Sent by the server when an Item is added to the default Conversation. This can happen in several cases: - When the client sends a - conversation.item.createevent.
- When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. 
- When the model is generating a Response. In this case the - conversation.item.addedevent will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and- statuswill be- in_progress).
 The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a conversation.item.retrieveevent if necessary.
 - 
                                        asConversationItemDonefinal ConversationItemDone asConversationItemDone() Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a conversation.item.retrieveevent if needed.
 - 
                                        asInputAudioBufferTimeoutTriggeredfinal InputAudioBufferTimeoutTriggered asInputAudioBufferTimeoutTriggered() Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured with idle_timeout_msin theturn_detectionsettings of the session, and it indicates that there hasn't been any speech detected for the configured duration.The audio_start_msandaudio_end_msfields indicate the segment of audio after the last model response up to the triggering time, as an offset from the beginning of audio written to the input audio buffer. This means it demarcates the segment of audio that was silent and the difference between the start and end values will roughly match the configured timeout.The empty audio will be committed to the conversation as an input_audioitem (there will be ainput_audio_buffer.committedevent) and a model response will be generated. There may be speech that didn't trigger VAD but is still detected by the model, so the model may respond with something relevant to the conversation or a prompt to continue speaking.
 - 
                                        asConversationItemInputAudioTranscriptionSegmentfinal ConversationItemInputAudioTranscriptionSegment asConversationItemInputAudioTranscriptionSegment() Returned when an input audio transcription segment is identified for an item. 
 - 
                                        asMcpListToolsInProgressfinal McpListToolsInProgress asMcpListToolsInProgress() Returned when listing MCP tools is in progress for an item. 
 - 
                                        asMcpListToolsCompletedfinal McpListToolsCompleted asMcpListToolsCompleted() Returned when listing MCP tools has completed for an item. 
 - 
                                        asMcpListToolsFailedfinal McpListToolsFailed asMcpListToolsFailed() Returned when listing MCP tools has failed for an item. 
 - 
                                        asResponseMcpCallArgumentsDeltafinal ResponseMcpCallArgumentsDelta asResponseMcpCallArgumentsDelta() Returned when MCP tool call arguments are updated during response generation. 
 - 
                                        asResponseMcpCallArgumentsDonefinal ResponseMcpCallArgumentsDone asResponseMcpCallArgumentsDone() Returned when MCP tool call arguments are finalized during response generation. 
 - 
                                        asResponseMcpCallInProgressfinal ResponseMcpCallInProgress asResponseMcpCallInProgress() Returned when an MCP tool call has started and is in progress. 
 - 
                                        asResponseMcpCallCompletedfinal ResponseMcpCallCompleted asResponseMcpCallCompleted() Returned when an MCP tool call has completed successfully. 
 - 
                                        asResponseMcpCallFailedfinal ResponseMcpCallFailed asResponseMcpCallFailed() Returned when an MCP tool call has failed. 
 - 
                                        acceptfinal <T extends Any> T accept(RealtimeServerEvent.Visitor<T> visitor) 
 - 
                                        validatefinal RealtimeServerEvent validate() 
 - 
                                        ofConversationCreatedfinal static RealtimeServerEvent ofConversationCreated(ConversationCreatedEvent conversationCreated) Returned when a conversation is created. Emitted right after session creation. 
 - 
                                        ofConversationItemCreatedfinal static RealtimeServerEvent ofConversationItemCreated(ConversationItemCreatedEvent conversationItemCreated) Returned when a conversation item is created. There are several scenarios that produce this event: - The server is generating a Response, which if successful will produce either one or two Items, which will be of type - message(role- assistant) or type- function_call.
- The input audio buffer has been committed, either by the client or the server (in - server_vadmode). The server will take the content of the input audio buffer and add it to a new user message Item.
- The client has sent a - conversation.item.createevent to add a new Item to the Conversation.
 
 - 
                                        ofConversationItemDeletedfinal static RealtimeServerEvent ofConversationItemDeleted(ConversationItemDeletedEvent conversationItemDeleted) Returned when an item in the conversation is deleted by the client with a conversation.item.deleteevent. This event is used to synchronize the server's understanding of the conversation history with the client's view.
 - 
                                        ofConversationItemInputAudioTranscriptionCompletedfinal static RealtimeServerEvent ofConversationItemInputAudioTranscriptionCompleted(ConversationItemInputAudioTranscriptionCompletedEvent conversationItemInputAudioTranscriptionCompleted) This event is the output of audio transcription for user audio written to the user audio buffer. Transcription begins when the input audio buffer is committed by the client or server (when VAD is enabled). Transcription runs asynchronously with Response creation, so this event may come before or after the Response events. Realtime API models accept audio natively, and thus input transcription is a separate process run on a separate ASR (Automatic Speech Recognition) model. The transcript may diverge somewhat from the model's interpretation, and should be treated as a rough guide. 
 - 
                                        ofConversationItemInputAudioTranscriptionDeltafinal static RealtimeServerEvent ofConversationItemInputAudioTranscriptionDelta(ConversationItemInputAudioTranscriptionDeltaEvent conversationItemInputAudioTranscriptionDelta) Returned when the text value of an input audio transcription content part is updated with incremental transcription results. 
 - 
                                        ofConversationItemInputAudioTranscriptionFailedfinal static RealtimeServerEvent ofConversationItemInputAudioTranscriptionFailed(ConversationItemInputAudioTranscriptionFailedEvent conversationItemInputAudioTranscriptionFailed) Returned when input audio transcription is configured, and a transcription request for a user message failed. These events are separate from other errorevents so that the client can identify the related Item.
 - 
                                        ofConversationItemRetrievedfinal static RealtimeServerEvent ofConversationItemRetrieved(RealtimeServerEvent.ConversationItemRetrieved conversationItemRetrieved) Returned when a conversation item is retrieved with conversation.item.retrieve. This is provided as a way to fetch the server's representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.
 - 
                                        ofConversationItemTruncatedfinal static RealtimeServerEvent ofConversationItemTruncated(ConversationItemTruncatedEvent conversationItemTruncated) Returned when an earlier assistant audio message item is truncated by the client with a conversation.item.truncateevent. This event is used to synchronize the server's understanding of the audio with the client's playback.This action will truncate the audio and remove the server-side text transcript to ensure there is no text in the context that hasn't been heard by the user. 
 - 
                                        ofErrorfinal static RealtimeServerEvent ofError(RealtimeErrorEvent error) Returned when an error occurs, which could be a client problem or a server problem. Most errors are recoverable and the session will stay open, we recommend to implementors to monitor and log error messages by default. 
 - 
                                        ofInputAudioBufferClearedfinal static RealtimeServerEvent ofInputAudioBufferCleared(InputAudioBufferClearedEvent inputAudioBufferCleared) Returned when the input audio buffer is cleared by the client with a input_audio_buffer.clearevent.
 - 
                                        ofInputAudioBufferCommittedfinal static RealtimeServerEvent ofInputAudioBufferCommitted(InputAudioBufferCommittedEvent inputAudioBufferCommitted) Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. The item_idproperty is the ID of the user message item that will be created, thus aconversation.item.createdevent will also be sent to the client.
 - 
                                        ofInputAudioBufferSpeechStartedfinal static RealtimeServerEvent ofInputAudioBufferSpeechStarted(InputAudioBufferSpeechStartedEvent inputAudioBufferSpeechStarted) Sent by the server when in server_vadmode to indicate that speech has been detected in the audio buffer. This can happen any time audio is added to the buffer (unless speech is already detected). The client may want to use this event to interrupt audio playback or provide visual feedback to the user.The client should expect to receive a input_audio_buffer.speech_stoppedevent when speech stops. Theitem_idproperty is the ID of the user message item that will be created when speech stops and will also be included in theinput_audio_buffer.speech_stoppedevent (unless the client manually commits the audio buffer during VAD activation).
 - 
                                        ofInputAudioBufferSpeechStoppedfinal static RealtimeServerEvent ofInputAudioBufferSpeechStopped(InputAudioBufferSpeechStoppedEvent inputAudioBufferSpeechStopped) Returned in server_vadmode when the server detects the end of speech in the audio buffer. The server will also send anconversation.item.createdevent with the user message item that is created from the audio buffer.
 - 
                                        ofRateLimitsUpdatedfinal static RealtimeServerEvent ofRateLimitsUpdated(RateLimitsUpdatedEvent rateLimitsUpdated) Emitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be "reserved" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed. 
 - 
                                        ofResponseOutputAudioDeltafinal static RealtimeServerEvent ofResponseOutputAudioDelta(ResponseAudioDeltaEvent responseOutputAudioDelta) Returned when the model-generated audio is updated. 
 - 
                                        ofResponseOutputAudioDonefinal static RealtimeServerEvent ofResponseOutputAudioDone(ResponseAudioDoneEvent responseOutputAudioDone) Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        ofResponseOutputAudioTranscriptDeltafinal static RealtimeServerEvent ofResponseOutputAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent responseOutputAudioTranscriptDelta) Returned when the model-generated transcription of audio output is updated. 
 - 
                                        ofResponseOutputAudioTranscriptDonefinal static RealtimeServerEvent ofResponseOutputAudioTranscriptDone(ResponseAudioTranscriptDoneEvent responseOutputAudioTranscriptDone) Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        ofResponseContentPartAddedfinal static RealtimeServerEvent ofResponseContentPartAdded(ResponseContentPartAddedEvent responseContentPartAdded) Returned when a new content part is added to an assistant message item during response generation. 
 - 
                                        ofResponseContentPartDonefinal static RealtimeServerEvent ofResponseContentPartDone(ResponseContentPartDoneEvent responseContentPartDone) Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        ofResponseCreatedfinal static RealtimeServerEvent ofResponseCreated(ResponseCreatedEvent responseCreated) Returned when a new Response is created. The first event of response creation, where the response is in an initial state of in_progress.
 - 
                                        ofResponseDonefinal static RealtimeServerEvent ofResponseDone(ResponseDoneEvent responseDone) Returned when a Response is done streaming. Always emitted, no matter the final state. The Response object included in the response.doneevent will include all output Items in the Response but will omit the raw audio data.Clients should check the statusfield of the Response to determine if it was successful (completed) or if there was another outcome:cancelled,failed, orincomplete.A response will contain all output items that were generated during the response, excluding any audio content. 
 - 
                                        ofResponseFunctionCallArgumentsDeltafinal static RealtimeServerEvent ofResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent responseFunctionCallArgumentsDelta) Returned when the model-generated function call arguments are updated. 
 - 
                                        ofResponseFunctionCallArgumentsDonefinal static RealtimeServerEvent ofResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent responseFunctionCallArgumentsDone) Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        ofResponseOutputItemAddedfinal static RealtimeServerEvent ofResponseOutputItemAdded(ResponseOutputItemAddedEvent responseOutputItemAdded) Returned when a new Item is created during Response generation. 
 - 
                                        ofResponseOutputItemDonefinal static RealtimeServerEvent ofResponseOutputItemDone(ResponseOutputItemDoneEvent responseOutputItemDone) Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        ofResponseOutputTextDeltafinal static RealtimeServerEvent ofResponseOutputTextDelta(ResponseTextDeltaEvent responseOutputTextDelta) Returned when the text value of an "output_text" content part is updated. 
 - 
                                        ofResponseOutputTextDonefinal static RealtimeServerEvent ofResponseOutputTextDone(ResponseTextDoneEvent responseOutputTextDone) Returned when the text value of an "output_text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. 
 - 
                                        ofSessionCreatedfinal static RealtimeServerEvent ofSessionCreated(SessionCreatedEvent sessionCreated) Returned when a Session is created. Emitted automatically when a new connection is established as the first server event. This event will contain the default Session configuration. 
 - 
                                        ofSessionUpdatedfinal static RealtimeServerEvent ofSessionUpdated(SessionUpdatedEvent sessionUpdated) Returned when a session is updated with a session.updateevent, unless there is an error.
 - 
                                        ofOutputAudioBufferStartedfinal static RealtimeServerEvent ofOutputAudioBufferStarted(RealtimeServerEvent.OutputAudioBufferStarted outputAudioBufferStarted) WebRTC Only: Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added ( response.content_part.added) to the response. Learn more.
 - 
                                        ofOutputAudioBufferStoppedfinal static RealtimeServerEvent ofOutputAudioBufferStopped(RealtimeServerEvent.OutputAudioBufferStopped outputAudioBufferStopped) WebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client ( response.done). Learn more.
 - 
                                        ofOutputAudioBufferClearedfinal static RealtimeServerEvent ofOutputAudioBufferCleared(RealtimeServerEvent.OutputAudioBufferCleared outputAudioBufferCleared) WebRTC Only: Emitted when the output audio buffer is cleared. This happens either in VAD mode when the user has interrupted ( input_audio_buffer.speech_started), or when the client has emitted theoutput_audio_buffer.clearevent to manually cut off the current audio response. Learn more.
 - 
                                        ofConversationItemAddedfinal static RealtimeServerEvent ofConversationItemAdded(ConversationItemAdded conversationItemAdded) Sent by the server when an Item is added to the default Conversation. This can happen in several cases: - When the client sends a - conversation.item.createevent.
- When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. 
- When the model is generating a Response. In this case the - conversation.item.addedevent will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and- statuswill be- in_progress).
 The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a conversation.item.retrieveevent if necessary.
 - 
                                        ofConversationItemDonefinal static RealtimeServerEvent ofConversationItemDone(ConversationItemDone conversationItemDone) Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a conversation.item.retrieveevent if needed.
 - 
                                        ofInputAudioBufferTimeoutTriggeredfinal static RealtimeServerEvent ofInputAudioBufferTimeoutTriggered(InputAudioBufferTimeoutTriggered inputAudioBufferTimeoutTriggered) Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured with idle_timeout_msin theturn_detectionsettings of the session, and it indicates that there hasn't been any speech detected for the configured duration.The audio_start_msandaudio_end_msfields indicate the segment of audio after the last model response up to the triggering time, as an offset from the beginning of audio written to the input audio buffer. This means it demarcates the segment of audio that was silent and the difference between the start and end values will roughly match the configured timeout.The empty audio will be committed to the conversation as an input_audioitem (there will be ainput_audio_buffer.committedevent) and a model response will be generated. There may be speech that didn't trigger VAD but is still detected by the model, so the model may respond with something relevant to the conversation or a prompt to continue speaking.
 - 
                                        ofConversationItemInputAudioTranscriptionSegmentfinal static RealtimeServerEvent ofConversationItemInputAudioTranscriptionSegment(ConversationItemInputAudioTranscriptionSegment conversationItemInputAudioTranscriptionSegment) Returned when an input audio transcription segment is identified for an item. 
 - 
                                        ofMcpListToolsInProgressfinal static RealtimeServerEvent ofMcpListToolsInProgress(McpListToolsInProgress mcpListToolsInProgress) Returned when listing MCP tools is in progress for an item. 
 - 
                                        ofMcpListToolsCompletedfinal static RealtimeServerEvent ofMcpListToolsCompleted(McpListToolsCompleted mcpListToolsCompleted) Returned when listing MCP tools has completed for an item. 
 - 
                                        ofMcpListToolsFailedfinal static RealtimeServerEvent ofMcpListToolsFailed(McpListToolsFailed mcpListToolsFailed) Returned when listing MCP tools has failed for an item. 
 - 
                                        ofResponseMcpCallArgumentsDeltafinal static RealtimeServerEvent ofResponseMcpCallArgumentsDelta(ResponseMcpCallArgumentsDelta responseMcpCallArgumentsDelta) Returned when MCP tool call arguments are updated during response generation. 
 - 
                                        ofResponseMcpCallArgumentsDonefinal static RealtimeServerEvent ofResponseMcpCallArgumentsDone(ResponseMcpCallArgumentsDone responseMcpCallArgumentsDone) Returned when MCP tool call arguments are finalized during response generation. 
 - 
                                        ofResponseMcpCallInProgressfinal static RealtimeServerEvent ofResponseMcpCallInProgress(ResponseMcpCallInProgress responseMcpCallInProgress) Returned when an MCP tool call has started and is in progress. 
 - 
                                        ofResponseMcpCallCompletedfinal static RealtimeServerEvent ofResponseMcpCallCompleted(ResponseMcpCallCompleted responseMcpCallCompleted) Returned when an MCP tool call has completed successfully. 
 - 
                                        ofResponseMcpCallFailedfinal static RealtimeServerEvent ofResponseMcpCallFailed(ResponseMcpCallFailed responseMcpCallFailed) Returned when an MCP tool call has failed. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-