Skip to main content
The Voice API provides everything you need to build voice-powered agents:
  • List voices — browse TTS voices across all configured providers
  • List models — discover TTS, STT, and STS models
  • Create voice session — establish a real-time voice session over LiveKit WebRTC
  • List providers — see which voice providers are enabled for your organization

List voices

Browse all TTS voices available across providers.

Create voice session

Start a real-time voice call powered by LiveKit.

List voice models

Discover TTS, STT, and STS models for agent configuration.

List providers

View enabled voice providers for your organization.

Key concepts

  • TTS (Text-to-Speech) — converts the agent’s text reply into audio streamed to the caller.
  • STT (Speech-to-Text) — converts caller speech into text that the LLM processes.
  • STS (Speech-to-Speech) — end-to-end speech model that bypasses the text layer entirely (lower latency, less control).
  • Voice pipeline — the combination of STT → LLM → TTS that processes a voice turn.
  • voicePipelineMode on agents:
    • pipeline — classic STT + LLM + TTS
    • sts — direct speech-to-speech
    • hybrid — adaptive mode that switches based on conditions

Connecting to a voice session

After calling POST /v1/voice/sessions, you receive a token and serverUrl for LiveKit. Use the LiveKit SDK to connect:
Node.js
import { Room, RoomEvent } from 'livekit-client';

const { token, serverUrl } = await fetch('https://api.agntix.ai/v1/voice/sessions', {
  method: 'POST',
  headers: { 'x-api-key': 'pk_live_••••', 'Content-Type': 'application/json' },
  body: JSON.stringify({ agentId: 'a1b2c3d4-...' }),
}).then(r => r.json());

const room = new Room();
await room.connect(serverUrl, token);
room.on(RoomEvent.TrackSubscribed, (track) => {
  // play agent audio
});

Inbound calls

Assign a phone number to an agent in the dashboard or via PATCH /v1/chat/phone-numbers/{id}. Inbound calls to that number automatically start a voice session with the assigned agent.