Skip to main content
WSS
assistant_id
type:string
required

Identifier of the AI Assistant to converse with.

bearerAuth
type:http

Telnyx API v2 Bearer token authentication.

query
type:object

Query parameters passed when opening the WebSocket connection.

Input Audio Append Frame
type:object

Client-to-Telnyx frame carrying a chunk of microphone audio. The audio field is a base64-encoded PCM16 payload at the sample rate requested with the input_sample_rate query parameter. Frames larger than 1 MiB are rejected with a frame_too_large error.

Create Conversation Item Frame
type:object

Client-to-Telnyx frame that adds a conversation item. Two item types are supported: a user message with input_text content (injects a completed user turn, which the assistant answers exactly as it would a spoken one), and a function_call_output that returns the result of a client-side tool function_call previously requested by Telnyx. There is no separate frame to request a response — the assistant owns turn-taking. An item of any other shape is rejected with an invalid_item error.

Response Cancel Frame
type:object

Client-to-Telnyx frame that cancels the in-progress assistant response (client-initiated barge-in without audio). Include response_id to target a specific response; omit it to cancel the current one. Cancelling flushes playback and Telnyx emits a response.done frame with status cancelled. Cancelling a stale or already-finished response is a no-op.

Session Created Frame
type:object

First frame sent by Telnyx once the conversation has started. Confirms the session and the negotiated input and output audio formats.

Speech Started Frame
type:object

Sent when server-side voice-activity detection determines the user has started speaking. Edge-triggered.

Speech Stopped Frame
type:object

Sent when server-side voice-activity detection determines the user has stopped speaking. Edge-triggered, and never sent without a preceding speech-started.

Input Transcription Completed Frame
type:object

Transcript of the audio the user streamed for the current turn.

Response Created Frame
type:object

Marks the start of an assistant turn. The response.id correlates the audio and transcript deltas that follow.

Response Audio Delta Frame
type:object

A chunk of the assistant''s synthesized speech, as base64-encoded PCM16 at the output rate announced in session.created.

Response Audio Transcript Delta Frame
type:object

A chunk of the text transcript of the assistant''s spoken response, streamed alongside the audio deltas.

Response Audio Done Frame
type:object

Sent when the assistant has finished streaming audio for the turn.

Response Done Frame
type:object

Marks the end of an assistant turn, including its final status.

Conversation Item Created Frame
type:object

Telnyx-to-client frame requesting a client-side tool call. When the assistant invokes a client_side_tool, Telnyx sends a function_call item that the client executes locally. The client returns the result with a conversation.item.create frame carrying a function_call_output item that references the same call_id. The assistant continues once the result arrives, or after the tool times out.

Tool Call Started Frame
type:object

Informational frame sent when the assistant invokes a server-side tool (for example a webhook or MCP integration). Telnyx executes tools server-side, so these frames are observational only: the client displays tool activity but does not execute or respond to the call.

Tool Call Completed Frame
type:object

Informational frame sent when a server-side tool invocation finishes, with its outcome.

Error Frame
type:object

Sent when an error occurs. Some errors are non-fatal and leave the session open; others close the connection after the frame is sent.