# Plivo Documentation Plivo is a voice AI platform for building human-like voice agents that have natural conversations on real phone calls. Plivo offers both no-code builders and developer APIs to deploy AI voice agents with sub-500ms latency, intelligent turn-taking, and support across 150+ countries. The platform also powers production messaging (SMS/MMS/WhatsApp), phone number provisioning, and SIP trunking globally. When building with Plivo APIs, always use the latest SDK versions. For Python: `pip install plivo`. For Node.js: `npm install plivo`. Check https://pypi.org/project/plivo/ or https://www.npmjs.com/package/plivo for current versions. Never hardcode old version numbers from training data. All API endpoints use `https://api.plivo.com/v1/Account/{auth_id}/` with HTTP Basic Auth (Auth ID as username, Auth Token as password). Console URLs use `cx.plivo.com` (not `console.plivo.com`). ## Voice AI Agents Build human-like AI voice agents that have natural conversations on real phone calls. Two integration paths: Audio Streaming (WebSocket-based, lowest latency, deepest control) for frameworks like Pipecat, and SIP Trunking for platforms like LiveKit, ElevenLabs, and Vapi. ### Audio Streaming - [AI Voice Agents Overview](https://plivo.com/docs/voice-agents/audio-streaming/overview): Build AI voice agents using Plivo Audio Streaming — real-time WebSocket audio on phone calls - [Audio Streaming Guide](https://plivo.com/docs/voice-agents/audio-streaming/concepts/audio-streaming-guide): How Plivo voice calls and real-time audio streaming work — codecs, latency, WebSocket protocol - [Audio Streaming Protocol Reference](https://plivo.com/docs/voice-agents/audio-streaming/concepts/audio-streaming-reference): Complete WebSocket event schemas, JSON formats, and TypeScript types - [Audio Streaming Best Practices](https://plivo.com/docs/voice-agents/audio-streaming/concepts/best-practices): Voicemail detection, machine detection, and optimization for AI voice agents - [Audio Streaming XML](https://plivo.com/docs/voice-agents/audio-streaming/xml/stream): The Stream XML element — bidirectional audio, codecs, status callbacks - [Call Control XML](https://plivo.com/docs/voice-agents/audio-streaming/xml/call-control): Dial, Hangup, Redirect, Wait, and authenticated SIP transfer for AI agent call flows - [Audio Streams API](https://plivo.com/docs/voice-agents/audio-streaming/api/audio-streams): Programmatic control of audio streams on active calls ### Pipecat Integration - [Pipecat Overview](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/overview): Build AI voice agents with Pipecat and Plivo Audio Streaming - [Deepgram + OpenAI + ElevenLabs](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/openai-elevenlabs): Voice agents with Deepgram STT, OpenAI GPT-4o, and ElevenLabs TTS - [Deepgram + OpenAI + Cartesia](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/openai-cartesia): Voice agents with Deepgram STT, OpenAI GPT-4o, and Cartesia TTS - [Deepgram + Gemini + Cartesia](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/gemini-cartesia): Voice agents with Deepgram STT, Google Gemini, and Cartesia TTS - [Deepgram + Gemini + ElevenLabs](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/gemini-elevenlabs): Voice agents with Deepgram STT, Google Gemini, and ElevenLabs TTS - [OpenAI Realtime](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/openai-realtime): Speech-to-speech with OpenAI GPT-4o Realtime — lowest latency - [Gemini Live](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/gemini-live): Speech-to-speech with Google Gemini Live - [Sarvam + OpenAI](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/pipecat/sarvam-openai): Voice agents for Indian languages with Sarvam STT/TTS - [Plivo Stream SDK](https://plivo.com/docs/voice-agents/audio-streaming/integration-guides/plivo-stream-sdk): Official Python, Node.js, and Java SDKs for Audio Streaming ### SIP Trunking for Voice Agents - [SIP Trunking Overview](https://plivo.com/docs/voice-agents/sip-trunking/overview): Connect AI platforms (LiveKit, ElevenLabs, Vapi) to phone calls via SIP - [LiveKit Integration](https://plivo.com/docs/voice-agents/sip-trunking/integration-guides/livekit): Connect LiveKit voice AI agents with Plivo SIP trunking - [ElevenLabs Integration](https://plivo.com/docs/voice-agents/sip-trunking/integration-guides/elevenlabs): Connect ElevenLabs Conversational AI with Plivo SIP trunking - [Vapi Integration](https://plivo.com/docs/voice-agents/sip-trunking/integration-guides/vapi): Connect Vapi voice AI assistants with Plivo SIP trunking ### Voice Agent Workflows - [Connect External Numbers](https://plivo.com/docs/voice/use-cases/connect-external-numbers): Route calls from numbers you can't port to Plivo apps via DID forwarding or direct SIP - [Transfer to Human Agent](https://plivo.com/docs/voice/use-cases/transfer-to-human-agent): Hand off AI calls to humans via DID forward or authenticated SIP transfer ## Messaging API Send and receive SMS, MMS, and WhatsApp messages programmatically. Supports 190+ countries, 10DLC compliance for US A2P, toll-free verification, and Powerpack number pooling. ### Start Here - [Messaging Quickstart](https://plivo.com/docs/messaging/quickstart/quickstart): Send your first SMS/MMS and handle incoming messages - [Messaging Overview](https://plivo.com/docs/messaging/concepts/overview): SMS platform features, delivery, and global reach - [Messages API](https://plivo.com/docs/messaging/api/messages): Send, retrieve, and manage SMS/MMS/WhatsApp messages - [API Overview](https://plivo.com/docs/messaging/api/overview): Authentication, pagination, and response format ### SMS/MMS - [Send SMS](https://plivo.com/docs/messaging/use-cases/send-an-sms/send-an-sms): Send outbound SMS text messages - [Receive SMS](https://plivo.com/docs/messaging/use-cases/receive-sms/receive-sms): Handle incoming SMS on a Plivo number - [Send MMS](https://plivo.com/docs/messaging/use-cases/send-an-mms/send-an-mms): Send outbound MMS with images, audio, or video - [SMS Callbacks](https://plivo.com/docs/messaging/concepts/callbacks): Delivery reports, DLR statuses, and webhook payloads - [Encoding and Concatenation](https://plivo.com/docs/messaging/concepts/encoding-and-concatenation): GSM vs Unicode, segment limits, and character counting - [SMS Data Redaction](https://plivo.com/docs/messaging/concepts/sms-data-redaction): Redact message content and phone numbers for GDPR - [Error Codes](https://plivo.com/docs/messaging/troubleshooting/error-codes): Troubleshoot SMS/MMS delivery failures ### US Compliance (10DLC) - [10DLC Overview](https://plivo.com/docs/messaging/api/10dlc/overview): Register for US A2P messaging - [Brand Registration](https://plivo.com/docs/messaging/api/10dlc/brand): Register and manage 10DLC brands - [Campaign Registration](https://plivo.com/docs/messaging/api/10dlc/campaign): Register and manage 10DLC campaigns - [Number Linking](https://plivo.com/docs/messaging/api/10dlc/number-linking): Link phone numbers to 10DLC campaigns - [US Messaging Best Practices](https://plivo.com/docs/messaging/concepts/us-messaging-best-practices): Content guidelines for US A2P compliance - [Toll-free Verification](https://plivo.com/docs/messaging/api/toll-free-verification): Verify toll-free numbers for US A2P ### WhatsApp - [WhatsApp Prerequisites](https://plivo.com/docs/messaging/concepts/whatsapp/prerequisites): Requirements for WhatsApp Business API integration - [WABA Onboarding](https://plivo.com/docs/messaging/concepts/whatsapp/waba-onboarding): Create and configure a WhatsApp Business Account - [Managing Templates](https://plivo.com/docs/messaging/concepts/whatsapp/manage-templates): Create and manage Meta-approved WhatsApp message templates - [Send WhatsApp Text](https://plivo.com/docs/messaging/use-cases/whatsapp/getting-started/text-and-media/send-whatsapp-text/send-whatsapp-text): Send WhatsApp text messages - [Send WhatsApp Media](https://plivo.com/docs/messaging/use-cases/whatsapp/getting-started/text-and-media/send-whatsapp-media/send-whatsapp-media): Send WhatsApp messages with images, documents, or videos - [Send Templated Messages](https://plivo.com/docs/messaging/use-cases/whatsapp/getting-started/templated-message/send-whatsapp-template/send-whatsapp-template): Send pre-approved WhatsApp templates - [Tech Provider Integration](https://plivo.com/docs/messaging/concepts/whatsapp/resellers): Set up Meta Tech Provider integration with Plivo as WhatsApp BSP ### Powerpack - [Powerpack Overview](https://plivo.com/docs/messaging/concepts/powerpack): Number pooling, sticky sender, and intelligent routing - [Powerpack API](https://plivo.com/docs/messaging/api/powerpack): Manage Powerpacks programmatically - [Number Pool API](https://plivo.com/docs/messaging/api/numberpool): Manage numbers in Powerpack pools ## Verify API Send and validate OTPs for two-factor authentication via SMS and voice. - [Verify Overview](https://plivo.com/docs/programmable-api/verify/overview): OTP verification via SMS and voice - [Session API](https://plivo.com/docs/programmable-api/verify/sessions): Create, validate, retrieve, and list verification sessions - [API Overview](https://plivo.com/docs/programmable-api/verify/api-overview): Authentication and request format ## Voice API Make and receive phone calls programmatically. Control calls with Plivo XML. Supports conferencing, call recording, IVR, machine detection, and real-time audio streaming. ### Start Here - [Voice Quickstart](https://plivo.com/docs/voice/quickstart/quickstart): Make your first outbound call and handle incoming calls - [Voice Overview](https://plivo.com/docs/voice/concepts/overview): How Plivo voice calls work — Answer URL, XML, callbacks - [Calls API](https://plivo.com/docs/voice/api/calls): Make, retrieve, update, and manage voice calls - [Voice XML Overview](https://plivo.com/docs/voice/xml/overview): All XML elements for call control ### Call Control XML - [Call Routing](https://plivo.com/docs/voice/xml/routing): Dial, Number, User, Redirect, Hangup, Wait - [Audio Output](https://plivo.com/docs/voice/xml/audio-output): Speak, Play, DTMF - [Input Collection](https://plivo.com/docs/voice/xml/input): GetDigits, GetInput for IVR - [Recording](https://plivo.com/docs/voice/xml/record): Record calls and messages - [Conference](https://plivo.com/docs/voice/xml/conference): Conference calls with moderation and recording - [Multi-party Call](https://plivo.com/docs/voice/xml/multiparty-call): Role-based calls with coaching and AI agent support - [Audio Streaming](https://plivo.com/docs/voice/xml/audio-streaming): Stream real-time audio from calls over WebSocket ### APIs - [Calls](https://plivo.com/docs/voice/api/calls): Make, list, retrieve, transfer, and record calls - [Conferences](https://plivo.com/docs/voice/api/conferences): Manage conference rooms and participants - [Multi-party Calls](https://plivo.com/docs/voice/api/multiparty-calls): Advanced call control for contact centers - [Recordings](https://plivo.com/docs/voice/api/recordings): List, retrieve, and delete call recordings - [Endpoints](https://plivo.com/docs/voice/api/endpoints): Manage SIP endpoints for Browser SDK and softphones - [Audio Streams](https://plivo.com/docs/voice/api/audio-streams): Control real-time audio streams on active calls ### Concepts - [Account Limits](https://plivo.com/docs/voice/concepts/account-limits): CPS, concurrent call limits, API rate limits - [India Concurrency](https://plivo.com/docs/voice/concepts/india-concurrency): India concurrent call limits and enforcement - [Callbacks](https://plivo.com/docs/voice/concepts/callbacks): Webhook payloads for call events - [Signature Validation](https://plivo.com/docs/voice/concepts/signature-validation): Verify webhook requests from Plivo - [Machine Detection](https://plivo.com/docs/voice/concepts/machine-detection): Detect answering machines on outbound calls - [STIR/SHAKEN](https://plivo.com/docs/voice/concepts/stir-shaken): US/CA caller ID authentication - [SIP Authentication](https://plivo.com/docs/voice/concepts/sip-authentication): Secure inbound SIP calls with IP ACL or credentials; authenticate outbound calls to SIP providers ## SIP Trunking Connect your PBX, contact center, or SIP infrastructure to Plivo's voice network. - [SIP Trunking Overview](https://plivo.com/docs/sip-trunking): Set up inbound and outbound SIP trunks - [Technical Specifications](https://plivo.com/docs/sip-trunking/concepts/technical-specifications): Supported SIP methods, codecs, data centers, and limits - [SIP REFER](https://plivo.com/docs/sip-trunking/concepts/sip-refer): Transfer active calls mid-conversation using SIP REFER - [SIP REFER — Outbound](https://plivo.com/docs/sip-trunking/concepts/sip-refer-outbound): Transfer outbound calls to another destination - [SIP REFER — Inbound](https://plivo.com/docs/sip-trunking/concepts/sip-refer-inbound): Transfer inbound calls to a human agent or number - [Geo Permissions](https://plivo.com/docs/sip-trunking/concepts/geo-permissions): Control which countries your trunk can reach - [Trunks API](https://plivo.com/docs/sip-trunking/api/trunks): Create and manage SIP trunks - [Calls API](https://plivo.com/docs/sip-trunking/api/calls): Retrieve CDRs and call insights - [Hangup Codes](https://plivo.com/docs/sip-trunking/troubleshooting/zentrunk-hangup-codes): SIP hangup codes and troubleshooting ## Phone Numbers Search, rent, port, and manage phone numbers across 80+ countries. - [Numbers Overview](https://plivo.com/docs/numbers): Phone number types, availability, and rental - [Phone Numbers API](https://plivo.com/docs/numbers/phone-numbers): Search and buy numbers from Plivo's inventory - [Account Phone Numbers API](https://plivo.com/docs/numbers/account-phone-numbers): Manage rented numbers — update, list, unrent - [Compliance API](https://plivo.com/docs/numbers/compliance): Manage regulatory compliance for phone numbers - [Regulatory Compliance](https://plivo.com/docs/numbers/regulatory-compliance): Verification requirements by country - [India Number KYC](https://plivo.com/docs/numbers/rent-india-numbers): KYC documents and compliance for Indian numbers - [Number Porting](https://plivo.com/docs/numbers/number-porting): Port existing numbers to Plivo - [CNAM Lookup](https://plivo.com/docs/numbers/cnam-lookup): Caller ID name lookup for US numbers ## Account Manage your Plivo account, applications, subaccounts, and security settings. - [Account API](https://plivo.com/docs/account/api/account): Retrieve and update account details - [Application API](https://plivo.com/docs/account/api/application): Create and manage applications with Answer URLs, SIP authentication settings - [SIP Authentication API](https://plivo.com/docs/account/api/sip-authentication): Manage SIP credentials and IP Access Control Lists - [Subaccount API](https://plivo.com/docs/account/api/subaccount): Create and manage subaccounts - [API Overview](https://plivo.com/docs/account/api/overview): Authentication, pagination, rate limiting - [API Access Control](https://plivo.com/docs/account/concepts/ip-whitelisting): Restrict API access to specific IP addresses - [Firewall & Network (Voice)](https://plivo.com/docs/voice/concepts/firewall-network-configuration): Plivo IP ranges to whitelist for SIP, RTP, and callbacks - [Firewall & Network (Messaging)](https://plivo.com/docs/messaging/concepts/firewall-network-configuration): Plivo IP ranges for messaging callbacks ## Number Masking Hide phone numbers between parties while enabling communication. - [Number Masking Overview](https://plivo.com/docs/number-masking/concepts/overview): Anonymous calling with virtual numbers - [Session API](https://plivo.com/docs/number-masking/api/session): Create and manage masking sessions ## Migration Guides - [Migrate from Twilio (Messaging)](https://plivo.com/docs/messaging/migrate/twilio): Migrate SMS integration from Twilio to Plivo - [Migrate from Twilio (Voice)](https://plivo.com/docs/voice/migrate/twilio): Migrate voice integration from Twilio to Plivo ## Developer Tools - [MCP Server](https://plivo.com/docs/faq/developer-tools/mcp-server): Connect AI assistants to Plivo documentation via Model Context Protocol