Start Conversation Relay
Start a Conversation Relay session on an active call. Conversation Relay connects the call audio to your WebSocket so your application can exchange realtime messages with the caller while Telnyx handles speech recognition and text-to-speech. Only one AI Assistant or Conversation Relay session can be active on a call at a time.
Expected Webhooks:
call.conversation.ended- Sent when the Conversation Relay session ends. If the customer WebSocket disconnects, the webhook payloadreasoniscustomer_disconnect.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier and token for controlling the call
Body
Conversation Relay start request
- Conversation Relay Start Request
- Conversation Relay Start Request
- Conversation Relay Start Request
Start a Conversation Relay session. You may provide the WebSocket URL as url, conversation_relay_url, or conversation_relay_settings.url; top-level values take precedence over nested settings. Use transcription_engine and transcription_engine_config for speech-to-text configuration; the transcription object is not supported.
Public alias for conversation_relay_url. Must start with ws:// or wss://. If both are present, this value wins.
^wss?://"wss://example.com/conversation-relay"
Conversation Relay connection settings. This object can provide url, dtmf_detection, interruptible, interruptible_greeting, and languages. Top-level aliases override nested values when both are present.
{
"url": "wss://example.com/conversation-relay",
"dtmf_detection": true,
"interruptible": "speech",
"interruptible_greeting": "dtmf",
"languages": [
{
"language": "en-US",
"tts_provider": "telnyx",
"voice": "Telnyx.KokoroTTS.af",
"transcription_engine": "Deepgram",
"transcription_engine_config": { "transcription_model": "deepgram/nova-3" }
}
]
}
Public alias for conversation_relay_dtmf_detection. If both are present, this value wins.
true
WebSocket URL for your Conversation Relay server. Must start with ws:// or wss://.
^wss?://"wss://example.com/conversation-relay"
Enable DTMF detection for the relay session.
true
The voice to be used by the voice assistant. Currently we support ElevenLabs, Telnyx and AWS voices.
Supported Providers:
- AWS: Use
AWS.Polly.<VoiceId>(e.g.,AWS.Polly.Joanna). For neural voices, which provide more realistic, human-like speech, append-Neuralto theVoiceId(e.g.,AWS.Polly.Joanna-Neural). Check the available voices for compatibility. - Azure: Use `Azure.. (e.g. Azure.en-CA-ClaraNeural, Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural, Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to Azure Voice Gallery.)
- ElevenLabs: Use
ElevenLabs.<ModelId>.<VoiceId>(e.g.,ElevenLabs.BaseModel.John). TheModelIdpart is optional. To use ElevenLabs, you must provide your ElevenLabs API key as an integration secret under"voice_settings": {"api_key_ref": "<secret_id>"}. See integration secrets documentation for details. Check available voices. - Telnyx: Use
Telnyx.<model_id>.<voice_id> - Inworld: Use
Inworld.<ModelId>.<VoiceId>(e.g.,Inworld.Mini.Loretta,Inworld.Max.Oliver). Supported models:Mini,Max. - xAI: Use
xAI.<VoiceId>(e.g.,xAI.eve). Available voices:eve,ara,rex,sal,leo.
"Telnyx.KokoroTTS.af"
The settings associated with the voice selected
- ElevenLabs Voice Settings
- Telnyx Voice Settings
- AWS Voice Settings
- Minimax Voice Settings
- Azure Voice Settings
- Rime Voice Settings
- Resemble Voice Settings
- Inworld Voice Settings
- xAI Voice Settings
Text played when the relay session starts.
"Hi! Ask me anything!"
Default language for the relay session. This value is used for both text-to-speech and speech recognition.
"en-US"
Per-language TTS and transcription settings.
Settings for handling caller interruptions during Conversation Relay speech.
Not supported for Conversation Relay start requests. Use transcription_engine and transcription_engine_config instead.
Custom parameters for the Conversation Relay session. Pass key-value data as assistant.dynamic_variables to make it available to the relay session.
Use this field to add state to subsequent webhooks. It must be a valid Base-64 encoded string.
"aGF2ZSBhIG5pY2UgZGF5ID1d"
Use this field to avoid duplicate commands. Telnyx will ignore any command with the same command_id for the same call_control_id.
"891510ac-f3e4-11e8-af5b-de00688a4901"
Text-to-speech provider. If omitted, Telnyx derives it from voice or provider.
"telnyx"
Structured voice provider. Must be supplied together with structured_provider.
"elevenlabs"
Provider-specific structured voice settings. Must be supplied together with provider; Telnyx sends the value as the nested provider configuration for Conversation Relay.
{
"voice_id": "voice-id",
"model_id": "Default"
}
Engine to use for speech recognition. Legacy values A - Google, B - Telnyx are supported for backward compatibility. For Conversation Relay, use this field with transcription_engine_config; the transcription object is not supported.
Google, Telnyx, Deepgram, Azure, xAI, AssemblyAI, Speechmatics, Soniox, A, B "Google"
Engine-specific transcription settings for Conversation Relay. This accepts the same provider-specific options used by the Call Transcription Start command, such as transcription_model, without requiring the engine discriminator to be repeated inside this object.
{
"transcription_model": "deepgram/nova-3",
"interim_results": true,
"keywords_boosting": { "telnyx": 2 }
}
Controls when caller input can interrupt assistant speech. any allows speech or DTMF interruptions; none disables interruptions; speech allows speech only; dtmf allows DTMF only.
none, any, speech, dtmf "speech"
Controls when caller input can interrupt assistant speech. any allows speech or DTMF interruptions; none disables interruptions; speech allows speech only; dtmf allows DTMF only.
none, any, speech, dtmf "speech"
Custom key-value parameters forwarded to the relay session as assistant.dynamic_variables. If assistant.dynamic_variables is also present, these values are merged in.
{ "customer_id": "12345" }
Response
Successful response upon starting Conversation Relay.
{
"result": "ok",
"conversation_relay_id": "d7e9c1d4-8b2a-4b8f-b3a7-9a671c9e9b0a"
}