createSession
Create a short-lived voice session for live chat, returning a single-use WebSocket URL for client connection. Step 1 of 2: audio starts only after client connects.
Instructions
Create a voice Session: a short-lived, single-conversation
reservation that lets a client hold a live voice chat with your
agent. This is step 1 of 2. Creating the Session does not start any
audio on its own; it returns a ws_url that a client then connects
to over WebSocket to actually talk.
Call this endpoint from your server with your API key, and return
only the ws_url to your client. The API key must never reach the
browser. The ws_url is the only thing the client needs, and it is
safe to hand out because it is single-use and expires. For how to
connect and talk, see "Connect the client and talk" below the
request details.
(Tags: Sessions)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requestBody | Yes | The JSON request body. |