VoiceResponse interface

A persisted voice response representing one model inference turn within a conversation. In list results the output projection may be omitted; retrieve the full response (GET .../responses/{response_id}) or the paged response-items route (GET .../responses/{response_id}/items) for its output items. created_at/completed_at are Foundry durable ordering extensions.

Properties

audio

The audio configuration used for the response, including the voice and audio format used for output.

completed_at

The Unix timestamp (in seconds) for when the response completed.

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

created_at

The Unix timestamp (in seconds) for when the response was created.

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

The list of output items generated by the 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.

temperature

The sampling temperature used for the response.

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 for the response, including the voice and audio format used for output.

audio?: VoiceResponseAudio

Property Value

completed_at

The Unix timestamp (in seconds) for when the response completed.

completed_at?: Date

Property Value

Date

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

created_at

The Unix timestamp (in seconds) for when the response was created.

created_at?: Date

Property Value

Date

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

The list of output items generated by the response.

output?: RealtimeConversationItemUnion[]

Property Value

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

temperature

The sampling temperature used for the response.

temperature?: number

Property Value

number

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