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.

Extends

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

The id of the conversation this response belongs to.

created_at

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

id

The unique id of the response.

metadata

A set of key-value pairs attached to the response.

output

The output items produced by the response. May be omitted in list results; retrieve the full response (GET .../responses/{response_id}) or use the paged response-items route (GET .../responses/{response_id}/items) for its output items. Each item's response_id also links it back to this response in the conversation-level items list.

temperature

The sampling temperature used for the response.

Inherited Properties

max_output_tokens

Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this 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

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

The id of the conversation this response belongs to.

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.

id: string

Property Value

string

metadata

A set of key-value pairs attached to the response.

metadata?: Record<string, string>

Property Value

Record<string, string>

output

The output items produced by the response. May be omitted in list results; retrieve the full response (GET .../responses/{response_id}) or use the paged response-items route (GET .../responses/{response_id}/items) for its output items. Each item's response_id also links it back to this response in the conversation-level items list.

output?: RealtimeConversationItemUnion[]

Property Value

temperature

The sampling temperature used for the response.

temperature?: number

Property Value

number

Inherited Property Details

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 VoiceResponseBase.max_output_tokens

object

The object type, must be realtime.response.

object?: "realtime.response"

Property Value

"realtime.response"

Inherited From VoiceResponseBase.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 VoiceResponseBase.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 VoiceResponseBase.status

status_details

Additional details about the status.

status_details?: RealtimeResponseStatusDetails

Property Value

Inherited From VoiceResponseBase.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 VoiceResponseBase.usage