Skip to main content

SpaceXAI and LiveKit

Build voice AI apps with Grok and LiveKit Agents.

Grok Voice Agent API playground

Play with the Grok Voice Agent API in this LiveKit-powered playground

Grok Voice Agent API playground

Overview

SpaceXAI's Grok models are available in LiveKit Agents through LiveKit Inference and the SpaceXAI plugin. With LiveKit Inference, your agent runs on LiveKit's infrastructure to minimize latency. No separate provider API key is required, and usage and rate limits are managed through LiveKit Cloud. Use the plugin instead if you want to manage your own billing and rate limits.

Try it out

Talk to a patient intake agent running entirely on Grok. It takes a caller through a front-desk conversation at a family medicine practice: describing a symptom, routing new versus returning patients, offering appointment times, and handling a change of mind about scheduling.

Book a visit, ask what the office hours are, or request a refill.

SpaceXAI ecosystem support

LiveKit Agents supports the following SpaceXAI  models and APIs:

Getting started

Use the Voice AI quickstart to build a voice AI app with Grok.

Voice AI quickstart

Build your first voice AI app with Grok.

LiveKit Inference

Set each stage of your AgentSession to a Grok model ID:

StageModel ID
Speech-to-textxai/stt-1
Language modelxai/grok-4.20-0309-non-reasoning
Text-to-speechxai/tts-1
from livekit.agents import AgentSession, inference
session = AgentSession(
stt=inference.STT(model="xai/stt-1", language="en"),
llm=inference.LLM(model="xai/grok-4.20-0309-non-reasoning"),
tts=inference.TTS(model="xai/tts-1", voice="carina"),
expressive=True,
# ... vad, turn_handling
)
import { AgentSession, inference } from '@livekit/agents';
const session = new AgentSession({
stt: new inference.STT({ model: 'xai/stt-1', language: 'en' }),
llm: new inference.LLM({ model: 'xai/grok-4.20-0309-non-reasoning' }),
tts: new inference.TTS({ model: 'xai/tts-1', voice: 'carina' }),
expressive: true,
// ... vad, turnHandling
});

Expressive delivery

Expressive mode works with xai/tts-1, so the LLM adds pacing and non-verbal delivery inline without any prompt changes.

SpaceXAI's expressive delivery comes from prosody, non-verbal sounds, and pauses rather than a mood label, so it doesn't publish an lk.expression value and can't drive the mood UI. See SpaceXAI TTS.

Voices

The full SpaceXAI voice roster is available through Inference. For professional and clinical scenarios, rigel is precise and professional, celeste is compassionate and confident, and carina is soft and empathetic. See SpaceXAI TTS for the complete list.

Zero data retention

Traffic through LiveKit Inference to SpaceXAI runs under zero data retention. Your prompts, audio, and model outputs pass through only to generate a response, and neither LiveKit nor SpaceXAI logs, stores, or trains on your data.

LiveKit Agents overview

LiveKit Agents is an open source framework for building realtime AI apps in Python and Node.js. It supports complex voice AI workflows with multiple agents and discrete processing steps, and includes built-in load balancing.

LiveKit provides SIP support for telephony integration and full-featured frontend SDKs in multiple languages. It uses WebRTC transport for end-user devices, enabling high-quality, low-latency realtime experiences. To learn more, see LiveKit Agents.

Additional resources

The following links provide more information on each available SpaceXAI component in LiveKit Agents.