VoiceAgentRealtimeResponse interface
A live realtime response returned by the voice-agent service in both response.created and response.done events.
- Extends
Properties
| audio | The audio configuration used by the live response, including flat voice provider, locale, and format fields under |
| output | The items produced by the live response. |
Inherited Properties
| conversation_id | Which conversation the response is added to, determined by the |
| id | The unique ID of the response, will look like |
| 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 |
| output_modalities | The set of modalities the model used to respond, currently the only possible values are
|
| status | The final status of the response ( |
| 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
audio
The audio configuration used by the live response, including flat voice provider, locale, and format fields under output.
audio?: VoiceResponseAudio
Property Value
output
The items produced by the live response.
output?: RealtimeConversationItemUnion[]
Property Value
Inherited 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
Inherited From VoiceAgentRealtimeResponseBase.conversation_id
id
The unique ID of the response, will look like resp_1234.
id?: string
Property Value
string
Inherited From VoiceAgentRealtimeResponseBase.id
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"
Inherited From VoiceAgentRealtimeResponseBase.max_output_tokens
metadata
Custom string key-value pairs associated with the response.
metadata?: Metadata
Property Value
Inherited From VoiceAgentRealtimeResponseBase.metadata
object
The object type, must be realtime.response.
object?: "realtime.response"
Property Value
"realtime.response"
Inherited From VoiceAgentRealtimeResponseBase.object
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")[]
Inherited From VoiceAgentRealtimeResponseBase.output_modalities
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"
Inherited From VoiceAgentRealtimeResponseBase.status
status_details
Additional details about the status.
status_details?: RealtimeResponseStatusDetails
Property Value
Inherited From VoiceAgentRealtimeResponseBase.status_details
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
Inherited From VoiceAgentRealtimeResponseBase.usage