GA Twilio

Twilio ConversationRelay

Managed voice layer on Twilio calls: Twilio handles speech recognition (Deepgram or Google), text-to-speech (ElevenLabs, Google, Amazon), interruptions and turn-taking, and sends you text over a WebSocket so you only run the LLM logic.

Est. per minute$0.08 - 0.12

Overview

Best for: Teams that want to own the LLM/agent logic in plain text while Twilio runs speech and telephony.

At a glance

Platform $/min$0.07
All-in priceNo
Entry plan $/mo$0
Free tierYes
Phone numbersYes
Own LLMYes
RecordingYes
Smart turnsYes
WebSocketYes
Phone / SIPYes
HIPAAYes
Self-hostNo
Open weightsNo

$0.07/min reportedly includes STT and TTS (not stated explicitly by Twilio); you run the LLM. Voice minutes and numbers billed on top. Free tier is Twilio trial credit only. HIPAA needs a signed BAA.

Audio in

Phone call; Twilio does STT and sends text to you

Audio out

You send text tokens; Twilio does TTS

Languages

Many via Google/Deepgram STT and ElevenLabs/Google/Amazon voices; 'multi' auto-detect requires Deepgram + ElevenLabs.

Latency

No verified number.

Regions

Twilio global; not region-pinned in sources reviewed.

Compliance

HIPAA eligible with a signed BAA (per TwiML docs); Twilio-wide SOC 2/GDPR programs not re-verified here.

Features

  • turn detection (Deepgram Flux eotThreshold, speechTimeout)
  • interruptions (interruptible, interruptSensitivity)
  • telephony
  • DTMF
  • language switching
  • end session with handoffData
  • welcome greeting

Pricing

WhatPriceUnitNotes
ConversationRelay$0.07per minuteTwilio says voice costs are calculated separately. Third-party sources describe the speech side (STT/TTS) as included; Twilio's page does not state it explicitly.
Inbound local call$0.0085per minutePlus $1.15/month per local number.
Outbound call (US/Canada)$0.014per minute
Recording$0.0025per minuteStorage $0.0005/min/month.
Branded calling$0.12per callOptional.
Answering machine detection$0.0075per callOptional.
How the per-minute estimate was worked out

$0.07 ConversationRelay + $0.0085 inbound or $0.014 outbound + your own LLM (roughly $0.002-0.03/min depending on model). Assumes STT/TTS are included in the $0.07 as third parties report.

Free tier: Twilio trial credit only.

Source: twilio.com

Setup

  1. Complete ConversationRelay onboarding and accept the AI/ML addendum in the Twilio Console.
  2. Buy a number and point its voice webhook to a TwiML endpoint that returns <Connect><ConversationRelay url="wss://...">.
  3. Run a WebSocket server: on 'setup' store call info, on 'prompt' send the caller text to your LLM and stream back 'text' tokens with last=true on the final one.
  4. Handle 'interrupt' by cancelling the in-flight LLM stream.

Endpoint

TwiML <Connect><ConversationRelay> + your wss:// server

Authentication

Twilio Account SID / Auth Token (validate X-Twilio-Signature on webhooks)

Quick start javascript

// Node: TwiML webhook + ConversationRelay WebSocket (message names per Twilio docs; verify schema)
import express from "express";
import { WebSocketServer } from "ws";
const app = express();
app.post("/voice", (req, res) => {
  res.type("text/xml").send(
    '<Response><Connect><ConversationRelay url="wss://ai.example.com/relay" ' +
    'welcomeGreeting="Hi, this is an AI assistant. How can I help?" /></Connect></Response>');
});
const server = app.listen(3000);
const wss = new WebSocketServer({ server, path: "/relay" });
wss.on("connection", (ws) => {
  ws.on("message", async (raw) => {
    const msg = JSON.parse(raw);
    if (msg.type === "setup") console.log("call", msg.callSid);
    if (msg.type === "prompt") {
      const reply = await askLLM(msg.voicePrompt);       // your LLM call
      ws.send(JSON.stringify({ type: "text", token: reply, last: true }));
    }
    if (msg.type === "interrupt") { /* cancel in-flight LLM stream */ }
  });
});

Written from the current docs. Check the vendor's SDK version before you ship.

Warnings

Two meters: $0.07/min plus the phone minutes

ConversationRelay is billed on top of inbound/outbound voice minutes and number rental; your LLM is billed by its provider.

Default STT changed in 2025

transcriptionProvider defaults to Deepgram, but accounts that used ConversationRelay before 12 Sep 2025 default to Google. Set it explicitly so behaviour does not differ between accounts.

Bad provider/voice combos hang up the call

An invalid transcriptionProvider/speechModel or ttsProvider/voice pair sends an error and disconnects. Test every voice you configure.

Default for input during agent speech changed

reportInputDuringAgentSpeech default became 'none' in May 2025 (was 'any'); older tutorials assume otherwise.

HIPAA and PCI

HIPAA use needs a signed BAA; keep card data out of welcomeGreeting, hints, parameters and handoffData because some providers are not PCI compliant.

Plus 12 warnings that apply to all platforms and telephony APIs. See category warnings.

Limits

  • url must be wss://
  • speechTimeout 600-5000 ms
  • Invalid provider/voice combos disconnect the call
  • Some STT/TTS providers are not PCI compliant; keep PCI data out of prompts and greetings

Models and products

NameStatusNotes
ConversationRelayGA$0.07/min on the US voice pricing page, plus normal voice minutes. Requires onboarding and accepting Twilio's AI addendum.

Docs and sources

Docs

Sources used

Not fully verified

Whether STT/TTS (especially ElevenLabs) are fully included in $0.07/min; exact WebSocket message field names (voicePrompt etc.).

Similar platforms APIs

Spotted a wrong price or a dead link?