Skip to content

live.connectLive

GET
/v1/chats/{chatId}/live
curl --request GET \
--url 'https://example.com/v1/chats/example/live?turnDetection=server' \
--header 'Authorization: Bearer <token>'

Opens the Live WebSocket of a live Chat. Each thing the person says starts a Turn, and the Bot answers with sound and text. Turns use the shared execution engine. Sound stays on the open connection. A browser must connect from the public origin.

chatId
required
string
>= 1 characters
voice
string
>= 1 characters
inputFormat
string
/^(?:pcm16|g711_ulaw|g711_alaw|opus)@[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:[Ee][+-]?\d+)?$/
outputFormat
string
/^(?:pcm16|g711_ulaw|g711_alaw|opus)@[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:[Ee][+-]?\d+)?$/
turnDetection
string
Allowed values: server client
organization
string
>= 1 characters

ChatModelInvalid | OrganizationRequired

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ChatModelInvalid
reason
required
string
Allowed values: provider-not-found model-not-found unsupported-option missing
message
required
string

Example

{
"_tag": "ChatModelInvalid",
"reason": "provider-not-found"
}

AuthenticationRequired

Media typeapplication/json
object
_tag
required
string
Allowed values: AuthenticationRequired

Example

{
"_tag": "AuthenticationRequired"
}

@nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: Forbidden
action
required
string
kind
required
string
field
string
reason
string

Example

{
"_tag": "Forbidden"
}

ChatNotFound

Media typeapplication/json
object
_tag
required
string
Allowed values: ChatNotFound
chat
required
string

Example

{
"_tag": "ChatNotFound"
}

ChatConflict | LiveUnavailable | @nmnmcc/ability/Authorizer/Pending

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ChatConflict
message
required
string

Example

{
"_tag": "ChatConflict"
}

RateLimited

Media typeapplication/json
object
_tag
required
string
Allowed values: RateLimited
retryAfterSeconds
required
integer
>= -9007199254740991 <= 9007199254740991

Example

{
"_tag": "RateLimited"
}

ChatStorageUnavailable | ChatExecutionUnavailable | AuthenticationUnavailable | RequestFailed

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ChatStorageUnavailable

Example

{
"_tag": "ChatStorageUnavailable"
}