Rate this page:

VoiceAgentAPIEvents

Constants

ConnectorInformation

Copy URL

Contains information about connector.

Parameters

ConversationCreated

Copy URL

The first message at connection. Notifies the client that a conversation session has been created. https://docs.x.ai/docs/guides/voice/agent#server-events-2

Parameters

ConversationItemAdded

Copy URL

Responding to the client that a new user message has been added to conversation history, or if an assistance response has been added to conversation history. https://docs.x.ai/docs/guides/voice/agent#server

Parameters

ConversationItemInputAudioTranscriptionCompleted

Copy URL

Notify the client the audio transcription for input has been completed. https://docs.x.ai/docs/guides/voice/agent#server

Parameters

InputAudioBufferCleared

Copy URL

Input audio buffer has been cleared. https://docs.x.ai/docs/guides/voice/agent#server-1

Parameters

InputAudioBufferCommitted

Copy URL

Input audio buffer has been committed. https://docs.x.ai/docs/guides/voice/agent#server-1

Parameters

InputAudioBufferSpeechStarted

Copy URL

Notify the client the server's VAD has detected the start of a speech. https://docs.x.ai/docs/guides/voice/agent#server-1

Parameters

InputAudioBufferSpeechStopped

Copy URL

Notify the client the server's VAD has detected the end of a speech. https://docs.x.ai/docs/guides/voice/agent#server-1

Parameters

ResponseContentPartAdded

Copy URL

Notifies client that the content part added.

Parameters

ResponseContentPartDone

Copy URL

Notifies client that the content part done.

Parameters

ResponseCreated

Copy URL

A new assistant response turn is in progress. Audio delta created from this assistant turn will have the same response id. https://docs.x.ai/docs/guides/voice/agent#server-2

Parameters

ResponseDone

Copy URL

The assistant's response is completed. https://docs.x.ai/docs/guides/voice/agent#server-2

Parameters

ResponseFunctionCallArgumentsDone

Copy URL

Parameters

ResponseOutputAudioDone

Copy URL

Notifies client that the audio for this turn has finished generating. https://docs.x.ai/docs/guides/voice/agent#server-3

Parameters

ResponseOutputAudioTranscriptDelta

Copy URL

Audio transcript delta of the assistant response. https://docs.x.ai/docs/guides/voice/agent#server-3

Parameters

ResponseOutputAudioTranscriptDone

Copy URL

The audio transcript delta of the assistant response has finished generating. https://docs.x.ai/docs/guides/voice/agent#server-3

Parameters

ResponseOutputItemAdded

Copy URL

A new assistant response is added to message history. https://docs.x.ai/docs/guides/voice/agent#server-2

Parameters

ResponseOutputItemDone

Copy URL

A new assistant response is done.

Parameters

SessionUpdated

Copy URL

Acknowledge the client's "session.update" message that the session has been updated. https://docs.x.ai/docs/guides/voice/agent#server-events-1

Parameters

Unknown

Copy URL

The unknown event.

Parameters

WebSocketError

Copy URL

The WebSocket error response event.

Parameters