VoiceAgentResponseCreateParams interface

Parameters accepted by a voice-agent response.create event.

Properties

audio

Response-specific audio settings.

conversation

Controls which conversation the response is added to. Currently supports auto and none, with auto as the default value. The auto value means that the contents of the response will be added to the default conversation. Set this to none to create an out-of-band response which will not add items to default conversation.

input

Conversation items used as inline response input.

instructions

The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the session.created event at the start of the session.

interim_response

Interim-response settings for this response.

max_output_tokens

Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inf for the maximum available tokens for a given model. Defaults to inf.

metadata

Custom string key-value pairs to associate with the response.

output_modalities

Modalities that the response may return.

parallel_tool_calls

Whether the model may call multiple tools in parallel. Only supported by reasoning Realtime models such as gpt-realtime-2.

pre_generated_assistant_message

A pre-generated assistant message used to begin the response.

reasoning

Reasoning settings for the response when using a reasoning-capable realtime model.

tools

Tools available to the model.

tool_choice

How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool.

Property Details

audio

Response-specific audio settings.

audio?: PickPropertiesVoiceAgentAudioConfig

Property Value

conversation

Controls which conversation the response is added to. Currently supports auto and none, with auto as the default value. The auto value means that the contents of the response will be added to the default conversation. Set this to none to create an out-of-band response which will not add items to default conversation.

conversation?: "auto" | "none"

Property Value

"auto" | "none"

input

Conversation items used as inline response input.

input?: RealtimeConversationItemUnion[]

Property Value

instructions

The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the session.created event at the start of the session.

instructions?: string

Property Value

string

interim_response

Interim-response settings for this response.

interim_response?: VoiceAgentInterimResponseConfigUnion

Property Value

max_output_tokens

Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inf for the maximum available tokens for a given model. Defaults to inf.

max_output_tokens?: number | "inf"

Property Value

number | "inf"

metadata

Custom string key-value pairs to associate with the response.

metadata?: Metadata

Property Value

output_modalities

Modalities that the response may return.

output_modalities?: VoiceOutputModality[]

Property Value

parallel_tool_calls

Whether the model may call multiple tools in parallel. Only supported by reasoning Realtime models such as gpt-realtime-2.

parallel_tool_calls?: boolean

Property Value

boolean

pre_generated_assistant_message

A pre-generated assistant message used to begin the response.

pre_generated_assistant_message?: RealtimeConversationItemUnion

Property Value

reasoning

Reasoning settings for the response when using a reasoning-capable realtime model.

reasoning?: RealtimeReasoning

Property Value

tools

Tools available to the model.

tools?: (MCPTool | RealtimeFunctionTool)[]

Property Value

tool_choice

How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool.

tool_choice?: ToolChoiceFunction | ToolChoiceMCP | ToolChoiceOptions

Property Value