ResponseSession interface
Base for session configuration in the response.
Properties
| agent | The agent configuration for the session, if applicable. |
| animation | The animation configuration for the session. |
| avatar | Configuration for avatar streaming and behavior during the session. |
| id | The unique identifier for the session. |
| input |
Configuration for echo cancellation during server-side audio processing. |
| input |
Input audio format. Default is 'pcm16'. |
| input |
Configuration for input audio noise reduction. |
| input |
Input audio sampling rate in Hz. Available values:
|
| input |
Configuration for input audio transcription. |
| instructions | Optional instructions to guide the model's behavior throughout the session. |
| interim |
Configuration for interim response generation during latency or tool calls. |
| max |
Maximum number of tokens to generate in the response. Default is unlimited. |
| modalities | The modalities to be used in the session. |
| model | The model for the session. |
| output |
Output audio format. Default is 'pcm16'. |
| output |
Types of timestamps to include in audio response content. |
| reasoning |
Constrains effort on reasoning for reasoning models. Check model documentation for supported values for each model. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. |
| temperature | Controls the randomness of the model's output. Range: 0.0 to 1.0. Default is 0.7. |
| tool |
Specifies which tools the model is allowed to call during the session. |
| tools | Configuration for tools to be used during the session, if applicable. |
| turn |
Type of turn detection to use. |
| voice | The voice configuration for the session. |
Property Details
agent
The agent configuration for the session, if applicable.
agent?: AgentConfig
Property Value
animation
avatar
Configuration for avatar streaming and behavior during the session.
avatar?: AvatarConfig
Property Value
id
The unique identifier for the session.
id?: string
Property Value
string
inputAudioEchoCancellation
Configuration for echo cancellation during server-side audio processing.
inputAudioEchoCancellation?: AudioEchoCancellation
Property Value
inputAudioFormat
Input audio format. Default is 'pcm16'.
inputAudioFormat?: string
Property Value
string
inputAudioNoiseReduction
Configuration for input audio noise reduction.
inputAudioNoiseReduction?: AudioNoiseReduction
Property Value
inputAudioSamplingRate
Input audio sampling rate in Hz. Available values:
For pcm16: 8000, 16000, 24000
For g711_alaw/g711_ulaw: 8000
inputAudioSamplingRate?: number
Property Value
number
inputAudioTranscription
Configuration for input audio transcription.
inputAudioTranscription?: AudioInputTranscriptionOptions
Property Value
instructions
Optional instructions to guide the model's behavior throughout the session.
instructions?: string
Property Value
string
interimResponse
Configuration for interim response generation during latency or tool calls.
interimResponse?: InterimResponseConfig
Property Value
maxResponseOutputTokens
Maximum number of tokens to generate in the response. Default is unlimited.
maxResponseOutputTokens?: number | "inf"
Property Value
number | "inf"
modalities
The modalities to be used in the session.
modalities?: string[]
Property Value
string[]
model
The model for the session.
model?: string
Property Value
string
outputAudioFormat
Output audio format. Default is 'pcm16'.
outputAudioFormat?: string
Property Value
string
outputAudioTimestampTypes
Types of timestamps to include in audio response content.
outputAudioTimestampTypes?: string[]
Property Value
string[]
reasoningEffort
Constrains effort on reasoning for reasoning models. Check model documentation for supported values for each model. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
reasoningEffort?: string
Property Value
string
temperature
Controls the randomness of the model's output. Range: 0.0 to 1.0. Default is 0.7.
temperature?: number
Property Value
number
toolChoice
Specifies which tools the model is allowed to call during the session.
toolChoice?: ToolChoice
Property Value
tools
Configuration for tools to be used during the session, if applicable.
tools?: ToolUnion[]