- API Reference
- endpoint
- audio
Audio Sessions
Audio Sessions
POST /v1/audio/sessions
Create an agent session
Create a real-time audio agent session.
Request Example
{}
Request Body
agent_id
string | nullagent_version
integer | nullinstructions
string | nullAudioLLMConfig
model
stringAudioSTTConfig
context_bias
array<string> | nulllanguage
string | nullmodel
stringtarget_streaming_delay_ms
integer | nullturn_detection
AudioTurnDetectionConfig | nullAudioTurnDetectionConfig
eager_end_threshold
number | nullend_threshold
number | nullend_timeout_ms
integer | nullmin_silence_ms
integer | nullstart_threshold
number | nulltools
array<VoiceAgentWebSearchTool | VoiceAgentDocumentLibraryTool | VoiceAgentCustomConnector | VoiceAgentFunctionToolRequest | TransferCallTool | HangUpTool> | nullVoiceAgentWebSearchTool
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
tool_configuration
ToolConfiguration | nullToolConfiguration
exclude
array<string> | nullinclude
array<string> | nullrequires_confirmation
array<string> | nulltype
"web_search"Default Value: "web_search"
VoiceAgentDocumentLibraryTool
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
library_ids
array<string>Min Items: 1* requiredIds of the library in which to search.
tool_configuration
ToolConfiguration | nullToolConfiguration
exclude
array<string> | nullinclude
array<string> | nullrequires_confirmation
array<string> | nulltype
"document_library"Default Value: "document_library"
VoiceAgentCustomConnector
authorization
OAuth2TokenAuth | APIKeyAuth | nullDeprecated: per-request connector credentials will be removed. Authenticate the connector through the Connectors API instead.
OAuth2TokenAuth
type
"oauth2-token"Default Value: "oauth2-token"
value
string* requiredAPIKeyAuth
type
"api-key"Default Value: "api-key"
value
string* requiredconnector_id
string* requiredfiller
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
tool_configuration
ToolConfiguration | nullToolConfiguration
exclude
array<string> | nullinclude
array<string> | nullrequires_confirmation
array<string> | nulltype
"connector"Default Value: "connector"
VoiceAgentFunctionToolRequest
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
FunctionRequest
description
stringMax Length: 1024Default Value: ""
name
stringPattern: ^[a-zA-Z0-9_-]{1,64}$* requiredparameters
map<any>* requiredstrict
booleanDefault Value: false
timeout_ms
integer | nulltype
"function"Default Value: "function"
TransferCallTool
TransferTarget
One allowed hand-off, chosen by the model through id alone.
The address never reaches the model: it only sees id and condition, so it cannot dial a near-miss of a real number.
condition
stringMin Length: 1Max Length: 200* requiredPhoneDestination
number
stringPattern: ^\+[1-9]\d{1,14}$* requiredtype
stringDefault Value: "phone"
SipDestination
type
stringDefault Value: "sip"
uri
stringPattern: ^sips?:[^\s@]+@[^\s@]+$* requiredid
stringPattern: ^[a-z0-9][a-z0-9_-]{0,31}$* requiredfiller
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
type
stringDefault Value: "transfer_call"
HangUpTool
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
type
stringDefault Value: "hang_up"
AudioTTSConfig
expressiveness
number | nullmodel
stringvoice_id
stringturn
AudioTurnConfigAudioTurnConfig
allow_interruptions
booleaninactivity
AudioInactivityConfig | nullAudioInactivityConfig
max_reminders
integerMin: 1Max: 10* requiredmessages
array<string>Max Items: 5timeout_ms
integerMin: 1000Max: 300000* requiredwelcome_message
string | nullResponses
Successful Response
created_at
date-time* requiredexpires_at
date-time* requiredfunction_tools
array<VoiceAgentFunctionTool>Effective function declarations after saved-agent and session overrides are merged. Connected SDKs can compare them with their local handlers.
VoiceAgentFunctionTool
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
Function
description
stringDefault Value: ""
name
string* requiredparameters
map<any>* requiredstrict
booleanDefault Value: false
timeout_ms
integer | nulltype
"function"Default Value: "function"
id
string* requiredparticipant_token
string* requiredserver_url
string* requiredGET /v1/audio/sessions/{session_id}
Get session status
Retrieve an audio agent session with the transcript of its conversation.
Parameters
session_id
stringpath* requiredResponses
Successful Response
bridge_metadata
AmazonConnectContact | nullContact metadata recorded when Amazon Connect starts a session.
AmazonConnectContact
Contact metadata recorded when Amazon Connect starts a session.
called_number
string | nullcaller_number
string | nullchannel
string | nullcontact_arn
string | nullcontact_id
string | nullcontext_id
stringMin Length: 1Max Length: 1024* requiredAmazon Connect session context ID.
instance_arn
string | nullinstance_id
string | nulltype
string* requiredcreated_at
date-time* requiredid
string* requirednum_participants
integer* requiredphone_call
AudioSessionPhoneCall | nullThe phone line a session is attached to.
Present only when the caller reached the agent over telephony, null for a session started from a browser or the API.
AudioSessionPhoneCall
The phone line a session is attached to.
Present only when the caller reached the agent over telephony, null for a session started from a browser or the API.
phone_number
AudioSessionPhoneNumber | nullThe line the call came in on, as it stands now.
AudioSessionPhoneNumber
The line the call came in on, as it stands now.
id
string* requiredidentifier
string* requiredWhat the caller dialed to reach this number.
name
string | nullphone_number_id
string* requiredstatus
"active" | "ended"* requiredtranscripts
array<AudioUserTranscriptTurn | AudioAssistantTranscriptTurn | AudioToolTranscriptTurn> | nullThe turns of the conversation, or null while no transcript has been recorded for this session yet.
AudioUserTranscriptTurn
content
string | nullText as delivered in the conversation: the recognized transcript for user turns, and the audio actually played to the caller for assistant turns. Null only as a fallback for incomplete data.
duration_ms
number | nullAudioLatencyBreakdownUser
end_of_turn_delay_ms
number | nulltranscription_delay_ms
number | nullrole
string* requiredtimestamp
date-time* requiredAudioAssistantTranscriptTurn
content
string | nullText as delivered in the conversation: the recognized transcript for user turns, and the audio actually played to the caller for assistant turns. Null only as a fallback for incomplete data.
duration_ms
number | nullis_interruption
booleanDefault Value: false
AudioLatencyBreakdownAssistant
e2e_latency_ms
number | nullllm_duration_ms
number | nullllm_ttft_ms
number | nulltts_duration_ms
number | nulltts_ttfb_ms
number | nullrole
string* requiredtimestamp
date-time* requiredtool_calls
array<AudioToolCall>Tools the model requested in this step. Each result follows as a tool turn with the same id.
AudioToolCall
arguments
string | nullJSON text, or null when unavailable or withheld.
id
string* requiredname
string* requiredAudioToolTranscriptTurn
duration_ms
number | nullname
string* requiredresult
anyDecoded JSON or plain text; null when unavailable or withheld.
role
string* requiredstatus
"success" | "error" | "unknown"* requiredtimestamp
date-time* requiredWhen the tool started executing.
tool_call_id
string* requiredDELETE /v1/audio/sessions/{session_id}
Stop an agent session
Stop an audio agent session and release its resources.
Parameters
session_id
stringpath* requiredPATCH /v1/audio/sessions/{session_id}
Update a live agent session
Update the instructions, tools or turn handling of a live session.
The agent applies the update at its next turn boundary, so it is not yet applied when this returns. The agent's session_updated and session_update_failed webhooks report the outcome to your server.
Parameters
session_id
stringpath* requiredRequest Example
{}
Request Body
instructions
string | nulltools
array<VoiceAgentWebSearchTool | VoiceAgentDocumentLibraryTool | VoiceAgentCustomConnector | VoiceAgentFunctionToolRequest | TransferCallTool | HangUpTool> | nullVoiceAgentWebSearchTool
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
tool_configuration
ToolConfiguration | nullToolConfiguration
exclude
array<string> | nullinclude
array<string> | nullrequires_confirmation
array<string> | nulltype
"web_search"Default Value: "web_search"
VoiceAgentDocumentLibraryTool
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
library_ids
array<string>Min Items: 1* requiredIds of the library in which to search.
tool_configuration
ToolConfiguration | nullToolConfiguration
exclude
array<string> | nullinclude
array<string> | nullrequires_confirmation
array<string> | nulltype
"document_library"Default Value: "document_library"
VoiceAgentCustomConnector
authorization
OAuth2TokenAuth | APIKeyAuth | nullDeprecated: per-request connector credentials will be removed. Authenticate the connector through the Connectors API instead.
OAuth2TokenAuth
type
"oauth2-token"Default Value: "oauth2-token"
value
string* requiredAPIKeyAuth
type
"api-key"Default Value: "api-key"
value
string* requiredconnector_id
string* requiredfiller
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
tool_configuration
ToolConfiguration | nullToolConfiguration
exclude
array<string> | nullinclude
array<string> | nullrequires_confirmation
array<string> | nulltype
"connector"Default Value: "connector"
VoiceAgentFunctionToolRequest
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
FunctionRequest
description
stringMax Length: 1024Default Value: ""
name
stringPattern: ^[a-zA-Z0-9_-]{1,64}$* requiredparameters
map<any>* requiredstrict
booleanDefault Value: false
timeout_ms
integer | nulltype
"function"Default Value: "function"
TransferCallTool
TransferTarget
One allowed hand-off, chosen by the model through id alone.
The address never reaches the model: it only sees id and condition, so it cannot dial a near-miss of a real number.
condition
stringMin Length: 1Max Length: 200* requiredPhoneDestination
number
stringPattern: ^\+[1-9]\d{1,14}$* requiredtype
stringDefault Value: "phone"
SipDestination
type
stringDefault Value: "sip"
uri
stringPattern: ^sips?:[^\s@]+@[^\s@]+$* requiredid
stringPattern: ^[a-z0-9][a-z0-9_-]{0,31}$* requiredfiller
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
type
stringDefault Value: "transfer_call"
HangUpTool
filler
StaticToolFiller | GeneratedToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
GeneratedToolFiller
A filler the model writes for each call, in the user's language.
instructions guide what it says. fallback is spoken when it writes none; without one, the call is silent.
fallback
StaticToolFiller | nullStaticToolFiller
text
stringMin Length: 1Max Length: 200* requiredtype
stringDefault Value: "static"
instructions
string | nulltype
stringDefault Value: "generated"
type
stringDefault Value: "hang_up"
turn
AudioSessionTurnUpdate | nullAudioSessionTurnUpdate
allow_interruptions
boolean | nullResponses
Successful Response
bridge_metadata
AmazonConnectContact | nullContact metadata recorded when Amazon Connect starts a session.
AmazonConnectContact
Contact metadata recorded when Amazon Connect starts a session.
called_number
string | nullcaller_number
string | nullchannel
string | nullcontact_arn
string | nullcontact_id
string | nullcontext_id
stringMin Length: 1Max Length: 1024* requiredAmazon Connect session context ID.
instance_arn
string | nullinstance_id
string | nulltype
string* requiredcreated_at
date-time* requiredid
string* requirednum_participants
integer* requiredphone_call
AudioSessionPhoneCall | nullThe phone line a session is attached to.
Present only when the caller reached the agent over telephony, null for a session started from a browser or the API.
AudioSessionPhoneCall
The phone line a session is attached to.
Present only when the caller reached the agent over telephony, null for a session started from a browser or the API.
phone_number
AudioSessionPhoneNumber | nullThe line the call came in on, as it stands now.
AudioSessionPhoneNumber
The line the call came in on, as it stands now.
id
string* requiredidentifier
string* requiredWhat the caller dialed to reach this number.