The generic WebSocket endpoint is a protocol-agnostic way to connect a WebSocket client to your Pipecat Cloud agent. Unlike the provider-specific endpoints (Documentation Index
Fetch the complete documentation index at: https://daily-ms-pcc-830.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
/ws/twilio, /ws/plivo, etc.), it imposes no protocol requirements. Messages are relayed directly between the client and your bot without validation or transformation.
When to Use
- Telephony providers: Connect any telephony provider that supports WebSocket audio streaming.
- Server-to-server integrations: Connect your own backend or a third-party platform over WebSocket.
- Custom WebSocket clients: Any client that can establish a WebSocket connection.
Web and mobile clients: Browsers and mobile apps can connect via
WebSocket, but we recommend WebRTC instead. WebRTC handles varying network
conditions, media quality, and reconnect behavior better than raw WebSocket.
See the Daily WebRTC guide or the
SmallWebRTC client SDKs for recommended web and
mobile options.
Endpoint
{agentName}.{organizationName}) can also be provided as a query parameter:
Authentication
The generic endpoint supports optional HMAC token authentication, controlled by thewebsocket_auth setting on your agent. See the WebSocket Authentication guide for details on how to configure and use token authentication.
When websocket_auth is set to none, clients can connect directly without a token:
Message Format
The generic endpoint supports both text and binary WebSocket frames. Your bot receives messages exactly as sent by the client — no protocol-specific parsing or transformation is applied. Your bot code is responsible for handling the client’s message format. Use the appropriate serializer for your client’s protocol, or implement custom message handling for non-standard clients.Passing parameters to the bot
When your service is deployed withwebsocket_auth = "token", you can pass arbitrary JSON data to your bot at session start by including a body in the /start request:
args.body — the same way it works for daily and webrtc transports. See Passing data for examples in your bot code.
Body delivery for
transport: "websocket" requires websocket_auth = "token". The body is held server-side and handed to the bot once the WebSocket upgrade authenticates the session token — the returned wsUrl itself is unchanged regardless of body size. Maximum body size is 1 MB of JSON, matching the other transports.A /start call with a body against a service that has websocket_auth = "none" is rejected with 400 Bad Request.