VoiceAgentRealtimeResponseBase interface

Properties shared by realtime responses returned by the voice-agent service.

Properties

conversation_id

Which conversation the response is added to, determined by the conversation field in the response.create event. If auto, the response will be added to the default conversation and the value of conversation_id will be an id like conv_1234. If none, the response will not be added to any conversation and the value of conversation_id will be null. If responses are being triggered automatically by VAD the response will be added to the default conversation

id

The unique ID of the response, will look like resp_1234.

max_output_tokens

Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.

metadata

Custom string key-value pairs associated with the response.

object

The object type, must be realtime.response.

output_modalities

The set of modalities the model used to respond, currently the only possible values are [\"audio\"], [\"text\"]. Audio output always include a text transcript. Setting the output to mode text will disable audio output from the model.

status

The final status of the response (completed, cancelled, failed, or incomplete, in_progress).

status_details

Additional details about the status.

usage

Usage statistics for the Response, this will correspond to billing. A Realtime API session will maintain a conversation context and append new Items to the Conversation, thus output from previous turns (text and audio tokens) will become the input for later turns.

Property Details

conversation_id

Which conversation the response is added to, determined by the conversation field in the response.create event. If auto, the response will be added to the default conversation and the value of conversation_id will be an id like conv_1234. If none, the response will not be added to any conversation and the value of conversation_id will be null. If responses are being triggered automatically by VAD the response will be added to the default conversation

conversation_id?: string

Property Value

string

id

The unique ID of the response, will look like resp_1234.

id?: string

Property Value

string

max_output_tokens

Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.

max_output_tokens?: number | "inf"

Property Value

number | "inf"

metadata

Custom string key-value pairs associated with the response.

metadata?: Metadata

Property Value

object

The object type, must be realtime.response.

object?: "realtime.response"

Property Value

"realtime.response"

output_modalities

The set of modalities the model used to respond, currently the only possible values are [\"audio\"], [\"text\"]. Audio output always include a text transcript. Setting the output to mode text will disable audio output from the model.

output_modalities?: ("text" | "audio")[]

Property Value

("text" | "audio")[]

status

The final status of the response (completed, cancelled, failed, or incomplete, in_progress).

status?: "failed" | "in_progress" | "cancelled" | "completed" | "incomplete"

Property Value

"failed" | "in_progress" | "cancelled" | "completed" | "incomplete"

status_details

Additional details about the status.

status_details?: RealtimeResponseStatusDetails

Property Value

usage

Usage statistics for the Response, this will correspond to billing. A Realtime API session will maintain a conversation context and append new Items to the Conversation, thus output from previous turns (text and audio tokens) will become the input for later turns.

usage?: RealtimeResponseUsage

Property Value