Create real-time, interactive voice conversations with AI agents
wss://api.elevenlabs.io/v1/convai/conversation?agent_id={agent_id}
agent_id
in the WebSocket URL without additional authentication:
ping
messages by sending a pong
message, ensuring the event_id
matches the one received in the ping
message.
Format:
conversation_initiation_client_data
message, optionally including agent prompt overrides, preferred language, TTS voice settings, and custom LLM parameters that will be used for the conversation.
Format:
client_tool_call
messages by sending a client_tool_result
message, ensuring the tool call id matches the one in the received call message.
Type | Purpose |
---|---|
user_transcript | Transcriptions of the user’s speech |
agent_response | Agent’s textual response |
audio | Chunks of the agent’s audio response |
interruption | Indicates that the agent’s response was interrupted |
ping | Server pings to measure latency |
client_tool_call | Initiate client tool call |